From b97398d075ee3a6880be3b899fe50f545eff7dfa Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Fri, 15 Dec 2023 19:52:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/shortPopup.vue | 2 +- pages/nongKe/cloud_entrepot/indexb.vue | 15 ++++++++++++--- pages/nongKe/supply_chain/shopping_trolley_a.vue | 4 ++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/components/shortPopup.vue b/components/shortPopup.vue index f3e1124..77a9cbc 100644 --- a/components/shortPopup.vue +++ b/components/shortPopup.vue @@ -230,7 +230,7 @@ product_attr_unique: this.sku[this.changeSkuKey].unique, product_id: this.datas.product_id, product_type: this.datas.product_type, - source: this.source||200, // 200-供货采购 + source: this.source||13, // 13-供货采购 spread_id: "", } let that = this diff --git a/pages/nongKe/cloud_entrepot/indexb.vue b/pages/nongKe/cloud_entrepot/indexb.vue index aafb73e..e1dcd54 100644 --- a/pages/nongKe/cloud_entrepot/indexb.vue +++ b/pages/nongKe/cloud_entrepot/indexb.vue @@ -380,6 +380,12 @@ type: 2 }) this.cloudList = data; + this.cloudList.unshift({ + cate_name: '全部', + children: [], + pic: "https://lihai001.oss-cn-chengdu.aliyuncs.com/def/de2be202312151001024597.png", + store_category_id: -1 + }) this.cloudList.forEach((item)=>{ item.children.unshift({ cate_name: '全部', @@ -716,7 +722,8 @@ order: this.storeParam.order, keyword: this.storeParam.keyword }; - if(!this.merchantTow.pid) query.cate_pid = this.storeParam.category_id; // 全部是查询一级分类pid + if(this.storeParam.category_id==-1) null; + else if(!this.merchantTow.pid) query.cate_pid = this.storeParam.category_id; // 全部是查询一级分类pid else query.cate_id = this.storeParam.category_id; // 否则查询二级分类 getProductslist(query).then((res)=>{ // console.log(res); @@ -765,7 +772,8 @@ // 购物车信息 cartFn() { getCartList({ - product_type: 98 + product_type: 98, + source: 13 }).then(res => { this.totalMoney = 0 this.cartList = res.data.list @@ -777,7 +785,8 @@ this.totalMoney = this.totalMoney.toFixed(2) }) getCartCounts({ - product_type: 98 + product_type: 98, + source: 13 }).then(res => { this.goodsNum = res.data[0].count }) diff --git a/pages/nongKe/supply_chain/shopping_trolley_a.vue b/pages/nongKe/supply_chain/shopping_trolley_a.vue index 846c1d2..f452fb3 100644 --- a/pages/nongKe/supply_chain/shopping_trolley_a.vue +++ b/pages/nongKe/supply_chain/shopping_trolley_a.vue @@ -680,7 +680,7 @@ }, getCartNum: function() { let that = this; - getCartCounts({ product_type: 98 }).then(res => { + getCartCounts({ product_type: 98, source: 13 }).then(res => { // console.log(res); that.cartTotalCount = res.data[0].count || 0; }); @@ -688,7 +688,7 @@ // 购物车列表 getCartList: function(isChange) { let that = this; - getCartList({ product_type: 98 }).then(res => { + getCartList({ product_type: 98, source: 13 }).then(res => { this.type_id=res.data?.list[0]?.type_id||[] res.data.list.forEach((item, index) => { item.allCheck = true