From 74139f2bc6bdc8147dd570ac1d774245f67e4f9f Mon Sep 17 00:00:00 2001 From: litian <C21AF165> Date: 星期一, 01 四月 2024 14:05:45 +0800 Subject: [PATCH] 样式修改 --- packagePersonal/pages/myOrder/index.js | 28 ++++++++++++++++------------ 1 files changed, 16 insertions(+), 12 deletions(-) diff --git a/packagePersonal/pages/myOrder/index.js b/packagePersonal/pages/myOrder/index.js index 1794a45..f89f220 100644 --- a/packagePersonal/pages/myOrder/index.js +++ b/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() -- Gitblit v1.9.1