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
79d65692
Commit
79d65692
authored
Sep 19, 2022
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
筛选支持分类
parent
dfb4b39a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
2 deletions
+10
-2
src/api/goods.js
+4
-0
src/components/common/GoodsFliters.vue
+0
-0
static/nativeComponents/GoodsList/index.js
+5
-1
static/nativeComponents/GoodsList/index.wxml
+1
-1
No files found.
src/api/goods.js
View file @
79d65692
...
@@ -18,4 +18,8 @@ export default {
...
@@ -18,4 +18,8 @@ export default {
queryProductBrand
(
data
)
{
queryProductBrand
(
data
)
{
return
requestPOST
(
`
${
process
.
env
.
OLSHOP_URL
}
/product/query_brand_by_page`
,
data
)
return
requestPOST
(
`
${
process
.
env
.
OLSHOP_URL
}
/product/query_brand_by_page`
,
data
)
},
},
//查询商品品牌
getProductTopCategory
(
data
)
{
return
requestPOST
(
`
${
process
.
env
.
OLSHOP_URL
}
/product/get_product_top_category`
,
data
)
},
};
};
src/components/common/GoodsFliters.vue
View file @
79d65692
This diff is collapsed.
Click to expand it.
static/nativeComponents/GoodsList/index.js
View file @
79d65692
...
@@ -62,6 +62,7 @@ const componentOptions = {
...
@@ -62,6 +62,7 @@ const componentOptions = {
brandIdList
:
[],
//品牌
brandIdList
:
[],
//品牌
brandActiveNameList
:
[],
brandActiveNameList
:
[],
goodsSpecificationIds
:
[],
goodsSpecificationIds
:
[],
categoryIdList
:
[],
},
},
randomNumber
:
""
,
randomNumber
:
""
,
selectScreen
:
false
,
// 筛选选中状态
selectScreen
:
false
,
// 筛选选中状态
...
@@ -82,6 +83,7 @@ const componentOptions = {
...
@@ -82,6 +83,7 @@ const componentOptions = {
||
val
.
submitFliterVal
.
brandIdList
.
length
>
0
||
val
.
submitFliterVal
.
brandIdList
.
length
>
0
||
val
.
submitFliterVal
.
brandActiveNameList
.
length
>
0
||
val
.
submitFliterVal
.
brandActiveNameList
.
length
>
0
||
val
.
submitFliterVal
.
goodsSpecificationIds
.
length
>
0
||
val
.
submitFliterVal
.
goodsSpecificationIds
.
length
>
0
||
val
.
submitFliterVal
.
categoryIdList
.
length
>
0
_this
.
setData
({
_this
.
setData
({
submitFliterVal
:
val
.
submitFliterVal
,
submitFliterVal
:
val
.
submitFliterVal
,
selectScreen
,
selectScreen
,
...
@@ -149,6 +151,7 @@ const componentOptions = {
...
@@ -149,6 +151,7 @@ const componentOptions = {
filterBrand
:
_this
.
data
.
datas
.
componentData
.
filterBrand
,
filterBrand
:
_this
.
data
.
datas
.
componentData
.
filterBrand
,
randomNumber
:
_this
.
data
.
randomNumber
,
randomNumber
:
_this
.
data
.
randomNumber
,
hideBrandSelectFlag
:
_this
.
data
.
datas
.
componentData
.
filterBrand
.
length
>
0
?
true
:
false
,
hideBrandSelectFlag
:
_this
.
data
.
datas
.
componentData
.
filterBrand
.
length
>
0
?
true
:
false
,
sourceType
:
1
,
});
});
}
else
{
}
else
{
if
(
item
==
2
)
{
if
(
item
==
2
)
{
...
@@ -256,7 +259,8 @@ const componentOptions = {
...
@@ -256,7 +259,8 @@ const componentOptions = {
?
1
?
1
:
0
,
:
0
,
whetherFindMultiShopFlag
:
1
,
whetherFindMultiShopFlag
:
1
,
brandIdList
:
this
.
data
.
submitFliterVal
.
brandIdList
||
[]
brandIdList
:
this
.
data
.
submitFliterVal
.
brandIdList
||
[],
categoryIdList
:
this
.
data
.
submitFliterVal
.
categoryIdList
||
[],
};
// 当前页 // 一页多少条 //查询销售数量 //查询收藏数 //是否使用虚拟销售数量 //是否使用虚拟收藏人数 //是否查询商品佣金(0:不查询,1:展示,为空不查佣金) //是否查询会员价 1是 0否 //是否展示营销标签 1是 0否 //是否查询多商户 //商城使用
};
// 当前页 // 一页多少条 //查询销售数量 //查询收藏数 //是否使用虚拟销售数量 //是否使用虚拟收藏人数 //是否查询商品佣金(0:不查询,1:展示,为空不查佣金) //是否查询会员价 1是 0否 //是否展示营销标签 1是 0否 //是否查询多商户 //商城使用
// 启用了筛选组件
// 启用了筛选组件
if
(
this
.
data
.
datas
.
componentData
.
filterComponentsFlag
==
true
){
if
(
this
.
data
.
datas
.
componentData
.
filterComponentsFlag
==
true
){
...
...
static/nativeComponents/GoodsList/index.wxml
View file @
79d65692
...
@@ -134,7 +134,7 @@
...
@@ -134,7 +134,7 @@
>
>
<goods-item
<goods-item
datas="{{datas}}"
datas="{{datas}}"
items="{{goodsList[index]}}"
items="{{
datas.componentData.
goodsList[index]}}"
indexs="{{index}}"
indexs="{{index}}"
></goods-item>
></goods-item>
</view>
</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