Liuyi
2024-12-20 d470e67ac1997882502b75cbfdaf359626cfaaa8
unpackage/dist/dev/mp-weixin/pages/recharge/index.js
@@ -50,7 +50,14 @@
      { text: "微信支付", value: 2, checked: true, img: "../../static/images/recharge/wx.png" }
      // {text:"余额",value:3,checked:false,img:'../../static/images/recharge/balance.png'},
    ]);
    let timerId;
    let payStatus = common_vendor.ref(true);
    async function submit() {
      if (payStatus.value) {
        payStatus.value = false;
        timerId = setTimeout(() => {
          payStatus.value = true;
        }, 2e4);
      let money = "";
      if (disabled.value) {
        money = choosedMoney.value;
@@ -69,8 +76,15 @@
            businessNo: res.data
          };
          await wxPay(data2);
            otherMoney.value = "";
        }
      });
      } else {
        common_vendor.index.showToast({
          title: "充值间隔20秒,请稍后!",
          icon: "none"
        });
      }
    }
    async function wxPay(data) {
      await api_index.wxPayApi(data).then((res) => {
@@ -115,6 +129,9 @@
        }
      });
    }
    common_vendor.onUnmounted(() => {
      clearTimeout(timerId);
    });
    return (_ctx, _cache) => {
      return {
        a: common_vendor.p({
@@ -140,7 +157,8 @@
            d: item.checked
          };
        }),
        h: common_vendor.o(($event) => submit())
        h: common_vendor.unref(payStatus) ? 1 : 0.7,
        i: common_vendor.o(($event) => submit())
      };
    };
  }