Commit 379b1c9e by 朱继来

调整js返回

parent 5dfbc27c
Showing with 18 additions and 4 deletions
......@@ -133,7 +133,11 @@
if (cart_ids.length > 0) {
loading.confirm(user_id, address_id, cart_ids, user_coupon_id, goods_type, is_online); // 确认订单信息
}
return false;
}
layer.msg(resp.errmsg || '网络异常');
}
})
} else {
......@@ -161,7 +165,7 @@
type: 'post',
data: {user_id: user_id, inv_type: inv_type},
dataType: 'json',
success: function (resp) { console.log(resp)
success: function (resp) {
if (resp.errcode == 0) {
var data = resp.data;
......@@ -176,7 +180,11 @@
} else {
$('#invoice').empty().append(inv_str);
}
return false;
}
layer.msg(resp.errmsg || '网络异常');
}
})
} else {
......@@ -462,6 +470,7 @@
success: function(resp){
if (resp.errcode == 0) {
loading.lists(user_id, goods_type, is_online, delivery_place); // 加载购物车列表
return false;
}
layer.msg(resp.errmsg);
......@@ -839,6 +848,8 @@
}
}
} else {
layer.msg(resp.errmsg || '网络异常');
$('.shop-lists').hide();
if (is_online) {
......@@ -846,7 +857,6 @@
} else {
$('.amount-section').hide();
}
}
},
});
......@@ -877,10 +887,12 @@
} else {
$('#user_coupon').empty().append(str);
}
}
return false;
}
layer.msg(resp.errmsg || '网络异常');
}
})
},
......@@ -935,10 +947,12 @@
$('.amount-section').show();
$('.order_amount').empty().text(data.order_amount_format);
}
}
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