|
|
@@ -104,6 +104,10 @@
|
|
|
<view>特殊地址跑腿费</view>
|
|
|
<view class="tosend_header_do_ri">¥{{ address.insideDeliveryFee }}</view>
|
|
|
</view>
|
|
|
+ <view class="tosend_header_do justify-between" v-if="Vipmoney.canReduceFlag=='1'">
|
|
|
+ <view>会员立减</view>
|
|
|
+ <view class="tosend_header_do_ri">- ¥{{ Vipmoney.reduceAmount }}</view>
|
|
|
+ </view>
|
|
|
<view class="tosend_header_do justify-between do_bot" @click="isShow">
|
|
|
<view>优惠券</view>
|
|
|
<view class="tosend_header_do_ri" v-if="coupon">- ¥{{ coupon.money }}</view>
|
|
|
@@ -341,6 +345,11 @@ export default {
|
|
|
coupon: '',
|
|
|
shopDet: '',
|
|
|
huodong: '', //选择的活动信息
|
|
|
+ Vipmoney:{
|
|
|
+ canReduceFlag:'0',
|
|
|
+ reduceAmount:0,
|
|
|
+ vipReduceDesc:''
|
|
|
+ },//会员立减金额
|
|
|
couponList: [],
|
|
|
huoList: [], //可用活动
|
|
|
orderType: 2, //1表示到店自取 2表示外卖配送
|
|
|
@@ -425,7 +434,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
onShow() {
|
|
|
+ this.getvipMoney()
|
|
|
this.getMsgData()
|
|
|
+
|
|
|
this.addressId = this.addressId ? this.addressId : uni.getStorageSync('addressId')
|
|
|
if (this.addressId) {
|
|
|
this.getAddressDet(this.addressId)
|
|
|
@@ -448,6 +459,16 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ //获取会员立减金额
|
|
|
+ getvipMoney() {
|
|
|
+ var shopId =this.shopId
|
|
|
+ this.$Request.get(`/app/vip/get-can-reduce/${shopId}`).then((res) => {
|
|
|
+ console.log(res, '会员立减')
|
|
|
+ if (res.code == 0 && res.data) {
|
|
|
+ this.Vipmoney=res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
getIntegralRules() {
|
|
|
let data = {
|
|
|
money: this.totalPrice1
|
|
|
@@ -773,7 +794,7 @@ export default {
|
|
|
}
|
|
|
if (this.coupon) {
|
|
|
let totalMoney = parseFloat(
|
|
|
- this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0).toFixed(2)
|
|
|
+ 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
|
|
|
@@ -784,7 +805,16 @@ export default {
|
|
|
|
|
|
if (this.huodong) {
|
|
|
let totalMoney = parseFloat(
|
|
|
- this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0).toFixed(2)
|
|
|
+ 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
|
|
|
+ } else {
|
|
|
+ this.totalPrice1 = totalMoney
|
|
|
+ }
|
|
|
+ }if (this.Vipmoney.canReduceFlag=='1') {
|
|
|
+ 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
|
|
|
@@ -811,7 +841,7 @@ export default {
|
|
|
} 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)).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
|
|
|
@@ -841,7 +871,7 @@ export default {
|
|
|
this.totalPrice1 = parseFloat(this.totalPrice + this.dabaoMoney).toFixed(2)
|
|
|
}
|
|
|
|
|
|
- let totalMoney = parseFloat(this.totalPrice1 - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)).toFixed(2)
|
|
|
+ let totalMoney = parseFloat(this.totalPrice1 - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
|
|
|
|
|
|
if (totalMoney <= 0) {
|
|
|
this.totalPrice1 = 0.01
|
|
|
@@ -875,7 +905,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
let totalMoney = parseFloat(
|
|
|
- this.totalPrice1 - (this.huodong.discountAmount ? this.huodong.discountAmount : 0) - (this.coupon.money ? this.coupon.money : 0)
|
|
|
+ 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) {
|
|
|
@@ -919,9 +949,9 @@ export default {
|
|
|
}
|
|
|
|
|
|
let totalMoney = parseFloat(
|
|
|
- this.totalPrice1 - (this.huodong.discountAmount ? this.huodong.discountAmount : 0) - (this.coupon.money ? this.coupon.money : 0)
|
|
|
+ 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 {
|
|
|
@@ -997,7 +1027,15 @@ export default {
|
|
|
} else {
|
|
|
this.totalPrice1 = this.totalPrice + this.dabaoMoney
|
|
|
}
|
|
|
-
|
|
|
+ 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.getCouponList()
|