石广澎
2024-09-13 7e541d9f2c17ee9e938fd017c483910186412348
pay/scanpay.vue
@@ -39,16 +39,15 @@
                  font-size: 13px;
                  color: #999
                }
                .btn {
                  font-size: 13px;
                  color: #1E8BE0
                }
              </style>
              <div>
                <span class="txt">微信搜索或直接点击打开</span>
                <span class="btn">【冀优邮】</span>
                <span class="txt">小程序,享受更多优惠</span>
              </div>
              <span class="txt">微信搜索或点击打开</span>
              <span class="btn">【冀优邮】</span>
              <span class="txt">小程序,享更多优惠!</span>
            </script>
          </wx-open-launch-weapp>
        </view>
@@ -235,7 +234,7 @@
        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) { //支付宝
@@ -305,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()
      }
    },
@@ -321,6 +320,16 @@
    // 更新金额
    changeMoney(str) {
      this.money = str;
      this.couponInfo = {
        id: '',
        discount: 0,
        thresholdValue: 0
      } // 优惠券内容
      this.checkCoupon = {
        id: null,
        discount: 0,
        thresholdValue: 0
      }
    },
    // 展示键盘
    showBord() {
@@ -359,10 +368,10 @@
          res.logoImage = config.baseURL + res.logoImage
        }
        this.shopInfo = res
      }).catch(() => {
      }).catch((err) => {
        clearTimeout(timer)
        this.shopInfo.scanFlag = 0
        this.tips = '当前用户过多,请稍后重试~_~'
        this.tips = err.description || '当前用户过多,请稍后重试~_~'
        this.loading = false
      })
@@ -388,7 +397,11 @@
    },
    // 获取会员相关信息
    showCoupon() {
      if(this.UNIONID){
      if (this.UNIONID) {
        if (uni.$u.test.isEmpty(this.money)) {
          uni.$u.toast('请输入金额!')
          return
        }
        //获取用户优惠券
        queryUseSweepPayCoupon({
          params: {
@@ -400,7 +413,7 @@
          this.couponList = res
          this.couponShow = true
        })
      }else{
      } else {
        this.toRegister()
      }
@@ -515,9 +528,11 @@
      });
    },
    closeOrder() {
      closeOrder({params:{
        id: this.orderId,
      }}).then(res => {
      closeOrder({
        params: {
          id: this.orderId,
        }
      }).then(res => {
      })
    }
  }