Sfoglia il codice sorgente

commit -m 修复 商品已售罄 会员机构可以下单的操作

zhengjinyi 4 anni fa
parent
commit
d55c0dbd5e
1 ha cambiato i file con 9 aggiunte e 12 eliminazioni
  1. 9 12
      pages/goods/product.vue

+ 9 - 12
pages/goods/product.vue

@@ -411,27 +411,24 @@
 						this.retailPrice = this.product.retailPrice.toFixed(2);
 						this.buyRetailPrice = this.product.retailPrice;
 					}
+					
 					//处理下架商品和售罄商品
-					if(this.product.validFlag =='3' || this.product.validFlag =='10' || this.stock == 0 ){
+					
+					if(this.product.validFlag =='3' || this.product.validFlag =='10' || this.stock == 0 || this.product.price1TextFlag == "1"){
 						this.disabled = true
 						this.isNoneDisabled = true
-					}else{
-						this.disabled = false
-						this.isNoneDisabled = false
-						this.goodsData.disabledText = ''
-					}
-					if(this.product.price1TextFlag == "1"){
-						this.disabled = true
-					}
-					if(this.product.price1TextFlag == "2"){
-						if(this.userIdentity == 4){	
+					}else if(this.product.price1TextFlag == "2"){
+						if(this.userIdentity == 4){
 							this.disabled = true
 						}else{
 							this.disabled = false
 						}
+					}else{
+						this.disabled = false
+						this.isNoneDisabled = false
+						this.goodsData.disabledText = ''
 					}
 					this.goodsData.disabled = this.disabled
-					console.log('this.goodsData.disabled',this.goodsData.disabled)
 					this.goodsData.isNoneDisabled = this.isNoneDisabled
 					if(this.product.validFlag =='3'){
 						this.goodsData.disabledText = '下架'