Procházet zdrojové kódy

新增到店堂食,会员立减限制金额

1410417013 před 6 měsíci
rodič
revize
a1f9c35977
4 změnil soubory, kde provedl 248 přidání a 123 odebrání
  1. 3 2
      my/vip/index.vue
  2. 8 2
      my/vip/shop.vue
  3. 124 64
      pages/index/shop/confirmOrder.vue
  4. 113 55
      pages/index/shop/payOrder.vue

+ 3 - 2
my/vip/index.vue

@@ -13,6 +13,7 @@
 						<view class="u-font-10 text-bold" style="margin-top: 10rpx;color: #376477;margin-left: -20px;" v-if="vipExpirationTime && isVip">有效期:{{vipExpirationTime}}</view>
 						<view class="u-font-12 u-m-t-10 u-tips-color" style="color: #376477;margin-left: -20px;" v-if="!isVip">您目前还未开通会员
 						</view>
+						<!-- <view class="" style="color: #2A748D; font-size: 20px;">已省{{userName}}</view> -->
 					</view>
 				</view>
 				<image src="https://mxys.chuanghai-tech.com/wmfile/20251112/222489f5f1f24623b2dc8e93e836b5ca.png" style="width: 121px;height: 84px;float: right;margin-top: -120px;"></image>
@@ -52,7 +53,7 @@
 			<view style="width: 100%;height: 38rpx;"></view>
 			<view class="nuanxin" @click="natNuan()">领取会员</view>
 			<view style="margin-top: 38rpx;">
-				<image style="width: 100%;height: 179px;" @click="clickImg" src="https://mxys.chuanghai-tech.com/wmfile/20251124/3247849b2d2849229013d9c41d0b5d93.png"></image>
+				<image style="width: 100%;height: 179px;" @click="clickImg" src="https://mxys.chuanghai-tech.com/wmfile/20251130/41d16a4ba8b9440b8b8872d760fb1cbe.png"></image>
 			</view>
 		</view>
 		<view style="height: 110rpx;"></view>
