From 6148cc8378f711178f07bf856876e79a87790c51 Mon Sep 17 00:00:00 2001 From: A1300399510 Date: Fri, 8 Nov 2024 17:25:44 +0800 Subject: [PATCH] no message --- js/common.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 => {