diff --git a/js/common.js b/js/common.js index b601ce8..e4ef547 100644 --- a/js/common.js +++ b/js/common.js @@ -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 => {