|
|
@ -51,16 +51,18 @@ |
|
|
|
<view v-if="rentPrice"> |
|
|
|
租金:¥{{ rentPrice }} |
|
|
|
</view> |
|
|
|
<view v-if="coupon.couponCondition <= price"> |
|
|
|
优惠:-¥{{ coupon.couponPrice }} |
|
|
|
<view v-if="getPrice().coupon"> |
|
|
|
优惠:-¥{{ getPrice().coupon }} |
|
|
|
</view> |
|
|
|
<view v-if="coupon.couponCondition <= price"> |
|
|
|
实付款:¥{{ (price - coupon.couponPrice).toFixed(2) }} |
|
|
|
<view v-if="getPrice().price"> |
|
|
|
实付款:¥{{ getPrice().price }} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<uv-cell |
|
|
|
icon="coupon" |
|
|
|
title="优惠" |
|
|
|
title="押金优惠" |
|
|
|
v-if="coupon.couponFlag" |
|
|
|
iconStyle="font-size: 34rpx;" |
|
|
|
rightIconStyle="font-size: 34rpx;"> |
|
|
|
<template #value> |
|
|
@ -69,6 +71,19 @@ |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
</uv-cell> |
|
|
|
|
|
|
|
<uv-cell |
|
|
|
icon="coupon" |
|
|
|
title="租金优惠" |
|
|
|
v-if="coupon.leaseCouponFlag" |
|
|
|
iconStyle="font-size: 34rpx;" |
|
|
|
rightIconStyle="font-size: 34rpx;"> |
|
|
|
<template #value> |
|
|
|
<view class="coupon"> |
|
|
|
满{{ coupon.leaseCouponCondition }}立减{{ coupon.leaseCouponPrice }} |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
</uv-cell> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 提交按钮 --> |
|
|
@ -153,6 +168,27 @@ |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 计算优惠金额 |
|
|
|
getPrice(){ |
|
|
|
// 减免押金 |
|
|
|
if(this.coupon.couponFlag && |
|
|
|
this.coupon.couponCondition <= this.depositPrice){ |
|
|
|
return { |
|
|
|
coupon : this.coupon.couponPrice, |
|
|
|
price : (this.price - this.coupon.couponPrice).toFixed(2), |
|
|
|
} |
|
|
|
} |
|
|
|
// 减免租金 |
|
|
|
if(this.coupon.leaseCouponFlag && |
|
|
|
this.coupon.leaseCouponCondition <= this.rentPrice){ |
|
|
|
return { |
|
|
|
coupon : this.coupon.leaseCouponPrice, |
|
|
|
price : (this.price - this.coupon.leaseCouponPrice).toFixed(2), |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return {} |
|
|
|
}, |
|
|
|
// 选择优惠劵 |
|
|
|
selectCoupon(e){ |
|
|
|
this.couponText = e.couponName |
|
|
|