feat(支付):
1、未输入金额时不加载优惠券
2、金额变动时,取消选定的优惠券
| | |
| | | font-size: 13px; |
| | | color: #999 |
| | | } |
| | | |
| | | .btn { |
| | | font-size: 13px; |
| | | color: #1E8BE0 |
| | |
| | | uni.setStorageSync(ACCESSTOKEN, res.token) |
| | | uni.setStorageSync('IS_NEW', res.isNew) |
| | | this.isNew = res.isNew |
| | | if (!res.isNew) { |
| | | if (!res.isNew && !uni.$u.test.isEmpty(this.money)) { |
| | | this.showCoupon() |
| | | } |
| | | }, |
| | |
| | | // 更新金额 |
| | | changeMoney(str) { |
| | | this.money = str; |
| | | this.couponInfo = { |
| | | id: '', |
| | | discount: 0, |
| | | thresholdValue: 0 |
| | | } // 优惠券内容 |
| | | this.checkCoupon = { |
| | | id: null, |
| | | discount: 0, |
| | | thresholdValue: 0 |
| | | } |
| | | }, |
| | | // 展示键盘 |
| | | showBord() { |
| | |
| | | // 获取会员相关信息 |
| | | showCoupon() { |
| | | if(this.UNIONID){ |
| | | if (uni.$u.test.isEmpty(this.money)) { |
| | | uni.$u.toast('请输入金额!') |
| | | return |
| | | } |
| | | //获取用户优惠券 |
| | | queryUseSweepPayCoupon({ |
| | | params: { |
| | |
| | | }); |
| | | }, |
| | | closeOrder() { |
| | | closeOrder({params:{ |
| | | closeOrder({ |
| | | params: { |
| | | id: this.orderId, |
| | | }}).then(res => { |
| | | } |
| | | }).then(res => { |
| | | }) |
| | | } |
| | | } |