@@ -244,7 +245,7 @@
 			clickImg(){
 				wx.previewImage({
 					urls: [], //需要预览的图片http链接列表,多张的时候,url直接写在后面就行了
-					current:'https://mxys.chuanghai-tech.com/wmfile/20251124/3247849b2d2849229013d9c41d0b5d93.png', // 当前显示图片的http链接,默认是第一个
+					current:'https://mxys.chuanghai-tech.com/wmfile/20251130/41d16a4ba8b9440b8b8872d760fb1cbe.png', // 当前显示图片的http链接,默认是第一个
 					success: function(res) {},
 					fail: function(res) {},
 					complete: function(res) {},

+ 8 - 2
my/vip/shop.vue

@@ -77,7 +77,7 @@
 										<view class="lable flex justify-center align-center" v-if="item.enableFullReductionFlag==0&&item.exemptMinMoney">
 											满{{item.exemptMinMoney}}免配送费</view>
 										<!-- <view class="lable flex justify-center align-center" v-if="item.exemptMinMoney">满{{item.exemptMinMoney}}免配送费</view> -->
-										<view v-for="(ite,ind) in item.shopActivityList" :key='ind' v-if="item.shopActivityList && ite.activityType!='1'">
+										<view v-for="(ite,ind) in item.shopActivityList" :key='ind' v-if="item.shopActivityList && ite.activityType!='1'&&item.vipPromotion=='0'">
 											<view class="lable flex justify-center align-center" style="border-radius: 8rpx;background-color: #ffffff;color: #FF0000;box-sizing: border-box;">
 												<text v-if="ite.activityType=='2'">时段</text>
 												<text v-if="ite.activityType=='3'">满额</text>
@@ -94,11 +94,17 @@
 											v-if="item.shopLable">
 											{{ite}}
 										</view>
-										<view class="lable flex justify-center align-center" v-if="item.couponList" style="border-radius: 8rpx;border: 1rpx solid #F97A7A;background-color: #ffffff;color: #FF0000;box-sizing: border-box;" v-for="(it,ide) in item.couponList" :key="ide">
+										<view class="lable flex justify-center align-center" v-if="item.couponList&&item.vipPromotion=='0'" style="border-radius: 8rpx;border: 1rpx solid #F97A7A;background-color: #ffffff;color: #FF0000;box-sizing: border-box;" v-for="(it,ide) in item.couponList" :key="ide">
 											<text>优惠券</text>
 											<text style="margin-left: 3px;">|</text>
 											<text style="margin-left: 3px;">满{{it.minMoney}}减{{it.money}}</text>
 										</view>
+										
+										<view class="lable flex justify-center align-center" v-if="item.vipPromotion=='1'" style="border-radius: 8rpx;border: 1rpx solid #F97A7A;background-color: #ffffff;color: #FF0000;box-sizing: border-box;">
+											<text>会员</text>
+											<text style="margin-left: 3px;">|</text>
+											<text style="margin-left: 3px;">{{item.vipPromotionDesc}}</text>
+										</view>
 										<!-- <view class="lable flex justify-center align-center" v-if="item.couponList" style="border-radius: 4rpx;border: 1rpx solid red;background-color: #ffffff;color: red;box-sizing: border-box;" v-for="(it,ide) in item.couponList" :key="ide">满{{it.minMoney}}减{{it.money}}</view> -->
 									</view>
 								</view>

+ 124 - 64
pages/index/shop/confirmOrder.vue

@@ -125,16 +125,30 @@
 				<view>会员立减</view>
 				<view class="tosend_header_do_ri">- ¥{{ Vipmoney.reduceAmount }}</view>
 			</view>
-			<view class="tosend_header_do justify-between do_bot" @click="isShow">
+			<view class="tosend_header_do justify-between do_bot" v-if="Vipmoney.canReduceFlag=='1'">
+				<view>优惠券</view>
+				<!-- <view class="tosend_header_do_ri" v-if="coupon">- ¥{{ coupon.money }}</view>
+				<view v-else>
+					<image src="../../../static/images/order/right1.png" style="width: 14rpx; height: 24rpx" mode=""></image>
+				</view> -->
+			</view>
+			<view class="tosend_header_do justify-between do_bot" @click="isShow" v-if="Vipmoney.canReduceFlag=='0'">
 				<view>优惠券</view>
 				<view class="tosend_header_do_ri" v-if="coupon">- ¥{{ coupon.money }}</view>
 				<view v-else>
 					<image src="../../../static/images/order/right1.png" style="width: 14rpx; height: 24rpx" mode=""></image>
 				</view>
 			</view>
-			<view class="tosend_header_do justify-between do_bot" @click="huodongShow">
+			<view class="tosend_header_do justify-between do_bot" v-if="Vipmoney.canReduceFlag=='1'">
 				<view>优惠活动</view>
-				<view class="tosend_header_do_ri" v-if="huodong">- ¥{{ huodong.discountAmount }}</view>
+				<!-- <view class="tosend_header_do_ri" v-if="huodong &&Vipmoney.canReduceFlag=='0'">- ¥{{ huodong.discountAmount }}</view>
+				<view v-else>
+					<image src="../../../static/images/order/right1.png" style="width: 14rpx; height: 24rpx" mode=""></image>
+				</view> -->
+			</view>
+			<view class="tosend_header_do justify-between do_bot" @click="huodongShow" v-if="Vipmoney.canReduceFlag=='0'">
+				<view>优惠活动</view>
+				<view class="tosend_header_do_ri" v-if="huodong &&Vipmoney.canReduceFlag=='0'">- ¥{{ huodong.discountAmount }}</view>
 				<view v-else>
 					<image src="../../../static/images/order/right1.png" style="width: 14rpx; height: 24rpx" mode=""></image>
 				</view>
@@ -143,7 +157,7 @@
 				<view class="tosend_header_do_le2">合计</view>
 				<view class="tosend_header_do_ri2">
 					<text>¥</text>
-					{{ totalPrice1 }}
+					{{ totalPrice12 }}
 				</view>
 			</view>
 		</view>
@@ -357,6 +371,7 @@ export default {
 			packMoney: 0, //打包费
 			totalPrice: 0,
 			totalPrice1: 0,
+			totalPrice12:0,
 			address: {
 				insideDeliveryFee: 0
 			}, //地址
@@ -472,7 +487,7 @@ export default {
 	},
 	onShow() {
 		this.getMsgData()
-		this.getvipMoney()
+		
 		this.addressId = this.addressId ? this.addressId : uni.getStorageSync('addressId')
 		if (this.addressId) {
 			console.log(this.addressId, '地址id')
@@ -520,19 +535,28 @@ export default {
 		  	}
 		  }
 		  
-		  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)
+		  let totalMoney =0
+		  if(this.Vipmoney.canReduceFlag=='1'){
+		  			  totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
+		  }else{
+		  			  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) 
+		  }
 		  
 		  if (totalMoney <= 0) {
-		  	this.totalPrice1 = 0.01
+		  	this.totalPrice12 = 0.01
 		  } else {
-		  	this.totalPrice1 = totalMoney
+		  	this.totalPrice12 = totalMoney
 		  }
 		},
 		//获取会员立减金额
 		getvipMoney() {
-			var shopId =this.shopId
-			this.$Request.get(`/app/vip/get-can-reduce/${shopId}`).then((res) => {
-				console.log(res, '会员立减')
+			let data = {
+				shopId: this.shopId,
+				userId: uni.getStorageSync('userId'),
+				originalPrice:this.totalPrice1
+			}
+			this.$Request.get('/app/vip/get-can-reduce',data).then((res) => {
+				console.log(res, '会员立减',data)
 				if (res.code == 0 && res.data) {
 					this.Vipmoney=res.data
 				}
@@ -540,10 +564,10 @@ export default {
 		},
 		getIntegralRules() {
 			let data = {
-				money: this.totalPrice1
+				money: this.totalPrice12
 			}
 			this.$Request.get('/app/userintegral/getIntegralByMoney', data).then((res) => {
-				console.log(res, '999')
+				console.log(res, '999',data)
 				if (res.code == 0) {
 					this.intergral = res.data.intergral
 					this.maxIntegral = res.data.maxIntegral
@@ -857,15 +881,18 @@ export default {
 					this.totalPrice1 = parseFloat(this.totalPrice).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)
-			).toFixed(2)
+			let totalMoney =0
+			if(this.Vipmoney.canReduceFlag=='1'){
+						  totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
+			}else{
+						  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) 
+			}
 			if (totalMoney <= 0) {
-				this.totalPrice1 = 0.01
+				this.totalPrice12 = 0.01
 			} else {
-				this.totalPrice1 = totalMoney
+				this.totalPrice12 = totalMoney
 			}
-			console.log(this.totalPrice1,'切换',totalMoney)
+			console.log(this.totalPrice12,'切换',totalMoney)
 			if (this.coupon) {
 				if (this.orderType == 2) {
 					this.totalPrice1 = parseFloat(
@@ -878,13 +905,16 @@ export default {
 						this.totalPrice1 = parseFloat(this.totalPrice).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)
-				).toFixed(2)
+				let totalMoney =0
+				if(this.Vipmoney.canReduceFlag=='1'){
+							  totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
+				}else{
+							  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) 
+				}
 				if (totalMoney <= 0) {
-					this.totalPrice1 = 0.01
+					this.totalPrice12 = 0.01
 				} else {
-					this.totalPrice1 = totalMoney
+					this.totalPrice12 = totalMoney
 				}
 			}
 
@@ -900,13 +930,16 @@ export default {
 						this.totalPrice1 = parseFloat(this.totalPrice).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)
-				).toFixed(2)
+				let totalMoney =0
+				if(this.Vipmoney.canReduceFlag=='1'){
+							  totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
+				}else{
+							  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) 
+				}
 				if (totalMoney <= 0) {
-					this.totalPrice1 = 0.01
+					this.totalPrice12 = 0.01
 				} else {
-					this.totalPrice1 = totalMoney
+					this.totalPrice12 = totalMoney
 				}
 			}if (this.Vipmoney.canReduceFlag=='1') {
 				if (this.orderType == 2) {
@@ -920,13 +953,16 @@ export default {
 						this.totalPrice1 = parseFloat(this.totalPrice).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)
-				).toFixed(2)
+				let totalMoney =0
+				if(this.Vipmoney.canReduceFlag=='1'){
+							  totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
+				}else{
+							  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) 
+				}
 				if (totalMoney <= 0) {
-					this.totalPrice1 = 0.01
+					this.totalPrice12 = 0.01
 				} else {
-					this.totalPrice1 = totalMoney
+					this.totalPrice12 = totalMoney
 				}
 			}
 		},
@@ -953,12 +989,16 @@ export default {
 				}
 			}
 
-			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)
-
+			let totalMoney =0
+			if(this.Vipmoney.canReduceFlag=='1'){
+						  totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
+			}else{
+						  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) 
+			}
 			if (totalMoney <= 0) {
-				this.totalPrice1 = 0.01
+				this.totalPrice12 = 0.01
 			} else {
-				this.totalPrice1 = totalMoney
+				this.totalPrice12 = totalMoney
 			}
 
 			let data = {
@@ -983,11 +1023,16 @@ export default {
 					this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
 				}
 			}
-			let totalMoney = parseFloat(this.totalPrice1 - (this.huodong.discountAmount ? this.huodong.discountAmount : 0) - (this.coupon.money ? this.coupon.money : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
+			let totalMoney =0
+			if(this.Vipmoney.canReduceFlag=='1'){
+						  totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
+			}else{
+						  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) 
+			}
 			if (totalMoney <= 0) {
-				this.totalPrice1 = 0.01
+				this.totalPrice12 = 0.01
 			} else {
-				this.totalPrice1 = totalMoney
+				this.totalPrice12 = totalMoney
 			}
 			this.youhui = false
 		},
@@ -1023,14 +1068,17 @@ export default {
 								}
 							}
 
