feat(支付):
1、未输入金额时不加载优惠券
2、金额变动时,取消选定的优惠券
1个文件已修改
23 ■■■■ 已修改文件
pay/scanpay.vue 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pay/scanpay.vue
@@ -39,6 +39,7 @@
                  font-size: 13px;
                  color: #999
                }
                .btn {
                  font-size: 13px;
                  color: #1E8BE0
@@ -303,7 +304,7 @@
      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()
      }
    },
@@ -319,6 +320,16 @@
    // 更新金额
    changeMoney(str) {
      this.money = str;
      this.couponInfo = {
        id: '',
        discount: 0,
        thresholdValue: 0
      } // 优惠券内容
      this.checkCoupon = {
        id: null,
        discount: 0,
        thresholdValue: 0
      }
    },
    // 展示键盘
    showBord() {
@@ -387,6 +398,10 @@
    // 获取会员相关信息
    showCoupon() {
      if(this.UNIONID){
        if (uni.$u.test.isEmpty(this.money)) {
          uni.$u.toast('请输入金额!')
          return
        }
        //获取用户优惠券
        queryUseSweepPayCoupon({
          params: {
@@ -513,9 +528,11 @@
      });
    },
    closeOrder() {
      closeOrder({params:{
      closeOrder({
        params: {
        id: this.orderId,
      }}).then(res => {
        }
      }).then(res => {
      })
    }
  }