1
0
mirror of https://gitee.com/coder-xiaomo/flashsale synced 2025-09-10 22:11:39 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

交易下单4-获取用户登录信息;Price拼写错误改正

This commit is contained in:
2022-03-04 17:39:39 +08:00
parent 49d3380c40
commit 42888a2d8a
7 changed files with 49 additions and 28 deletions

View File

@@ -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) {

View File

@@ -58,6 +58,7 @@
success: function (data) {
if (data.status == "success") {
alert("登录成功");
window.location.href = "listitem.html";
} else {
alert("登录失败,原因为" + data.data.errMsg);
}