From 0c8a6935f29e4befba1d9de1c9707747d9ddc5cc Mon Sep 17 00:00:00 2001 From: kagome2014 <5468955+kagome2014@user.noreply.gitee.com> Date: Mon, 21 Dec 2020 10:23:02 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E4=BF=AE=E5=A4=8D=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=80=BC=E6=9C=AA=E4=BD=BF=E7=94=A8=E5=B8=B8?= =?UTF-8?q?=E9=87=8Fweb=5Fstatus.SUCCESS=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js | 4 ++-- ruoyi-admin/src/main/resources/static/ruoyi/login.js | 2 +- ruoyi-admin/src/main/resources/static/ruoyi/register.js | 2 +- .../src/main/resources/templates/demo/operate/other.html | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js index 8e6cd234..98ad2b78 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js @@ -172,7 +172,7 @@ var table = { if (typeof table.get(this.id).responseHandler == "function") { table.get(this.id).responseHandler(res); } - if (res.code == 0) { + if (res.code == web_status.SUCCESS) { if ($.common.isNotEmpty(table.options.sidePagination) && table.options.sidePagination == 'client') { return res.rows; } else { @@ -612,7 +612,7 @@ var table = { if (typeof table.options.responseHandler == "function") { table.options.responseHandler(res); } - if (res.code != undefined && res.code != 0) { + if (res.code != undefined && res.code != web_status.SUCCESS) { $.modal.alertWarning(res.msg); return []; } else { diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/login.js b/ruoyi-admin/src/main/resources/static/ruoyi/login.js index 0b63b5b1..78d207ca 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/login.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/login.js @@ -30,7 +30,7 @@ function login() { "rememberMe": rememberMe }, success: function(r) { - if (r.code == 0) { + if (r.code == web_status.SUCCESS) { location.href = ctx + 'index'; } else { $.modal.closeLoading(); diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/register.js b/ruoyi-admin/src/main/resources/static/ruoyi/register.js index 2a07f693..031043d4 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/register.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/register.js @@ -27,7 +27,7 @@ function register() { "validateCode": validateCode }, success: function(r) { - if (r.code == 0) { + if (r.code == web_status.SUCCESS) { layer.alert("恭喜你,您的账号 " + username + " 注册成功!", { icon: 1, title: "系统提示" diff --git a/ruoyi-admin/src/main/resources/templates/demo/operate/other.html b/ruoyi-admin/src/main/resources/templates/demo/operate/other.html index ed0c55bb..090f081d 100644 --- a/ruoyi-admin/src/main/resources/templates/demo/operate/other.html +++ b/ruoyi-admin/src/main/resources/templates/demo/operate/other.html @@ -58,7 +58,7 @@ data: $('#form-demo-2').serialize(), type: "post", success: function(result) { - if (result.code == 0) { + if (result.code == web_status.SUCCESS) { layer.msg("保存成功,正在刷新数据请稍后……", { icon: 1, time: 500,