From 77902b94c60f832e6321954941a0190346fbfc7f Mon Sep 17 00:00:00 2001 From: dongjian <315328220@qq.com> Date: Fri, 10 Oct 2025 14:42:35 +0800 Subject: [PATCH] no message --- pages/other_package/productInfo/productInfo.vue | 15 ++++++++++----- utils/config.js | 4 ++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/pages/other_package/productInfo/productInfo.vue b/pages/other_package/productInfo/productInfo.vue index 68ef7a2..9aec6d7 100644 --- a/pages/other_package/productInfo/productInfo.vue +++ b/pages/other_package/productInfo/productInfo.vue @@ -163,7 +163,7 @@ :class="oItem.inventory === 0 ? 'item_Warp item_Warp_no_warp' : item.selectVal === oItem.n ? 'item_Warp item_Warp_yes_warp' : 'item_Warp'" v-for="(oItem, oIndex) in item.items" :key="oItem.n" - @click="clickSpecification(index,item, oItem)" + @click="clickSpecification(oIndex,item, oItem)" > {{ oItem.n }} @@ -439,18 +439,23 @@ export default { }, //改变规格的样式 clickSpecification(pIndex,item, oItem) { - console.log("改变规格的样式",item,oItem,this.specificationTempl) + console.log("改变规格的样式",pIndex,item,oItem,this.specificationTempl,this.specificationList) - const currentSelectSpecification = this.specificationTempl.find(ele=>ele.combTypes == item.type && ele.combNames == oItem.n); + const currentSelectSpecification = this.specificationTempl[pIndex]; + console.log("当前规格",currentSelectSpecification) this.orderInfo.quantity = currentSelectSpecification?.minBuyNum || 1; - this.specificationList[pIndex].selectVal = oItem.n; + this.specificationList[0].selectVal = oItem.n; + + this.selectSpecificationTempl = currentSelectSpecification; + this.orderInfo.inventory = currentSelectSpecification.stock; // 库存 // 计算规格的价格 - this.selectSpecificationFun(pIndex, oItem); + // this.selectSpecificationFun(pIndex, oItem); }, // 选择规格 selectSpecificationFun(index, item) { + console.log('selectSpecificationTempl',) const currentSelectSpecification = this.selectSpecification; currentSelectSpecification[index] = item.n; this.selectSpecification = currentSelectSpecification; diff --git a/utils/config.js b/utils/config.js index 7e63461..c78487b 100644 --- a/utils/config.js +++ b/utils/config.js @@ -2,9 +2,9 @@ // export const BASE_URL="https://frontend.jdns360.com/api"; // 正式环境 // export const BASE_URL="http://cl55un59859.vicp.fun:24346"; // 测试环境 -export const BASE_URL = "https://api.tbmall.xin"; //生产 +// export const BASE_URL = "https://api.tbmall.xin"; //生产 // export const BASE_URL ='http://api.hm.a-d.work:6880' // 测试 -// export const BASE_URL ='http://api.outer.tbmall.xin:6880' // 本地测试 +export const BASE_URL ='http://api.outer.tbmall.xin:6880' // 本地测试