-							let totalMoney = parseFloat(
-								this.totalPrice1 - (this.huodong.discountAmount ? this.huodong.discountAmount : 0) - (this.coupon.money ? this.coupon.money : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)
-							).toFixed(2)
+							let totalMoney =0
+							if(this.Vipmoney.canReduceFlag=='1'){
+										  totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
+							}else{
+										  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) 
+							}
 
 							if (totalMoney <= 0) {
-								this.totalPrice1 = 0.01
+								this.totalPrice12 = 0.01
 							} else {
-								this.totalPrice1 = totalMoney
+								this.totalPrice12 = totalMoney
 							}
 							uni.showModal({
 								title: '提示',
@@ -1072,14 +1120,17 @@ export default {
 								}
 							}
 
-							let totalMoney = parseFloat(
-								this.totalPrice1 - (this.huodong.discountAmount ? this.huodong.discountAmount : 0) - (this.coupon.money ? this.coupon.money : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)
-							).toFixed(2)
+							let totalMoney =0
+							if(this.Vipmoney.canReduceFlag=='1'){
+										  totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
+							}else{
+										  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) 
+							}
 
 							if (totalMoney <= 0) {
-								this.totalPrice1 = 0.01
+								this.totalPrice12 = 0.01
 							} else {
-								this.totalPrice1 = totalMoney
+								this.totalPrice12 = totalMoney
 							}
 							uni.showModal({
 								title: '提示',
@@ -1138,6 +1189,7 @@ export default {
 			})
 			this.paotuiMoney = 0
 			this.totalPrice1 = 0
+			this.totalPrice12=0
 
 			if (this.status == 0) {
 				console.log(6666)
@@ -1201,20 +1253,25 @@ export default {
 							this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
 						}
 					}
-					let totalMoney = parseFloat(
-						this.totalPrice1 - (this.huodong.discountAmount ? this.huodong.discountAmount : 0) - (this.coupon.money ? this.coupon.money : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)
-					).toFixed(2)
-					if (totalMoney <= 0) {
-						this.totalPrice1 = 0.01
-					} else {
-						this.totalPrice1 = totalMoney
-					}
+					
 
 					// console.log(this.dataList)
+					this.getvipMoney()
 					this.getCouponList()
 					this.getHuoList()
 					this.detCoupon()
 					this.getDistance()
+					let totalMoney =0
+					if(this.Vipmoney.canReduceFlag=='1'){
+								  totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
+					}else{
+								  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) 
+					}
+					if (totalMoney <= 0) {
+						this.totalPrice12 = 0.01
+					} else {
+						this.totalPrice12 = totalMoney
+					}
 				}
 				// 加载提示关闭
 				uni.hideLoading()
