石广澎
2025-01-14 07132ae5e905a710a9843699335a879212984ca4
pay/scanpay.vue
@@ -166,6 +166,7 @@
  data() {
    return {
      tips: '该商户暂未开通支付功能',
      payLoading: false,
      loading: false,
      remark: '',
      buyerNote: '',
@@ -247,9 +248,6 @@
    }
  },
  onLoad(opt) {
    uni.setStorageSync('CID', opt.cid)
    uni.setStorageSync('SHOPID', opt.shopId)
    uni.setStorageSync('AQCI', opt.activityQrcodeId)
    this.UNIONID = uni.getStorageSync('UNIONID') || null
    this.isNew = uni.getStorageSync('IS_NEW')
@@ -596,6 +594,8 @@
        return
      }
      this.bordShow = false
      if (this.payLoading) return
      this.payLoading = true
      // 金额 this.money
      uni.showLoading({
        title: '下单中',
@@ -618,7 +618,7 @@
        params.cid = this.cid
      }
      if (this.onlineId) {
        params = {payWay: this.payWay,onlineId: this.onlineId}
        params.onlineId = this.onlineId
      }
      //生成订单
      saveOrder(params).then(res => {
@@ -637,10 +637,12 @@
            this.aliPay(res.paymentUrl)
          }
        } catch (e) {
          this.payLoading = false
          //TODO handle the exception
          console.error(e);
        }
      }).catch(() => {
        this.payLoading = false
        uni.hideLoading()
      })
    },
@@ -657,6 +659,7 @@
              "paySign": res.paySign //微信签名
            },
            (res) => {
              this.payLoading = false
              if (res.err_msg == "get_brand_wcpay_request:ok") {
                // 使用以上方式判断前端返回,微信团队郑重提示:
                //res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
@@ -674,6 +677,7 @@
      ap.tradePay({
        tradeNO: res.tradeNO
      }, (res) => {
        this.payLoading = false
        if (res.resultCode == 9000) {
          uni.navigateTo({
            url: `/pay/paySuccess?orderId=${this.orderId}&youHuiInfo=${JSON