feat 对接商品分类筛选
This commit is contained in:
parent
2583b21c3f
commit
63a2299a13
@ -17,9 +17,10 @@ Page({
|
|||||||
onShow() {
|
onShow() {
|
||||||
this.getTabBar().init();
|
this.getTabBar().init();
|
||||||
},
|
},
|
||||||
onChange() {
|
onChange(e) {
|
||||||
|
console.log(e.detail.item.groupId,'asdasd');
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '/pages/goods/list/index',
|
url: '/pages/goods/list/index?goodsCategoryGuid=' + e.detail.item.groupId,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
@ -20,6 +20,7 @@ Page({
|
|||||||
hasLoaded: false,
|
hasLoaded: false,
|
||||||
loadMoreStatus: 0,
|
loadMoreStatus: 0,
|
||||||
loading: true,
|
loading: true,
|
||||||
|
goodsCategoryGuid: 0
|
||||||
},
|
},
|
||||||
|
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
@ -39,13 +40,14 @@ Page({
|
|||||||
},
|
},
|
||||||
|
|
||||||
generalQueryData(reset = false) {
|
generalQueryData(reset = false) {
|
||||||
const { filter, keywords, minVal, maxVal } = this.data;
|
const { filter, keywords, minVal, maxVal , goodsCategoryGuid} = this.data;
|
||||||
const { pageNum, pageSize } = this;
|
const { pageNum, pageSize } = this;
|
||||||
const { sorts, overall } = filter;
|
const { sorts, overall } = filter;
|
||||||
const params = {
|
const params = {
|
||||||
// sort: 0, // 0 综合,1 价格
|
// sort: 0, // 0 综合,1 价格
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 6,
|
pageSize: 6,
|
||||||
|
goodsCategoryGuid: goodsCategoryGuid
|
||||||
// keyword: keywords,
|
// keyword: keywords,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -124,7 +126,14 @@ Page({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
onLoad() {
|
onLoad(query) {
|
||||||
|
const {
|
||||||
|
goodsCategoryGuid
|
||||||
|
} = query;
|
||||||
|
this.setData({
|
||||||
|
goodsCategoryGuid: goodsCategoryGuid,
|
||||||
|
});
|
||||||
|
|
||||||
this.init(true);
|
this.init(true);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user