Commit 379b1c9e by 朱继来

调整js返回

parent 5dfbc27c
Showing with 19 additions and 5 deletions
...@@ -133,7 +133,11 @@ ...@@ -133,7 +133,11 @@
if (cart_ids.length > 0) { if (cart_ids.length > 0) {
loading.confirm(user_id, address_id, cart_ids, user_coupon_id, goods_type, is_online); // 确认订单信息 loading.confirm(user_id, address_id, cart_ids, user_coupon_id, goods_type, is_online); // 确认订单信息
} }
return false;
} }
layer.msg(resp.errmsg || '网络异常');
} }
}) })
} else { } else {
...@@ -161,7 +165,7 @@ ...@@ -161,7 +165,7 @@
type: 'post', type: 'post',
data: {user_id: user_id, inv_type: inv_type}, data: {user_id: user_id, inv_type: inv_type},
dataType: 'json', dataType: 'json',
success: function (resp) { console.log(resp) success: function (resp) {
if (resp.errcode == 0) { if (resp.errcode == 0) {
var data = resp.data; var data = resp.data;
...@@ -176,7 +180,11 @@ ...@@ -176,7 +180,11 @@
} else { } else {
$('#invoice').empty().append(inv_str); $('#invoice').empty().append(inv_str);
} }
return false;
} }
layer.msg(resp.errmsg || '网络异常');
} }
}) })
} else { } else {
...@@ -462,6 +470,7 @@ ...@@ -462,6 +470,7 @@
success: function(resp){ success: function(resp){
if (resp.errcode == 0) { if (resp.errcode == 0) {
loading.lists(user_id, goods_type, is_online, delivery_place); // 加载购物车列表 loading.lists(user_id, goods_type, is_online, delivery_place); // 加载购物车列表
return false;
} }
layer.msg(resp.errmsg); layer.msg(resp.errmsg);
...@@ -839,14 +848,15 @@ ...@@ -839,14 +848,15 @@
} }
} }
} else { } else {
layer.msg(resp.errmsg || '网络异常');
$('.shop-lists').hide(); $('.shop-lists').hide();
if (is_online) { if (is_online) {
$('.order-info').hide(); $('.order-info').hide();
} else { } else {
$('.amount-section').hide(); $('.amount-section').hide();
} }
} }
}, },
}); });
...@@ -877,9 +887,11 @@ ...@@ -877,9 +887,11 @@
} else { } else {
$('#user_coupon').empty().append(str); $('#user_coupon').empty().append(str);
} }
return false;
} }
return false; layer.msg(resp.errmsg || '网络异常');
} }
}) })
}, },
...@@ -935,9 +947,11 @@ ...@@ -935,9 +947,11 @@
$('.amount-section').show(); $('.amount-section').show();
$('.order_amount').empty().text(data.order_amount_format); $('.order_amount').empty().text(data.order_amount_format);
} }
return false;
} }
return false; layer.msg(resp.errmsg || '网络异常');
} }
}) })
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment