Fix:4726 【旅居商城小程序】点击“产品”类目下方商品的加购图标后,千县攻略、资讯类目的数据加载失败

This commit is contained in:
LinCyJang
2025-12-16 19:47:44 +08:00
parent 0292dbd056
commit 5ec97e99b8
+5 -5
View File
@@ -14,7 +14,7 @@ export default {
isOpen: false,
attrTxt: '',
attrValue: '',
id: null,
m_id: null,
productValueArr: [],
attr: {
cartAttr: false,
@@ -51,7 +51,7 @@ export default {
}
},
getSkuActiveStatus(selectedSku) {
getProductSkuBySelected({ id: this.id, selectedSku }).then(res => {
getProductSkuBySelected({ id: this.m_id, selectedSku }).then(res => {
const { success, data } = res
if (success) {
for (const key in data) {
@@ -75,7 +75,7 @@ export default {
})
},
productCon() {
getProductDetail(this.id).then(res => {
getProductDetail(this.m_id).then(res => {
const { data } = res
this.storeInfo = {...data.storeInfo}
if(data.storeInfo.stock === 0) {
@@ -235,7 +235,7 @@ export default {
// 点击加入购物车按钮
addToCart(item, id = 'id') {
console.log(item, 'addToCart --------- item');
this.id = item[id]
this.m_id = item[id]
this.$nextTick(() => {
this.productCon()
@@ -259,7 +259,7 @@ export default {
return
}
const q = {
productId: this.id,
productId: this.m_id,
cartNum: this.attr.productSelect.cart_num,
new: 0,
uniqueId: this.attr.productSelect !== undefined ? this.attr.productSelect.unique : ''