Browse Source

更新会员专区和到店取餐价格

1410417013 7 months ago
parent
commit
75a8ee299f
3 changed files with 40 additions and 1 deletions
  1. 2 1
      my/vip/shop.vue
  2. 23 0
      pages/index/shop/confirmOrder.vue
  3. 15 0
      pages/index/shop/payOrder.vue

+ 2 - 1
my/vip/shop.vue

@@ -331,6 +331,7 @@
 					shopTypeId: this.shopTypeId,
 					lng: uni.getStorageSync('lng'),
 					lat: uni.getStorageSync('lat'),
+					vipPromotion:1 
 					// activityId: this.activityId,
 				}
 				console.log(data,'输入数据') 
@@ -340,7 +341,7 @@
 						console.log(res.data.list)
 						this.totalCount = res.data.totalCount
 						// 先筛选出 vipPromotion 为 1 的数据
-						const vipPromotionList = res.data.list.filter(ret => ret.vipPromotion === '1');
+						const vipPromotionList = res.data.list//.filter(ret => ret.vipPromotion === '1');
 						vipPromotionList.forEach(ret => {
 							if (ret.distance > 1000) {
 								ret.distance = Number((ret.distance / 1000)).toFixed(2) + "km"

+ 23 - 0
pages/index/shop/confirmOrder.vue

@@ -817,7 +817,15 @@ export default {
 			} else {
 				this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
 			}
+			console.log(this.totalPrice1,'切换')
 			if (this.coupon) {
+				if (this.orderType == 2) {
+					this.totalPrice1 = parseFloat(
+						parseFloat(this.totalPrice) + parseFloat(this.paotuiMoney) + parseFloat(this.dabaoMoney) + parseFloat(this.address.insideDeliveryFee)
+					).toFixed(2)
+				} else {
+					this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
+				}
 				let totalMoney = parseFloat(
 					this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0).toFixed(2)
 				)
@@ -829,6 +837,13 @@ export default {
 			}
 
 			if (this.huodong) {
+				if (this.orderType == 2) {
+					this.totalPrice1 = parseFloat(
+						parseFloat(this.totalPrice) + parseFloat(this.paotuiMoney) + parseFloat(this.dabaoMoney) + parseFloat(this.address.insideDeliveryFee)
+					).toFixed(2)
+				} else {
+					this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
+				}
 				let totalMoney = parseFloat(
 					this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0).toFixed(2)
 				)
@@ -838,9 +853,17 @@ export default {
 					this.totalPrice1 = totalMoney
 				}
 			}if (this.Vipmoney.canReduceFlag=='1') {
+				if (this.orderType == 2) {
+					this.totalPrice1 = parseFloat(
+						parseFloat(this.totalPrice) + parseFloat(this.paotuiMoney) + parseFloat(this.dabaoMoney) + parseFloat(this.address.insideDeliveryFee)
+					).toFixed(2)
+				} else {
+					this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
+				}
 				let totalMoney = parseFloat(
 					this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0).toFixed(2)
 				)
+				console.log(this.totalPrice1,this.coupon.money,this.Vipmoney.reduceAmount,totalMoney,'totalMoney')
 				if (totalMoney <= 0) {
 					this.totalPrice1 = 0.01
 				} else {

+ 15 - 0
pages/index/shop/payOrder.vue

@@ -793,6 +793,11 @@ export default {
 				this.totalPrice1 = parseFloat(this.totalPrice + this.dabaoMoney).toFixed(2)
 			}
 			if (this.coupon) {
+				if (this.orderType == 2) {
+					this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
+				} else {
+					this.totalPrice1 = parseFloat(this.totalPrice + this.dabaoMoney).toFixed(2)
+				}
 				let totalMoney = parseFloat(
 					this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0).toFixed(2)
 				)
@@ -804,6 +809,11 @@ export default {
 			}
 
 			if (this.huodong) {
+				if (this.orderType == 2) {
+					this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
+				} else {
+					this.totalPrice1 = parseFloat(this.totalPrice + this.dabaoMoney).toFixed(2)
+				}
 				let totalMoney = parseFloat(
 					this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0).toFixed(2)
 				)
@@ -813,6 +823,11 @@ export default {
 					this.totalPrice1 = totalMoney
 				}
 			}if (this.Vipmoney.canReduceFlag=='1') {
+				if (this.orderType == 2) {
+					this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
+				} else {
+					this.totalPrice1 = parseFloat(this.totalPrice + this.dabaoMoney).toFixed(2)
+				}
 				let totalMoney = parseFloat(
 					this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0).toFixed(2)
 				)