no message
This commit is contained in:
parent
eb7ce398d0
commit
6148cc8378
@ -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 => {
|
||||
|
Loading…
Reference in New Issue
Block a user