@@ -1269,14 +1326,17 @@ export default {
 							this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
 						}
 					}
-					let totalMoney = parseFloat(
-						this.totalPrice1 - (this.huodong.discountAmount ? this.huodong.discountAmount : 0) - (this.coupon.money ? this.coupon.money : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)
-					).toFixed(2)
+					let totalMoney =0
+					if(this.Vipmoney.canReduceFlag=='1'){
+								  totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
+					}else{
+								  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) 
+					}
 					
 					if (totalMoney <= 0) {
-						this.totalPrice1 = 0.01
+						this.totalPrice12 = 0.01
 					} else {
-						this.totalPrice1 = totalMoney
+						this.totalPrice12 = totalMoney
 					}
 
 					// console.log(this.dataList)

+ 113 - 55
pages/index/shop/payOrder.vue

@@ -117,14 +117,28 @@
 				<view>会员立减</view>
 				<view class="tosend_header_do_ri">- ¥{{ Vipmoney.reduceAmount }}</view>
 			</view>
-			<view class="tosend_header_do justify-between do_bot" @click="isShow">
+			<view class="tosend_header_do justify-between do_bot" v-if="Vipmoney.canReduceFlag=='1'">
+				<view>优惠券</view>
+				<!-- <view class="tosend_header_do_ri" v-if="coupon">- ¥{{ coupon.money }}</view>
+				<view v-else>
+					<image src="../../../static/images/order/right1.png" style="width: 14rpx; height: 24rpx" mode=""></image>
+				</view> -->
+			</view>
+			<view class="tosend_header_do justify-between do_bot" @click="isShow" v-if="Vipmoney.canReduceFlag=='0'">
 				<view>优惠券</view>
 				<view class="tosend_header_do_ri" v-if="coupon">- ¥{{ coupon.money }}</view>
 				<view v-else>
 					<image src="../../../static/images/order/right1.png" style="width: 14rpx; height: 24rpx" mode=""></image>
 				</view>
 			</view>
