litian
2024-04-01 74139f2bc6bdc8147dd570ac1d774245f67e4f9f
packagePersonal/pages/myOrder/index.js
@@ -40,7 +40,9 @@
    isBackTop: false,
    setScrollValue: 0,
    skeletonLoding: true,
    queryFilter: []
    queryFilter: [],
    isPaySuccess: false,
    isPayComplete: false,
  },
  /**
@@ -155,7 +157,7 @@
          })
        } else {
          this.setData({
            list: false,
            list: [],
            skeletonLoding: false,
            loading: false
          })
@@ -222,6 +224,7 @@
  },
  onCancel(e) {
    let that = this;
    let {
      orderNum
    } = e.currentTarget.dataset
@@ -232,13 +235,16 @@
        if (res.confirm) {
          app.MG.store.cancelOrder({
            orderNum: orderNum
          }).then(() => {
            wx.showToast({
              title: "订单已取消",
              icon: 'success',
              duration: 1000
            })
            this.getDataList(false)
          }).then((res) => {
            if (res) {
              wx.showToast({
                title: "订单已取消",
                icon: 'success',
                duration: 1000
              })
              that.getDataList(false)
            }
          })
        } else if (res.cancel) {
          console.log('用户点击了取消')
@@ -286,9 +292,7 @@
                  },
                  "complete": function (res) {
                    if (res.errMsg == 'requestPayment:ok') {
                      that.setData({
                        isPayComplete: true
                      })
                      that.getDataList(false)
                    }
                    if (that.data.isPaySuccess && that.data.isPayComplete) {
                      that.navToBack()