From 4b5f1f7ed3460df9465e5071a59b8105cbc9146e Mon Sep 17 00:00:00 2001
From: litian <C21AF165>
Date: 星期五, 29 三月 2024 14:35:30 +0800
Subject: [PATCH] 修改

---
 packagePersonal/pages/myOrder/index.js |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/packagePersonal/pages/myOrder/index.js b/packagePersonal/pages/myOrder/index.js
index 1794a45..0559897 100644
--- a/packagePersonal/pages/myOrder/index.js
+++ b/packagePersonal/pages/myOrder/index.js
@@ -155,7 +155,7 @@
           })
         } else {
           this.setData({
-            list: false,
+            list: [],
             skeletonLoding: false,
             loading: false
           })
@@ -222,6 +222,7 @@
   },
 
   onCancel(e) {
+    let that = this;
     let {
       orderNum
     } = e.currentTarget.dataset
@@ -232,13 +233,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('鐢ㄦ埛鐐瑰嚮浜嗗彇娑�')

--
Gitblit v1.9.1