no message

This commit is contained in:
A1300399510 2024-11-08 17:25:44 +08:00
parent eb7ce398d0
commit 6148cc8378

View File

@ -20,6 +20,7 @@ function $ajax(url) {
.then(function (res) {
var data = typeof res.data == "string" ? JSON.parse(res.data) : res.data
if (data.code == 401) reject()
if (data.code == 201) creationAlertBox("error", res.message)
resolve(data)
})
.catch(err => {
@ -46,8 +47,8 @@ function $ajaxget(url, data) {
)
.then(function (res) {
var data = typeof res.data == "string" ? JSON.parse(res.data) : res.data
console.log("data",data);
if (data.code == 401) reject()
if (data.code == 201) creationAlertBox("error", res.message)
resolve(data)
})
.catch(error => {