使用优惠券价格
This commit is contained in:
		
							parent
							
								
									390bda7c0e
								
							
						
					
					
						commit
						4c8e2ba4b6
					
				@ -309,7 +309,7 @@ export default {
 | 
				
			|||||||
		},
 | 
							},
 | 
				
			||||||
		setTotalPrice() {
 | 
							setTotalPrice() {
 | 
				
			||||||
			const goods = this.orderInfo.store_goods_total;
 | 
								const goods = this.orderInfo.store_goods_total;
 | 
				
			||||||
			let freight = 0, price = 0, minPrice;
 | 
								let [freight, price, minPrice] = [0, 0, 0];
 | 
				
			||||||
			// 运费
 | 
								// 运费
 | 
				
			||||||
			for (const key in this.freight) {
 | 
								for (const key in this.freight) {
 | 
				
			||||||
				if (this.freight.hasOwnProperty(key)) {
 | 
									if (this.freight.hasOwnProperty(key)) {
 | 
				
			||||||
@ -346,7 +346,9 @@ export default {
 | 
				
			|||||||
			if(JSON.stringify(this.choiceCoupon) != '{}') price -= Number(this.choiceCoupon.voucher_price);
 | 
								if(JSON.stringify(this.choiceCoupon) != '{}') price -= Number(this.choiceCoupon.voucher_price);
 | 
				
			||||||
			// 每个店铺最低付款 0.01
 | 
								// 每个店铺最低付款 0.01
 | 
				
			||||||
			if(price <= minPrice) price = minPrice;
 | 
								if(price <= minPrice) price = minPrice;
 | 
				
			||||||
			// console.log(price);
 | 
								console.log("minPrice" + minPrice);
 | 
				
			||||||
 | 
								console.log("freight:" + freight);
 | 
				
			||||||
 | 
								console.log("price:" + price);
 | 
				
			||||||
			this.totalPrice = (price + freight).toFixed(2);
 | 
								this.totalPrice = (price + freight).toFixed(2);
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		setDelivery(index) {
 | 
							setDelivery(index) {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user