Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
程默
mayi-mp-shop
Commits
cab05b61
Commit
cab05b61
authored
Mar 26, 2024
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
d0b9a922
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
7 deletions
+16
-7
src/components/basicTool/transverse-label/index.vue
+1
-1
src/components/componentsGroup/index.vue
+5
-2
static/nativeComponents/GoodsList/index.js
+8
-2
static/nativeComponents/GoodsList/index.wxml
+2
-2
No files found.
src/components/basicTool/transverse-label/index.vue
View file @
cab05b61
...
...
@@ -71,7 +71,7 @@
>
<div
v-for=
"(item1, index1) in item.contentList"
:key=
"index1"
>
<embed-module
v-if=
"item1.componentCode == 'embed-module'"
:datas=
"item1"
:componentIndex=
"componentIndex"
:active=
"active"
:goodsListIndex=
"index"
:index1=
"index1"
></embed-module>
<componentsGroup
:item1=
"item1"
:index1=
"index1"
:componentIndex=
"componentIndex"
:active=
"active"
:
goodsListIndex=
"index
"
:storageKey=
"'transverse-label'+componentIndex"
v-else
></componentsGroup>
<componentsGroup
:item1=
"item1"
:index1=
"index1"
:componentIndex=
"componentIndex"
:active=
"active"
:
tabIndex=
"index"
:goodsListIndex=
"index1
"
:storageKey=
"'transverse-label'+componentIndex"
v-else
></componentsGroup>
</div>
</van-tab>
</van-tabs>
...
...
src/components/componentsGroup/index.vue
View file @
cab05b61
...
...
@@ -6,10 +6,9 @@
<banner
:datas=
"item1"
></banner>
</div>
<div
v-else-if=
"item1.componentCode == 'goods-list' && item1.componentInfo.visible == 1"
style=
"height:100%;"
>
<goods-list
:storageKey=
"storageKey"
:class=
"['goodsListItemIndex' + index1, 'transverse-label-goodsListItem']"
:datas=
"item1"
:datasIndex=
"active"
:goodsListIndex=
"goodsListIndex"
></goods-list>
:goodsListIndex=
"goodsListIndex"
:tabIndex=
"index"
></goods-list>
</div>
<div
v-else-if=
"item1.componentCode == 'ranking-list' && item1.componentInfo.visible == 1"
>
...
...
@@ -135,6 +134,10 @@ export default {
type
:
Number
,
default
:
0
,
},
tabIndex
:
{
type
:
Number
,
default
:
0
,
},
},
data
()
{
return
{}
...
...
static/nativeComponents/GoodsList/index.js
View file @
cab05b61
...
...
@@ -21,10 +21,12 @@ const componentOptions = {
datas
:
{
type
:
Object
},
// 父级组件index (横向标签为tab索引,没有为0)
datasIndex
:{
type
:
Number
,
default
:
0
},
// 同级组件index
goodsListIndex
:{
type
:
Number
,
default
:
0
...
...
@@ -342,7 +344,7 @@ const componentOptions = {
if
(
goodsLists
&&
goodsLists
.
length
<
query
.
rows
)
{
this
.
setData
({
finished
:
true
});
}
this
.
goodsListVal
(
goodsList
,
type
);
this
.
goodsListVal
(
goodsList
,
type
,
true
);
}
});
}
else
{
...
...
@@ -420,7 +422,8 @@ const componentOptions = {
}
});
},
goodsListVal
(
goodsList
,
type
,
flag
)
{
goodsListVal
(
goodsList
,
type
,
flag
)
{
console
.
log
(
'goodsListVal'
,
goodsList
,
type
,
flag
);
let
{
attributeValueList
}
=
this
.
data
.
datas
.
componentData
;
goodsList
.
forEach
((
item
,
index
)
=>
{
item
.
marketingTag
=
item
.
defaultTags
...
...
@@ -478,6 +481,7 @@ const componentOptions = {
pageGoodsList
[
that
.
data
.
datasIndex
]
=
list
;
}
this
.
setStorageSync
(
'pageGoodsList'
,
pageGoodsList
);
console
.
log
(
'goodsListVal->2'
,
that
.
data
.
goodsListIndex
,
that
.
data
.
datasIndex
,
list
)
// 获取是否要开启请求拦截
...
...
@@ -486,6 +490,7 @@ const componentOptions = {
this
.
setStorageSync
(
'loadingFlag'
,
loadingFlag
);
that
.
setData
({
"datas.componentData.goodsList"
:
list
,
goodsList
:
list
,
pageGoodsList
,
loadingFlag
,
scrollLoading
:
false
,
...
...
@@ -751,6 +756,7 @@ const componentOptions = {
});
},
setStorageSync
(
key
,
val
)
{
console
.
log
(
'setStorageSync->'
,
this
.
data
.
storageKey
,
key
,
val
)
return
wx
.
setStorageSync
(
`
${
this
.
data
.
storageKey
}
_
${
key
}
`
,
val
)
},
getStorageSync
(
key
)
{
...
...
static/nativeComponents/GoodsList/index.wxml
View file @
cab05b61
...
...
@@ -130,14 +130,14 @@
style="margin-left:{{-datas.componentData.proGap*2}}rpx;"
>
<view
wx:for="{{
pageGoodsList[datasIndex]
}}"
wx:for="{{
goodsList
}}"
wx:key="index"
class="goods-item"
style="width:{{100/datas.componentData.columnNum}}%;padding-left:{{datas.componentData.proGap*2}}rpx;display:flex;"
>
<goods-item
datas="{{datas}}"
items="{{
pageGoodsList[datasIndex][index]
}}"
items="{{
item
}}"
indexs="{{index}}"
></goods-item>
</view>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment