From c7e23e53c8cd3b25bdf7f44b9d72549b27cde2b3 Mon Sep 17 00:00:00 2001
From: 郭成尧 <chengyao.guo@yoho.cn>
Date: Wed, 12 Apr 2017 10:40:44 +0800
Subject: [PATCH] order-tip-simple

---
 public/js/home/order.page.js       | 20 ++++++--------------
 public/js/home/orderdetail.page.js | 19 ++++++-------------
 2 files changed, 12 insertions(+), 27 deletions(-)

diff --git a/public/js/home/order.page.js b/public/js/home/order.page.js
index 4034674..af95f4d 100644
--- a/public/js/home/order.page.js
+++ b/public/js/home/order.page.js
@@ -425,23 +425,15 @@ $reaMask.find('.box-cmp').on('touchend', function() {
             return;
         }
 
-        if (res.code === 200) {
-            dialog.showDialog({
-                dialogText: '您的取消订单申请已提交,请耐心等待',
-                hasFooter: {
-                    leftBtnText: '返回',
-                    rightBtnText: '确定'
-                }
-            }, function() {
-                window.location.href = '/home/orders';
-            });
-
-            return false;
-        }
-
         if (res.message) {
             tip.show(res.message);
         }
+
+        if (res.code === 200) {
+            setTimeout(function() {
+                window.location.href = '/home/orders';
+            }, 500);
+        }
     }).fail(function() {
         tip.show('网络错误');
     });
diff --git a/public/js/home/orderdetail.page.js b/public/js/home/orderdetail.page.js
index f3aa38c..3376beb 100644
--- a/public/js/home/orderdetail.page.js
+++ b/public/js/home/orderdetail.page.js
@@ -259,22 +259,15 @@ $reaMask.find('.box-cmp').on('touchend', function() {
             return;
         }
 
-        if (res.code === 200) {
-            dialog.showDialog({
-                dialogText: '您的取消订单申请已提交,请耐心等待',
-                hasFooter: {
-                    leftBtnText: '返回',
-                    rightBtnText: '确定'
-                }
-            }, function() {
-                window.location.href = '/home/orders';
-            });
-
-            return false;
-        }
         if (res.message) {
             tip.show(res.message);
         }
+
+        if (res.code === 200) {
+            setTimeout(function() {
+                window.location.href = '/home/orders';
+            }, 500);
+        }
     }).fail(function() {
         tip.show('网络错误');
     });
--
libgit2 0.24.0