kk.shi 3 rokov pred
rodič
commit
e222b29956
1 zmenil súbory, kde vykonal 15 pridanie a 14 odobranie
  1. 15 14
      pages/welfareMall/order/orderCompletion.js

+ 15 - 14
pages/welfareMall/order/orderCompletion.js

@@ -172,9 +172,7 @@ Page({
      * 提交
      */
     confirm: function(){
-      this.setData({
-        hidden: false
-      });
+      let that = this;
       var res = this.data.reason;
       console.log(res);
       if(res == null || res =='' || res == undefined){
@@ -184,7 +182,19 @@ Page({
           duration: 1500
         })
       } else {
-        this.goRefund(res);
+        this.setData({
+          hidden: true
+        });
+        wx.showToast({
+          title: '申请退款已提交',
+          icon: 'none',
+          duration: 1500,
+          success: function(){
+            setTimeout(() => {
+              that.goRefund(res);
+            }, 1500);
+          }
+        });
       }
     },
 
@@ -210,16 +220,7 @@ Page({
     });
     await that.cancel();
     // await that.onLoad(that.options);
-    wx.showToast({
-      title: '申请退款已提交',
-      icon: 'none',
-      duration: 1500,
-      success: function(){
-        setTimeout(() => {
-          that.selectOrder(that.data.orderSn);
-        }, 1500);
-      }
-    });
+    await that.selectOrder(that.data.orderSn);
     // await wx.navigateTo({
     //   url:  "../refund/refund?orderSn=" + that.data.orderSn
     // })