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
c52c7717
Commit
c52c7717
authored
Sep 20, 2022
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
滚动加载
parent
51388ed6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
20 deletions
+33
-20
src/components/common/GoodsFliters.vue
+10
-11
static/nativeComponents/GoodsList/index.js
+16
-3
static/nativeComponents/GoodsList/index.wxml
+5
-5
static/nativeComponents/GoodsList/index.wxss
+2
-1
No files found.
src/components/common/GoodsFliters.vue
View file @
c52c7717
...
...
@@ -51,7 +51,7 @@
<
template
v-else
>
<div
class=
"brand-item"
v-for=
"(item,index) in categoryList
2
"
v-for=
"(item,index) in categoryList
1
"
:key=
"index"
>
<div
...
...
@@ -115,7 +115,7 @@
<div
v-if=
"brandList.length <= 9"
>
<div
class=
"brand-item"
v-for=
"(item,index4) in
useB
randList"
v-for=
"(item,index4) in
b
randList"
:key=
"index4"
>
<div
...
...
@@ -134,7 +134,7 @@
<div
v-else
>
<div
class=
"brand-item"
v-for=
"(item,index5) in
useBrandList
"
v-for=
"(item,index5) in
brandList1
"
:key=
"index5"
>
<div
...
...
@@ -374,12 +374,15 @@ export default {
GoodsSpecificationNameAndValuesListResponseDTO
:
[],
brandMore
:
false
,
brandList
:
[],
brandList1
:
[],
brandList2
:
[],
brandListCopy
:
[],
terminalProductIds
:
[],
specifications
:
[],
randomNumber
:
""
,
hideBrandSelectFlag
:
false
,
// 隐藏品牌筛选
categoryList
:
[],
//暂时为一级分类列表
categoryList1
:
[],
//查看更多分类
categoryList2
:
[],
//查看更多分类
categoryMore
:
false
,
// 查看更多分类
sourceType
:
0
,
// 来源类型 0商品搜索页打开 1商品列表组件打开
...
...
@@ -388,12 +391,6 @@ export default {
},
components
:
{},
computed
:
{
useBrandList
()
{
if
(
this
.
brandList
.
length
<=
9
)
{
return
this
.
brandList
}
return
this
.
brandList
.
slice
(
0
,
8
)
},
brandActiveNameListStr
()
{
return
this
.
submitFliterVal
.
brandActiveNameList
.
join
(
"、"
);
},
...
...
@@ -533,7 +530,8 @@ export default {
}
})
this
.
brandList
=
list
;
this
.
brandList2
=
this
.
brandList
.
slice
(
8
);
this
.
brandList1
=
list
.
slice
(
0
,
8
);
this
.
brandList2
=
list
.
slice
(
8
);
console
.
log
(
this
.
brandList
,
'---------brandList'
)
}
});
...
...
@@ -555,7 +553,8 @@ export default {
}
})
this
.
categoryList
=
list
;
this
.
categoryList2
=
this
.
categoryList
.
slice
(
8
);
this
.
categoryList1
=
list
.
slice
(
0
,
8
);
this
.
categoryList2
=
list
.
slice
(
8
);
console
.
log
(
this
.
categoryList
,
'--this.categoryList'
)
}
})
...
...
static/nativeComponents/GoodsList/index.js
View file @
c52c7717
...
...
@@ -235,7 +235,15 @@ const componentOptions = {
}
},
getProductList
(
code
,
type
)
{
let
{
goodsList
,
goodsSort
}
=
this
.
data
.
datas
.
componentData
;
let
{
goodsSort
}
=
this
.
data
.
datas
.
componentData
;
let
goodsList
=
[];
if
(
type
==
2
)
{
goodsList
=
this
.
data
.
pageGoodsList
[
this
.
data
.
datasIndex
];
}
else
{
this
.
setData
({
finished
:
false
});
goodsList
=
this
.
data
.
datas
.
componentData
.
goodsList
;
}
console
.
log
(
goodsList
,
'--------------------------246'
)
let
{
classificationLoadPage
,
loading
,
...
...
@@ -257,10 +265,10 @@ const componentOptions = {
}
this
.
setData
({
classificationLoadPage
,
loading
});
let
query
=
{
categoryIncludeChild
:
true
,
categoryId
:
this
.
data
.
datas
.
componentData
.
categoryId
,
page
:
classificationLoadPage
,
// rows: this.data.datas.componentData.classificationLoadNum,
rows
:
this
.
showRowNum
()
?
this
.
data
.
classificationLoadNum
:
this
.
getItemNum
(),
// rows: this.showRowNum() ? this.data.classificationLoadNum : this.getItemNum(),
sortColumn
:
goodsSort
,
sortType
:
goodsSort
!=
2
?
1
:
0
,
whetherShowSoldOutGoods
:
this
.
data
.
datas
.
componentData
...
...
@@ -281,6 +289,11 @@ const componentOptions = {
brandIdList
:
this
.
data
.
submitFliterVal
.
brandIdList
||
[],
categoryIdList
:
this
.
data
.
submitFliterVal
.
categoryIdList
||
[],
};
// 当前页 // 一页多少条 //查询销售数量 //查询收藏数 //是否使用虚拟销售数量 //是否使用虚拟收藏人数 //是否查询商品佣金(0:不查询,1:展示,为空不查佣金) //是否查询会员价 1是 0否 //是否展示营销标签 1是 0否 //是否查询多商户 //商城使用
if
(
this
.
data
.
datas
.
componentData
[
'goodsSource'
]
==
'classify'
)
{
query
.
rows
=
this
.
data
.
datas
.
componentData
.
classificationLoadNum
;
}
else
{
query
.
rows
=
this
.
getItemNum
();
}
// 启用了筛选组件
if
(
this
.
data
.
datas
.
componentData
.
filterComponentsFlag
==
true
){
query
.
searchWord
=
this
.
data
.
filterSearchName
;
...
...
static/nativeComponents/GoodsList/index.wxml
View file @
c52c7717
...
...
@@ -124,25 +124,25 @@
<view
class="goods goods-rowList"
id="goods-rowList"
wx:
el
if="{{datas.componentData.style==='rowList'}}"
wx:if="{{datas.componentData.style==='rowList'}}"
style="margin-left:{{-datas.componentData.proGap*2}}rpx;"
>
<view
wx:for="{{
datas.componentData.goodsList
}}"
wx:for="{{
pageGoodsList[datasIndex]
}}"
wx:key="index"
class="goods-item"
style="width:{{100/datas.componentData.columnNum}}%;padding-left:{{datas.componentData.proGap*2}}rpx"
>
<goods-item
datas="{{datas}}"
items="{{
datas.componentData.goodsList
[index]}}"
items="{{
pageGoodsList[datasIndex]
[index]}}"
indexs="{{index}}"
></goods-item>
</view>
<!-- 上拉加载底部展示 -->
<view class="loadBottom" wx:if="{{datas.componentData.moreShow == false && datas.componentData.style == 'rowList'}}">
<
text wx:if="{{loading}}">加载中...</text
>
<text wx:if="{{ finished}}">暂无更多</text>
<
van-loading size="16px" wx:if="{{loading}}" color="#999"><text class="scrollLoadingText">加载中</text></van-loading
>
<text wx:
el
if="{{ finished}}">暂无更多</text>
</view>
</view>
<!-- 堆叠卡片 -->
...
...
static/nativeComponents/GoodsList/index.wxss
View file @
c52c7717
...
...
@@ -205,6 +205,6 @@ image{
.loadBottom{
text-align: center;
color: #999;
font-size: 2
4
rpx;
font-size: 2
8
rpx;
margin-top: 10rpx;
}
\ No newline at end of file
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