mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[improvement] Coupon: update value display rule (#1976)
This commit is contained in:
parent
16973a4e0b
commit
a4b71aa402
@ -40,7 +40,8 @@ export default create({
|
||||
const { coupons } = this;
|
||||
const coupon = coupons[this.chosenCoupon];
|
||||
if (coupon) {
|
||||
return `-¥${(coupon.value / 100).toFixed(2)}`;
|
||||
const value = coupon.denominations || coupon.value;
|
||||
return `-¥${(value / 100).toFixed(2)}`;
|
||||
}
|
||||
return coupons.length === 0 ? this.$t('tips') : this.$t('count', coupons.length);
|
||||
}
|
||||
|
@ -113,4 +113,4 @@ export default {
|
||||
| startAt | 卡有效开始时间 (时间戳, 单位秒) | `Number` |
|
||||
| endAt | 卡失效日期 (时间戳, 单位秒) | `Number` |
|
||||
| reason | 不可用原因 | `String` |
|
||||
| value | 订单优惠金额,单位分 | `Number` |
|
||||
| value | 折扣券优惠金额,单位分 | `Number` |
|
||||
|
Loading…
x
Reference in New Issue
Block a user