no message
This commit is contained in:
parent
107d8ad0b5
commit
0d4b6bc26e
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@ -1,3 +1,4 @@
|
|||||||
{
|
{
|
||||||
"liveServer.settings.port": 5501
|
"liveServer.settings.port": 5501,
|
||||||
|
"marscode.chatLanguage": "cn"
|
||||||
}
|
}
|
12
js/common.js
12
js/common.js
@ -21,14 +21,14 @@ function $ajax(url) {
|
|||||||
.then(function (res) {
|
.then(function (res) {
|
||||||
var data = typeof res.data == "string" ? JSON.parse(res.data) : res.data
|
var data = typeof res.data == "string" ? JSON.parse(res.data) : res.data
|
||||||
if (data.code == 401) {
|
if (data.code == 401) {
|
||||||
showWindow("login", "https://passport.gter.net/login/ajax", "get", -1, { cover: true })
|
openShowWindow()
|
||||||
reject()
|
reject()
|
||||||
}
|
}
|
||||||
if (data.code == 201) creationAlertBox("error", data.message || data.msg)
|
if (data.code == 201) creationAlertBox("error", data.message || data.msg)
|
||||||
resolve(data)
|
resolve(data)
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
if (err.response?.status == 401) showWindow("login", "https://passport.gter.net/login/ajax", "get", -1, { cover: true })
|
if (err.response?.status == 401) openShowWindow()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -54,7 +54,7 @@ function $ajaxget(url, data) {
|
|||||||
.then(function (res) {
|
.then(function (res) {
|
||||||
var data = typeof res.data == "string" ? JSON.parse(res.data) : res.data
|
var data = typeof res.data == "string" ? JSON.parse(res.data) : res.data
|
||||||
if (data.code == 401) {
|
if (data.code == 401) {
|
||||||
showWindow("login", "https://passport.gter.net/login/ajax", "get", -1, { cover: true })
|
openShowWindow()
|
||||||
reject()
|
reject()
|
||||||
}
|
}
|
||||||
if (data.code == 201) creationAlertBox("error", data.message || data.msg)
|
if (data.code == 201) creationAlertBox("error", data.message || data.msg)
|
||||||
@ -62,7 +62,7 @@ function $ajaxget(url, data) {
|
|||||||
resolve(data)
|
resolve(data)
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
if (error.response?.status == 401) showWindow("login", "https://passport.gter.net/login/ajax", "get", -1, { cover: true })
|
if (error.response?.status == 401) openShowWindow()
|
||||||
reject(error)
|
reject(error)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -155,3 +155,7 @@ function getBaseData() {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function openShowWindow() {
|
||||||
|
showWindow("login", "https://passport.gter.net/login/ajax", "get", -1, { cover: true })
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user