-			<view class="tosend_header_do justify-between do_bot" @click="huodongShow">
+			<view class="tosend_header_do justify-between do_bot" v-if="Vipmoney.canReduceFlag=='1'">
+				<view>优惠活动</view>
+				<!-- <view class="tosend_header_do_ri" v-if="huodong">- ¥{{ huodong.discountAmount }}</view>
+				<view v-else>
+					<image src="../../../static/images/order/right1.png" style="width: 14rpx; height: 24rpx" mode=""></image>
+				</view> -->
+			</view>
+			<view class="tosend_header_do justify-between do_bot" @click="huodongShow" v-if="Vipmoney.canReduceFlag=='0'">
 				<view>优惠活动</view>
 				<view class="tosend_header_do_ri" v-if="huodong">- ¥{{ huodong.discountAmount }}</view>
 				<view v-else>
@@ -135,7 +149,7 @@
 				<view class="tosend_header_do_le2">合计</view>
 				<view class="tosend_header_do_ri2">
 					<text>¥</text>
-					{{ totalPrice1 }}
+					{{ totalPrice12 }}
 				</view>
 			</view>
 		</view>
@@ -343,6 +357,7 @@ export default {
 			packMoney: 0, //打包费
 			totalPrice: 0,
 			totalPrice1: 0,
+			totalPrice12:0,
 			address: {
 				insideDeliveryFee: 0
 			}, //地址
@@ -456,7 +471,6 @@ export default {
 		}
 	},
 	onShow() {
-		this.getvipMoney()
 		this.getMsgData()
 		
 		this.addressId = this.addressId ? this.addressId : uni.getStorageSync('addressId')
@@ -501,19 +515,29 @@ export default {
 		  		this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
 		  	}
 		  }
