feat(支付):
1、未输入金额时不加载优惠券
2、金额变动时,取消选定的优惠券
| | |
| | | font-size: 13px; |
| | | color: #999 |
| | | } |
| | | |
| | | .btn { |
| | | font-size: 13px; |
| | | color: #1E8BE0 |
| | |
| | | code: opt.code |
| | | } |
| | | let code = opt.code |
| | | if (this.payWay == 2&&opt.state == 1 ) { //微信 |
| | | if (this.payWay == 2 && opt.state == 1) { //微信 |
| | | params.getUserInfo = 1 |
| | | } |
| | | if (this.payWay == 5) { //支付宝 |
| | |
| | | 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() { |
| | |
| | | }).catch((err) => { |
| | | clearTimeout(timer) |
| | | this.shopInfo.scanFlag = 0 |
| | | this.tips = err.description||'当前用户过多,请稍后重试~_~' |
| | | this.tips = err.description || '当前用户过多,请稍后重试~_~' |
| | | this.loading = false |
| | | }) |
| | | |
| | |
| | | }, |
| | | // 获取会员相关信息 |
| | | showCoupon() { |
| | | if(this.UNIONID){ |
| | | if (this.UNIONID) { |
| | | if (uni.$u.test.isEmpty(this.money)) { |
| | | uni.$u.toast('请输入金额!') |
| | | return |
| | | } |
| | | //获取用户优惠券 |
| | | queryUseSweepPayCoupon({ |
| | | params: { |
| | |
| | | this.couponList = res |
| | | this.couponShow = true |
| | | }) |
| | | }else{ |
| | | } else { |
| | | this.toRegister() |
| | | } |
| | | |
| | |
| | | }); |
| | | }, |
| | | closeOrder() { |
| | | closeOrder({params:{ |
| | | id: this.orderId, |
| | | }}).then(res => { |
| | | closeOrder({ |
| | | params: { |
| | | id: this.orderId, |
| | | } |
| | | }).then(res => { |
| | | }) |
| | | } |
| | | } |