Showing
1 changed file
with
4 additions
and
10 deletions
@@ -42,13 +42,10 @@ optHammer.on('tap', function(e) { | @@ -42,13 +42,10 @@ optHammer.on('tap', function(e) { | ||
42 | }).then(function(res) { | 42 | }).then(function(res) { |
43 | $('#dialog-wrapper').hide(); | 43 | $('#dialog-wrapper').hide(); |
44 | if (!res) { | 44 | if (!res) { |
45 | - tip.show('网络错误'); | ||
46 | return; | 45 | return; |
47 | } | 46 | } |
48 | - if (res.code === 200) { | ||
49 | - tip.show('删除成功'); | ||
50 | - } else { | ||
51 | - tip.show(res.message || '网络错误'); | 47 | + if (res.message) { |
48 | + tip.show(res.message); | ||
52 | } | 49 | } |
53 | window.location.href = '/home/orders'; | 50 | window.location.href = '/home/orders'; |
54 | }).fail(function() { | 51 | }).fail(function() { |
@@ -74,13 +71,10 @@ optHammer.on('tap', function(e) { | @@ -74,13 +71,10 @@ optHammer.on('tap', function(e) { | ||
74 | }).then(function(res) { | 71 | }).then(function(res) { |
75 | $('#dialog-wrapper').hide(); | 72 | $('#dialog-wrapper').hide(); |
76 | if (!res) { | 73 | if (!res) { |
77 | - tip.show('网络错误'); | ||
78 | return; | 74 | return; |
79 | } | 75 | } |
80 | - if (res.code === 200) { | ||
81 | - tip.show('取消成功'); | ||
82 | - } else { | ||
83 | - tip.show(res.message || '网络错误'); | 76 | + if (res.message) { |
77 | + tip.show(res.message); | ||
84 | } | 78 | } |
85 | window.location.href = '/home/orders'; | 79 | window.location.href = '/home/orders'; |
86 | }).fail(function() { | 80 | }).fail(function() { |
-
Please register or login to post a comment