+		  let totalMoney =0
+		  if(this.Vipmoney.canReduceFlag=='1'){
+			  totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
+		  }else{
+			  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) 
+		  }
+		  
 		  
-		  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)
 		  
 		  if (totalMoney <= 0) {
-		  	this.totalPrice1 = 0.01
+		  	this.totalPrice12 = 0.01
 		  } else {
-		  	this.totalPrice1 = totalMoney
+		  	this.totalPrice12 = totalMoney
 		  }
 		},
 		//获取会员立减金额
 		getvipMoney() {
-			var shopId =this.shopId
-			this.$Request.get(`/app/vip/get-can-reduce/${shopId}`).then((res) => {
+			let data = {
+				shopId: this.shopId,
+				userId: uni.getStorageSync('userId'),
+				originalPrice:this.totalPrice1
+			}
+			this.$Request.get('/app/vip/get-can-reduce',data).then((res) => {
 				console.log(res, '会员立减')
 				if (res.code == 0 && res.data) {
 					this.Vipmoney=res.data
@@ -522,7 +546,7 @@ export default {
 		},
 		getIntegralRules() {
 			let data = {
-				money: this.totalPrice1
+				money: this.totalPrice12
 			}
 			this.$Request.get('/app/userintegral/getIntegralByMoney', data).then((res) => {
 				console.log(res, '999')
@@ -847,13 +871,16 @@ export default {
 					this.totalPrice1 = parseFloat(this.totalPrice).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)
-			).toFixed(2)
+			let totalMoney =0
+			if(this.Vipmoney.canReduceFlag=='1'){
+						  totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
+			}else{
+						  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) 
+			}
 			if (totalMoney <= 0) {
-				this.totalPrice1 = 0.01
+				this.totalPrice12 = 0.01
 			} else {
-				this.totalPrice1 = totalMoney
+				this.totalPrice12 = totalMoney
 			}
 			if (this.coupon) {
 				if (this.orderType == 2) {
@@ -865,13 +892,16 @@ export default {
 						this.totalPrice1 = parseFloat(this.totalPrice).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)
-				).toFixed(2)
+				let totalMoney =0
+				if(this.Vipmoney.canReduceFlag=='1'){
+							  totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
+				}else{
+							  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) 
+				}
 				if (totalMoney <= 0) {
-					this.totalPrice1 = 0.01
+					this.totalPrice12 = 0.01
 				} else {
-					this.totalPrice1 = totalMoney
+					this.totalPrice12 = totalMoney
 				}
 			}
 
@@ -885,13 +915,16 @@ export default {
 						this.totalPrice1 = parseFloat(this.totalPrice).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)
-				).toFixed(2)
+				let totalMoney =0
+				if(this.Vipmoney.canReduceFlag=='1'){
+							  totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
+				}else{
+							  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) 
+				}
 				if (totalMoney <= 0) {
-					this.totalPrice1 = 0.01
+					this.totalPrice12 = 0.01
 				} else {
-					this.totalPrice1 = totalMoney
+					this.totalPrice12 = totalMoney
 				}
 			}if (this.Vipmoney.canReduceFlag=='1') {
 				if (this.orderType == 2) {
@@ -903,13 +936,16 @@ export default {
 						this.totalPrice1 = parseFloat(this.totalPrice).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)
-				).toFixed(2)
+				let totalMoney =0
+				if(this.Vipmoney.canReduceFlag=='1'){
+							  totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
+				}else{
+							  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) 
+				}
 				if (totalMoney <= 0) {
-					this.totalPrice1 = 0.01
+					this.totalPrice12 = 0.01
 				} else {
-					this.totalPrice1 = totalMoney
+					this.totalPrice12 = totalMoney
 				}
 			}
 		},
@@ -935,12 +971,16 @@ export default {
 					this.totalPrice1 = parseFloat(this.totalPrice).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)
-
+			let totalMoney =0
+			if(this.Vipmoney.canReduceFlag=='1'){
+						  totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
+			}else{
+						  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) 
+			}
 			if (totalMoney <= 0) {
-				this.totalPrice1 = 0.01
+				this.totalPrice12 = 0.01
 			} else {
-				this.totalPrice1 = totalMoney
+				this.totalPrice12 = totalMoney
 			}
 
 			let data = {
@@ -969,12 +1009,17 @@ export default {
 				}
 			}
 
