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