diff --git a/api/store.js b/api/store.js index a22f2cd..2965e37 100644 --- a/api/store.js +++ b/api/store.js @@ -91,8 +91,8 @@ export function getCategoryList() { * 获取商品分类列表 * */ -export function getCategoryIndexList() { - return request.get('store/product/category/index', {}, { +export function getCategoryIndexList(query) { + return request.get('store/product/category/index', query, { noAuth: true }); } diff --git a/pages/whole_sale/index.vue b/pages/whole_sale/index.vue index 2846dce..5f58043 100644 --- a/pages/whole_sale/index.vue +++ b/pages/whole_sale/index.vue @@ -532,6 +532,7 @@ keyword: '', deduction_rate: '', //抵扣比例 order: '', // 销量sales, 价格低到高price_asc, 价格高到低price_desc + rand: 1, } } }, @@ -615,7 +616,8 @@ limit: this.where.limit, sale_type: this.where.sale_type, keyword: this.where.keyword, - order: this.where.order + order: this.where.order, + rand: this.where.rand, } this.cate_change = 0; this.cate_change_children = 0; @@ -662,7 +664,7 @@ background: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/def/0bc7a202404021652194310.png' }, ...res.data]; }) - else getCategoryIndexList().then(res => { + else getCategoryIndexList({mer_type: this.where.mer_type, sale_type: this.where.sale_type}).then(res => { this.initStoreCate(res); }) },