修改未登入code

This commit is contained in:
Dragon
2023-08-18 19:27:54 +08:00
parent b2b2cbe10d
commit 06d2f79d49
8 changed files with 19 additions and 19 deletions

View File

@@ -87,7 +87,7 @@ function getUploadToken (type) {
},
});
} else if (res.code ? res.code == 401 : JSON.parse(res).code == 401) {
} else if (res.code ? res.code == 1444 : JSON.parse(res).code == 401) {
window.location.href = './login.html'
} else {
toastMsg(res.message)
@@ -157,7 +157,7 @@ function withdrawUserAccount (name, idCardNo, accountNo, contact, thirdAccountNo
setTimeout(function () {
window.location.href = './withdrawal.html'
}, 500)
} else if (res.code ? res.code == 401 : JSON.parse(res).code == 401) {
} else if (res.code ? res.code == 1444 : JSON.parse(res).code == 401) {
window.location.href = './login.html'
} else {
toastMsg(res.message)

View File

@@ -53,7 +53,7 @@ function getConfig () {
minDiamonds = res.data.minDiamonds;
$('.box .golds').text('我的金幣:' + res.data.golds);
$('.box .diamonds').text('我的鉆石:' + res.data.diamonds);
} else if (res.code ? res.code == 401 : JSON.parse(res).code == 401) {
} else if (res.code ? res.code == 1444 : JSON.parse(res).code == 401) {
window.location.href = './login.html'
} else {
toastMsg(res.message)
@@ -78,7 +78,7 @@ function exchange () {
$('.pub').hide();
getConfig();
toastMsg('兌換成功')
} else if (res.code ? res.code == 401 : JSON.parse(res).code == 401) {
} else if (res.code ? res.code == 1444 : JSON.parse(res).code == 401) {
window.location.href = './login.html'
} else {
toastMsg(res.message)

View File

@@ -49,7 +49,7 @@ function getQueryWithRoomType () {
if (res.code === 200) {
$('.diamond p').text(res.data.diamonds);
$('.gold p').text(res.data.golds);
} else if (res.code ? res.code == 401 : JSON.parse(res).code == 401) {
} else if (res.code ? res.code == 1444 : JSON.parse(res).code == 401) {
window.location.href = './login.html'
} else {
toastMsg(res.message)
@@ -74,7 +74,7 @@ function getUser () {
$('.myInfo img').attr('src', res.data.avatar);
$('.myInfo div p').text(res.data.nick);
$('.myInfo div b').text("ID:" + res.data.erbanNo);
} else if (res.code ? res.code == 401 : JSON.parse(res).code == 401) {
} else if (res.code ? res.code == 1444 : JSON.parse(res).code == 401) {
window.location.href = './login.html'
} else {
toastMsg(res.message)

View File

@@ -87,7 +87,7 @@ function getUploadToken (type) {
},
});
} else if (res.code ? res.code == 401 : JSON.parse(res).code == 401) {
} else if (res.code ? res.code == 1444 : JSON.parse(res).code == 401) {
window.location.href = './login.html'
} else {
toastMsg(res.message)
@@ -180,7 +180,7 @@ function withdrawUserAccount (
setTimeout(function () {
window.location.href = './withdrawal.html'
}, 500)
} else if (res.code ? res.code == 401 : JSON.parse(res).code == 401) {
} else if (res.code ? res.code == 1444 : JSON.parse(res).code == 401) {
window.location.href = './login.html'
} else {
toastMsg(res.message)

View File

@@ -87,7 +87,7 @@ function getUploadToken (type) {
},
});
} else if (res.code == 401) {
} else if (res.code == 1444) {
window.location.href = './login.html'
} else {
toastMsg(res.message)
@@ -159,7 +159,7 @@ function withdrawUserAccount (
setTimeout(function () {
window.location.href = './withdrawal.html'
}, 500)
} else if (res.code ? res.code == 401 : JSON.parse(res).code == 401) {
} else if (res.code ? res.code == 1444 : JSON.parse(res).code == 401) {
window.location.href = './login.html'
} else {
toastMsg(res.message)

View File

@@ -48,7 +48,7 @@ function getConfig () {
if (res.code === 200) {
$('.box p .b2').text(res.data.weekLimitCount);
$('.box p .b1').text(res.data.minValue);
} else if (res.code ? res.code == 401 : JSON.parse(res).code == 401) {
} else if (res.code ? res.code == 1444 : JSON.parse(res).code == 401) {
window.location.href = './login.html'
} else {
toastMsg(res.message)

View File

@@ -87,7 +87,7 @@ function getUploadToken (type) {
},
});
} else if (res.code ? res.code == 401 : JSON.parse(res).code == 401) {
} else if (res.code ? res.code == 1444 : JSON.parse(res).code == 401) {
window.location.href = './login.html'
} else {
toastMsg(res.message)
@@ -180,7 +180,7 @@ function withdrawUserAccount (
setTimeout(function () {
window.location.href = './withdrawal.html'
}, 500)
} else if (res.code ? res.code == 401 : JSON.parse(res).code == 401) {
} else if (res.code ? res.code == 1444 : JSON.parse(res).code == 401) {
window.location.href = './login.html'
} else {
toastMsg(res.message)

View File

@@ -62,7 +62,7 @@ function getConfig () {
`
$('.withdrawal').append(str);
getAccounts();
} else if (res.code ? res.code == 401 : JSON.parse(res).code == 401) {
} else if (res.code ? res.code == 1444 : JSON.parse(res).code == 401) {
window.location.href = './login.html'
} else {
toastMsg(res.message)
@@ -88,7 +88,7 @@ function query () {
$('.income p').text(`金幣 ${res.data.golds}`);
golds = res.data.golds;
getConfig();
} else if (res.code ? res.code == 401 : JSON.parse(res).code == 401) {
} else if (res.code ? res.code == 1444 : JSON.parse(res).code == 401) {
window.location.href = './login.html'
} else {
toastMsg(res.message)
@@ -115,7 +115,7 @@ function getUser () {
$('.myInfo div p').text(res.data.nick);
$('.myInfo div b').text("ID:" + res.data.erbanNo);
query()
} else if (res.code ? res.code == 401 : JSON.parse(res).code == 401) {
} else if (res.code ? res.code == 1444 : JSON.parse(res).code == 401) {
window.location.href = './login.html'
} else {
toastMsg(res.message)
@@ -205,7 +205,7 @@ function getAccounts () {
$(`.withdrawal input`).text('請輸入提領金幣數額');
$(`.withdrawal .withdrawalBox`).attr('click', 1);
}
} else if (res.code ? res.code == 401 : JSON.parse(res).code == 401) {
} else if (res.code ? res.code == 1444 : JSON.parse(res).code == 401) {
window.location.href = './login.html'
} else {
toastMsg(res.message)
@@ -267,7 +267,7 @@ function calculate () {
$('.goldPub .goldPub_in input').val('');
$('.butBig').addClass('butBigActive');
$('.butBig').attr('click', 1);
} else if (res.code ? res.code == 401 : JSON.parse(res).code == 401) {
} else if (res.code ? res.code == 1444 : JSON.parse(res).code == 401) {
window.location.href = './login.html'
} else {
toastMsg(res.message)
@@ -312,7 +312,7 @@ $('.withDrawalPub .withDrawalPub_in .but').click(function () {
if (res.code === 200) {
getUser();
$('.withDrawalPub').hide();
} else if (res.code ? res.code == 401 : JSON.parse(res).code == 401) {
} else if (res.code ? res.code == 1444 : JSON.parse(res).code == 401) {
window.location.href = './login.html'
} else {
toastMsg(res.message)