mirror of
https://gitee.com/coder-xiaomo/flashsale
synced 2025-09-10 22:11:39 +08:00
交易下单4-获取用户登录信息;Price拼写错误改正
This commit is contained in:
@@ -90,6 +90,7 @@
|
||||
$("#createorder").on("click", function () {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
contentType: "application/x-www-form-urlencoded",
|
||||
url: "http://localhost:8090/order/createorder",
|
||||
data: {
|
||||
"itemId": g_itemVO.id,
|
||||
@@ -98,9 +99,12 @@
|
||||
xhrFields: {withCredentials: true},
|
||||
success: function (data) {
|
||||
if (data.status == "success") {
|
||||
// TODO
|
||||
alert("下单成功");
|
||||
} else {
|
||||
alert("下单失败,原因为" + data.data.errMsg);
|
||||
if (data.data.errCode == "20003") {
|
||||
window.location.href = "login.html";
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function (data) {
|
||||
|
@@ -58,6 +58,7 @@
|
||||
success: function (data) {
|
||||
if (data.status == "success") {
|
||||
alert("登录成功");
|
||||
window.location.href = "listitem.html";
|
||||
} else {
|
||||
alert("登录失败,原因为" + data.data.errMsg);
|
||||
}
|
||||
|
Reference in New Issue
Block a user