Przeglądaj źródła

fix: 调整部分功能模块

wenxingxing 14 godzin temu
rodzic
commit
9368c13c1e
1 zmienionych plików z 5 dodań i 4 usunięć
  1. 5 4
      pages_company/managerOrder/productDetails.vue

+ 5 - 4
pages_company/managerOrder/productDetails.vue

@@ -149,7 +149,7 @@
 
 				<!-- 规格 -->
 				<view class="spec-box">
-					<view v-for="(item,index) in attrs" :key="index">
+					<view v-for="(item,index) in attrs" :key="item.id">
 						<view class="title">{{item.attrName}}</view>
 						<view class="spec-list">
 							<view v-for="(subItem,subindex) in item.values" :key="subindex"
@@ -438,7 +438,7 @@ import CustomToast from '@/components/custom-toast.vue';
 						this.loadding = false
 						if (res.code == 200) {
 							this.product = res.product;
-							this.remainingPurchaseLimit = res.remainingPurchaseLimit;
+							this.remainingPurchaseLimit = res.product.purchaseLimit;
 							this.singlePurchaseLimit = res.product.singlePurchaseLimit!==0?res.product.singlePurchaseLimit:null
 							// 如果接口返回了总限购数量和已购买数量,也保存
 							if (res.product.purchaseLimit !== null) {
@@ -550,8 +550,9 @@ import CustomToast from '@/components/custom-toast.vue';
 			},
 			// 规格选择
 			choseSpec(index, subIndex) {
-				this.attrs[index].index = subIndex;
-				this.$forceUpdate();
+				// this.attrs[index].index = subIndex;
+				this.$set(this.attrs[index], 'index', subIndex);
+				// this.$forceUpdate();
 				let productAttr = this.attrs;
 				let values = [];
 				for (let i = 0; i < productAttr.length; i++) {