From dcf5974380356bb2344d9f0d0852817748f6440b Mon Sep 17 00:00:00 2001 From: wuhui_zzw <1760308791@qq.com> Date: Mon, 22 Apr 2024 18:17:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E9=94=99=E8=AF=AF=20=E5=AF=BC=E8=87=B4=E6=99=AE=E9=80=9A?= =?UTF-8?q?=E5=95=86=E5=93=81=E4=B8=8B=E5=8D=95=E6=97=B6=E6=8A=A5=E9=94=99?= =?UTF-8?q?=EF=BC=8C=E5=95=86=E5=93=81ID=E4=B8=8D=E5=AD=98=E5=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/goods_details/index.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pages/goods_details/index.vue b/pages/goods_details/index.vue index 20df12b..aca1490 100644 --- a/pages/goods_details/index.vue +++ b/pages/goods_details/index.vue @@ -1486,9 +1486,10 @@ // 获取商品ID - let productId = that.id; - if(that.send_province_info) productId = that.send_province_info.product_id; - + let sendProvinceInfoProductId = that.send_province_info.product_id || 0; + let productId = Number(sendProvinceInfoProductId) > 0 ? sendProvinceInfoProductId : that.id; + console.log("发货商户信息", that.send_province_info); + console.log("最终商品ID", productId); let q = { is_new: news === undefined ? 0 : 1, product_id: productId, @@ -1500,6 +1501,7 @@ province_here_id: that.current_province_info.mer_id || 0,// 当前所在地址绑定商户id province_send_id: that.send_province_info.mer_id || 0,// 发货地址绑定商户id }; + console.log("提交信息", q); postCartAdd(q).then(function (res) { that.isOpen = that.attr.cartAttr = false; let cartId = res.data.cart_id