| | |
| | | isBackTop: false, |
| | | setScrollValue: 0, |
| | | skeletonLoding: true, |
| | | queryFilter: [] |
| | | queryFilter: [], |
| | | isPaySuccess: false, |
| | | isPayComplete: false, |
| | | }, |
| | | |
| | | /** |
| | |
| | | }) |
| | | } else { |
| | | this.setData({ |
| | | list: false, |
| | | list: [], |
| | | skeletonLoding: false, |
| | | loading: false |
| | | }) |
| | |
| | | }, |
| | | |
| | | onCancel(e) { |
| | | let that = this; |
| | | let { |
| | | orderNum |
| | | } = e.currentTarget.dataset |
| | |
| | | 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('用户点击了取消') |
| | |
| | | }, |
| | | "complete": function (res) { |
| | | if (res.errMsg == 'requestPayment:ok') { |
| | | that.setData({ |
| | | isPayComplete: true |
| | | }) |
| | | that.getDataList(false) |
| | | } |
| | | if (that.data.isPaySuccess && that.data.isPayComplete) { |
| | | that.navToBack() |