-			let totalMoney = parseFloat(this.totalPrice1 - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
+			let totalMoney =0
+			if(this.Vipmoney.canReduceFlag=='1'){
+						  totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
+			}else{
+						  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) 
+			}
 
 			if (totalMoney <= 0) {
-				this.totalPrice1 = 0.01
+				this.totalPrice12 = 0.01
 			} else {
-				this.totalPrice1 = totalMoney
+				this.totalPrice12 = totalMoney
 			}
 			this.youhui = false
 		},
@@ -1006,14 +1051,17 @@ export default {
 								}
 							}
 
-							let totalMoney = parseFloat(
-								this.totalPrice1 - (this.huodong.discountAmount ? this.huodong.discountAmount : 0) - (this.coupon.money ? this.coupon.money : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)
-							).toFixed(2)
+							let totalMoney =0
+							if(this.Vipmoney.canReduceFlag=='1'){
+										  totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
+							}else{
+										  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) 
+							}
 
 							if (totalMoney <= 0) {
-								this.totalPrice1 = 0.01
+								this.totalPrice12 = 0.01
 							} else {
-								this.totalPrice1 = totalMoney
+								this.totalPrice12 = totalMoney
 							}
 							uni.showModal({
 								title: '提示',
@@ -1054,14 +1102,17 @@ export default {
 								}
 							}
 
-							let totalMoney = parseFloat(
-								this.totalPrice1 - (this.huodong.discountAmount ? this.huodong.discountAmount : 0) - (this.coupon.money ? this.coupon.money : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)
-							).toFixed(2)
+							let totalMoney =0
+							if(this.Vipmoney.canReduceFlag=='1'){
+										  totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
+							}else{
+										  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) 
+							}
 							
 							if (totalMoney <= 0) {
-								this.totalPrice1 = 0.01
+								this.totalPrice12 = 0.01
 							} else {
-								this.totalPrice1 = totalMoney
+								this.totalPrice12 = totalMoney
 							}
 							uni.showModal({
 								title: '提示',
@@ -1090,6 +1141,7 @@ export default {
 		getOrderList() {
 			this.paotuiMoney = 0
 			this.totalPrice1 = 0
+			this.totalPrice12=0
 			let data = {
 				orderId: this.orderId
 			}
@@ -1137,21 +1189,27 @@ export default {
 							this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
 						}
 					}
-					let totalMoney = parseFloat(
-						this.totalPrice1 - (this.huodong.discountAmount ? this.huodong.discountAmount : 0) - (this.coupon.money ? this.coupon.money : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)
-					).toFixed(2) 
 					
-					if (totalMoney <= 0) {
-						this.totalPrice1 = 0.01
-					} else {
-						this.totalPrice1 = totalMoney
-					}
 					console.log(this.dataList)
 
+					this.getvipMoney()
 					this.getCouponList()
 					this.getHuoList()
 					this.detCoupon()
 					this.getDistance()
+					let totalMoney =0
+					if(this.Vipmoney.canReduceFlag=='1'){
+								  totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
+					}else{
+								  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) 
+					}
+					
+					if (totalMoney <= 0) {
+						this.totalPrice12 = 0.01
+					} else {
+						this.totalPrice12 = totalMoney
+					}
+					
 				}
 			})
 		},