From 3c78ae386297cd6c01314f19463b56ff87b02773 Mon Sep 17 00:00:00 2001 From: Xia Kaixiang Date: Thu, 20 Jun 2019 18:50:32 +0800 Subject: [PATCH] =?utf8?q?context-path=E9=A1=B5=E9=9D=A2=E9=97=AE=E9=A2=98?= =?utf8?q?=E8=A7=A3=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../resources/static/custom/module/admin.js | 20 ++++++++++++++++--- .../resources/static/custom/module/index.js | 11 ++++++++-- .../resources/templates/home/console.html | 2 +- src/main/resources/templates/index.html | 2 +- src/main/resources/templates/login.html | 2 +- .../templates/system/function/form.html | 2 +- .../templates/system/function/index.html | 2 +- .../templates/system/function/resform.html | 2 +- .../templates/system/function/reslist.html | 2 +- .../templates/system/function/subform.html | 2 +- .../templates/system/operator/index.html | 6 +++--- .../templates/system/operator/operator.html | 2 +- .../templates/system/operator/setpwd.html | 4 ++-- .../templates/system/operator/userinfor.html | 2 +- .../templates/system/param/apiclientform.html | 2 +- .../templates/system/param/apiclientpara.html | 6 +++--- .../templates/system/param/businesspara.html | 4 ++-- .../templates/system/param/busparaform.html | 2 +- .../templates/system/param/paytype.html | 8 ++++---- .../templates/system/param/paytypeconfig.html | 2 +- .../templates/system/param/paytypeform.html | 7 +++---- .../templates/system/param/syspara.html | 2 +- .../resources/templates/system/role/form.html | 2 +- .../resources/templates/system/role/func.html | 4 ++-- .../templates/system/role/index.html | 2 +- .../templates/system/shop/config.html | 6 +++--- .../templates/system/shop/configform.html | 2 +- .../templates/system/shop/configpara.html | 2 +- .../templates/system/shop/index.html | 8 ++++---- .../templates/system/user/account.html | 2 +- .../resources/templates/system/user/add.html | 2 +- .../resources/templates/system/user/bind.html | 2 +- .../templates/system/user/index.html | 2 +- .../templates/system/user/point.html | 2 +- .../templates/system/user/pointdtl.html | 2 +- 35 files changed, 76 insertions(+), 56 deletions(-) diff --git a/src/main/resources/static/custom/module/admin.js b/src/main/resources/static/custom/module/admin.js index e6ad642d..e15cfdf8 100755 --- a/src/main/resources/static/custom/module/admin.js +++ b/src/main/resources/static/custom/module/admin.js @@ -1,6 +1,7 @@ layui.define(['layer'], function (exports) { var layer = layui.layer; var popupRightIndex, popupCenterIndex, popupCenterParam; + var baseUrl = window.location.pathname; var admin = { isRefresh: false, @@ -228,6 +229,19 @@ layui.define(['layer'], function (exports) { default: return str; } + }, + errorBack: function (err) { + layer.closeAll('loading'); + if (403 == err.status) { + layer.msg("无资源权限!", {icon: 2, time: 1500}); + return; + } + if (200 == err.status) { + layer.msg("请求异常,请刷新页面重新操作", {icon: 2, time: 1500}); + return; + } else { + layer.msg("请求服务器失败!", {icon: 2}); + } } }; @@ -248,7 +262,7 @@ layui.define(['layer'], function (exports) { }, // 设置主题 theme: function () { - admin.popupRight('home/theme'); + admin.popupRight(baseUrl+'home/theme'); }, // 全屏 fullScreen: function (e) { @@ -311,10 +325,10 @@ layui.define(['layer'], function (exports) { btn: ['确定', '取消'] }, function (index, layero) { layer.closeAll('dialog'); //加入这个信息点击确定 会关闭这个消息框 - admin.dgo("/dictrefresh", {}, function (data) { + admin.dgo(baseUrl+"dictrefresh", {}, function (data) { if (data.code == 200) { layer.msg("刷新数据字典成功!", {icon: 1, time: 1000}); - DictPoolToolkit().initAll("/dictpool"); + DictPoolToolkit().initAll(baseUrl+"dictpool"); } else if (data.code == 401) { layer.msg(data.msg, {icon: 2, time: 1500}, function () { location.replace('/login'); diff --git a/src/main/resources/static/custom/module/index.js b/src/main/resources/static/custom/module/index.js index 101d6b92..df14f678 100755 --- a/src/main/resources/static/custom/module/index.js +++ b/src/main/resources/static/custom/module/index.js @@ -2,6 +2,7 @@ layui.define(['admin', 'layer', 'element'], function (exports) { var admin = layui.admin; var layer = layui.layer; var element = layui.element; + var baseUrl = window.location.pathname; var index = { pageTabs: true, // 是否开启多标签 @@ -14,6 +15,12 @@ layui.define(['admin', 'layer', 'element'], function (exports) { if ('javascript:;' != menuPath && '' != menuPath) { var key = menuPath.replace(/[?:=&/]/g, '_'); $(this).attr('href', '#!' + key); + if (menuPath.startsWith("/")) { + menuPath = baseUrl + menuPath.substring(1); + } else { + menuPath = baseUrl + menuPath; + } + console.log(menuPath); Q.reg(key, function () { index.loadView({ menuId: key, @@ -28,7 +35,7 @@ layui.define(['admin', 'layer', 'element'], function (exports) { // 主页 Q.init({ - index: '!_home_console' + index: '_home_console' }); // tab选项卡切换监听 element.on('tab(admin-pagetabs)', function (data) { @@ -134,7 +141,7 @@ layui.define(['admin', 'layer', 'element'], function (exports) { // 退出登录点击事件 $('#btnLogout').click(function () { layer.confirm('确定退出登录?', function () { - location.replace('logout'); + location.replace(baseUrl+'logout'); }); }); } diff --git a/src/main/resources/templates/home/console.html b/src/main/resources/templates/home/console.html index 027897c8..94a54a55 100755 --- a/src/main/resources/templates/home/console.html +++ b/src/main/resources/templates/home/console.html @@ -55,7 +55,7 @@ var element = layui.element; var device = layui.device; - layui.link('/static/custom/css/console.css'); + layui.link('[[@{/static/custom/css/console.css}]]'); // 渲染轮播 carousel.render({ diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index b5099b3e..1fb326de 100755 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -50,7 +50,7 @@
基本资料
修改密码

-
退出
+
退出
  • diff --git a/src/main/resources/templates/login.html b/src/main/resources/templates/login.html index 0cef69eb..d5d6c7b0 100644 --- a/src/main/resources/templates/login.html +++ b/src/main/resources/templates/login.html @@ -93,7 +93,7 @@ var field = obj.field; layer.load(2); $.ajax({ - url: '/login/form', + url: '[[@{/login/form}]]', data: field, type: 'POST', success: function (data) { diff --git a/src/main/resources/templates/system/function/form.html b/src/main/resources/templates/system/function/form.html index fa382a53..e1468be7 100755 --- a/src/main/resources/templates/system/function/form.html +++ b/src/main/resources/templates/system/function/form.html @@ -98,7 +98,7 @@ admin.finishPopupCenter(); } else if (result.code == 401) { layer.msg(result.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { diff --git a/src/main/resources/templates/system/function/index.html b/src/main/resources/templates/system/function/index.html index 650ec8bf..93d53ac5 100755 --- a/src/main/resources/templates/system/function/index.html +++ b/src/main/resources/templates/system/function/index.html @@ -156,7 +156,7 @@ layer.msg(data.msg, {icon: 1}); } else if (data.code == 401) { layer.msg(data.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } diff --git a/src/main/resources/templates/system/function/resform.html b/src/main/resources/templates/system/function/resform.html index 1d833636..4ac8b985 100755 --- a/src/main/resources/templates/system/function/resform.html +++ b/src/main/resources/templates/system/function/resform.html @@ -75,7 +75,7 @@ admin.finishPopupCenter(); } else if (result.code == 401) { layer.msg(result.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { diff --git a/src/main/resources/templates/system/function/reslist.html b/src/main/resources/templates/system/function/reslist.html index e7241f6d..63ba0429 100755 --- a/src/main/resources/templates/system/function/reslist.html +++ b/src/main/resources/templates/system/function/reslist.html @@ -71,7 +71,7 @@ layer.msg(data.msg, {icon: 1}); } else if (data.code == 401) { layer.msg(data.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } diff --git a/src/main/resources/templates/system/function/subform.html b/src/main/resources/templates/system/function/subform.html index a687f33f..f04a15e9 100755 --- a/src/main/resources/templates/system/function/subform.html +++ b/src/main/resources/templates/system/function/subform.html @@ -87,7 +87,7 @@ admin.finishPopupCenter(); } else if (result.code == 401) { layer.msg(result.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { diff --git a/src/main/resources/templates/system/operator/index.html b/src/main/resources/templates/system/operator/index.html index 8608ac52..6cbcf98e 100644 --- a/src/main/resources/templates/system/operator/index.html +++ b/src/main/resources/templates/system/operator/index.html @@ -130,7 +130,7 @@ showEditModel(data); } else if (ret.code == 401) { layer.msg(ret.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } @@ -156,7 +156,7 @@ layer.msg(ret.msg, {icon: 1}); } else if (ret.code == 401) { layer.msg(ret.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } @@ -186,7 +186,7 @@ //table.reload('table-user', {}); } else if (data.code == 401) { layer.msg(data.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { diff --git a/src/main/resources/templates/system/operator/operator.html b/src/main/resources/templates/system/operator/operator.html index 250bdeb4..682e6c45 100644 --- a/src/main/resources/templates/system/operator/operator.html +++ b/src/main/resources/templates/system/operator/operator.html @@ -135,7 +135,7 @@ admin.finishPopupCenter(); } else if (data.code == 401) { layer.msg(result.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { diff --git a/src/main/resources/templates/system/operator/setpwd.html b/src/main/resources/templates/system/operator/setpwd.html index 2e9085ed..53f4fef6 100644 --- a/src/main/resources/templates/system/operator/setpwd.html +++ b/src/main/resources/templates/system/operator/setpwd.html @@ -58,11 +58,11 @@ layer.closeAll('loading'); if (result.code == 200) { layer.msg(result.msg, {icon: 1, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); } else if (data.code == 401) { layer.msg(result.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { diff --git a/src/main/resources/templates/system/operator/userinfor.html b/src/main/resources/templates/system/operator/userinfor.html index 7dd159af..1193ef31 100644 --- a/src/main/resources/templates/system/operator/userinfor.html +++ b/src/main/resources/templates/system/operator/userinfor.html @@ -79,7 +79,7 @@ layer.msg(result.msg, {icon: 1}); } else if (data.code == 401) { layer.msg(result.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { diff --git a/src/main/resources/templates/system/param/apiclientform.html b/src/main/resources/templates/system/param/apiclientform.html index 6f9ed72d..94353f78 100644 --- a/src/main/resources/templates/system/param/apiclientform.html +++ b/src/main/resources/templates/system/param/apiclientform.html @@ -58,7 +58,7 @@ admin.finishPopupCenter(); } else if (data.code == 401) { layer.msg(result.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { diff --git a/src/main/resources/templates/system/param/apiclientpara.html b/src/main/resources/templates/system/param/apiclientpara.html index a6965b23..4c8e214e 100644 --- a/src/main/resources/templates/system/param/apiclientpara.html +++ b/src/main/resources/templates/system/param/apiclientpara.html @@ -91,7 +91,7 @@ layer.msg(data.msg, {icon: 1}); } else if (data.code == 401) { layer.msg(data.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { @@ -122,7 +122,7 @@ layer.msg(data.msg, {icon: 1}); } else if (data.code == 401) { layer.msg(data.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { @@ -152,7 +152,7 @@ layer.msg("修改成功", {icon: 1}); } else if (data.code == 401) { layer.msg(data.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { diff --git a/src/main/resources/templates/system/param/businesspara.html b/src/main/resources/templates/system/param/businesspara.html index 4fa6a23e..0da59dd2 100644 --- a/src/main/resources/templates/system/param/businesspara.html +++ b/src/main/resources/templates/system/param/businesspara.html @@ -80,7 +80,7 @@ layer.msg(data.msg, {icon: 1}); } else if (data.code == 401) { layer.msg(data.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { @@ -112,7 +112,7 @@ obj.update({ paraval: value }); } else if (data.code == 401) { layer.msg(data.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { diff --git a/src/main/resources/templates/system/param/busparaform.html b/src/main/resources/templates/system/param/busparaform.html index b9d48c2c..39dd9de9 100644 --- a/src/main/resources/templates/system/param/busparaform.html +++ b/src/main/resources/templates/system/param/busparaform.html @@ -70,7 +70,7 @@ admin.finishPopupCenter(); } else if (result.code == 401) { layer.msg(result.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { diff --git a/src/main/resources/templates/system/param/paytype.html b/src/main/resources/templates/system/param/paytype.html index 32ceb045..94ce96a7 100644 --- a/src/main/resources/templates/system/param/paytype.html +++ b/src/main/resources/templates/system/param/paytype.html @@ -137,7 +137,7 @@ table.reload('paytypeTable'); } else if (data.code == 401) { layer.msg(data.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { @@ -179,7 +179,7 @@ layer.msg(data.msg, {icon: 1, time: 1000}); } else if (data.code == 401) { layer.msg(data.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { @@ -206,7 +206,7 @@ layer.msg("修改成功", {icon: 1, time: 1000}); } else if (data.code == 401) { layer.msg(data.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { @@ -235,7 +235,7 @@ layer.msg(data.msg, {icon: 1, time: 1000}); } else if (data.code == 401) { layer.msg(data.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { diff --git a/src/main/resources/templates/system/param/paytypeconfig.html b/src/main/resources/templates/system/param/paytypeconfig.html index 47df096e..ad6c9cff 100644 --- a/src/main/resources/templates/system/param/paytypeconfig.html +++ b/src/main/resources/templates/system/param/paytypeconfig.html @@ -58,7 +58,7 @@ admin.finishPopupCenter(); } else if (result.code == 401) { layer.msg(result.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { diff --git a/src/main/resources/templates/system/param/paytypeform.html b/src/main/resources/templates/system/param/paytypeform.html index 4e65d265..e3a2d5ae 100644 --- a/src/main/resources/templates/system/param/paytypeform.html +++ b/src/main/resources/templates/system/param/paytypeform.html @@ -96,7 +96,7 @@ admin.finishPopupCenter(); } else if (result.code == 401) { layer.msg(result.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { @@ -104,9 +104,8 @@ layer.msg(result.msg, {icon: 2}); } }, - error : function() { - layer.closeAll('loading'); - layer.msg("请求服务器失败!", {icon: 2}); + error : function(err){ + admin.errorBack(err); } }); return false; diff --git a/src/main/resources/templates/system/param/syspara.html b/src/main/resources/templates/system/param/syspara.html index 98a622da..f49293b9 100644 --- a/src/main/resources/templates/system/param/syspara.html +++ b/src/main/resources/templates/system/param/syspara.html @@ -79,7 +79,7 @@ layer.msg("修改成功", {icon: 1}); } else if (data.code == 401) { layer.msg(data.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { diff --git a/src/main/resources/templates/system/role/form.html b/src/main/resources/templates/system/role/form.html index 2595cd6c..d60bac8c 100755 --- a/src/main/resources/templates/system/role/form.html +++ b/src/main/resources/templates/system/role/form.html @@ -54,7 +54,7 @@ admin.finishPopupCenter(); } else if (result.code == 401) { layer.msg(result.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { diff --git a/src/main/resources/templates/system/role/func.html b/src/main/resources/templates/system/role/func.html index 48d6dffc..aeca844f 100755 --- a/src/main/resources/templates/system/role/func.html +++ b/src/main/resources/templates/system/role/func.html @@ -39,7 +39,7 @@ initTree(data.node); } else if (data.code == 401) { layer.msg(data.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { @@ -72,7 +72,7 @@ admin.finishPopupCenter(); } else if (data.code == 401) { layer.msg(data.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { diff --git a/src/main/resources/templates/system/role/index.html b/src/main/resources/templates/system/role/index.html index ac290f7d..f92912f9 100644 --- a/src/main/resources/templates/system/role/index.html +++ b/src/main/resources/templates/system/role/index.html @@ -103,7 +103,7 @@ layer.msg(data.msg, {icon: 1}); } else if (data.code == 401) { layer.msg(data.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { diff --git a/src/main/resources/templates/system/shop/config.html b/src/main/resources/templates/system/shop/config.html index 0ef4224b..38f6b8ac 100644 --- a/src/main/resources/templates/system/shop/config.html +++ b/src/main/resources/templates/system/shop/config.html @@ -97,7 +97,7 @@ initTree(data.data); } else if (data.code == 401) { layer.msg(data.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { @@ -187,7 +187,7 @@ table.reload('shopPaytypeTable'); } else if (data.code == 401) { layer.msg(data.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { @@ -224,7 +224,7 @@ layer.msg(data.msg, {icon: 1, time: 1000}); } else if (data.code == 401) { layer.msg(data.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { diff --git a/src/main/resources/templates/system/shop/configform.html b/src/main/resources/templates/system/shop/configform.html index b67a791e..e0bd6201 100644 --- a/src/main/resources/templates/system/shop/configform.html +++ b/src/main/resources/templates/system/shop/configform.html @@ -82,7 +82,7 @@ admin.finishPopupCenter(); } else if (result.code == 401) { layer.msg(result.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { diff --git a/src/main/resources/templates/system/shop/configpara.html b/src/main/resources/templates/system/shop/configpara.html index a657d7c1..6e77151a 100644 --- a/src/main/resources/templates/system/shop/configpara.html +++ b/src/main/resources/templates/system/shop/configpara.html @@ -60,7 +60,7 @@ admin.finishPopupCenter(); } else if (result.code == 401) { layer.msg(result.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { diff --git a/src/main/resources/templates/system/shop/index.html b/src/main/resources/templates/system/shop/index.html index f5e1b7b9..000ef7d1 100644 --- a/src/main/resources/templates/system/shop/index.html +++ b/src/main/resources/templates/system/shop/index.html @@ -227,7 +227,7 @@ flag = true; } else if (result.code == 401) { layer.msg(result.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); } else { console.log('err:' + result.code); @@ -291,7 +291,7 @@ $("#shop-info").hide(); } else if (result.code == 401) { layer.msg(result.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { @@ -354,7 +354,7 @@ $("#shop-info").show(); } else if (data.code == 401) { layer.msg(data.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { @@ -371,7 +371,7 @@ initTree(data.data); } else if (data.code == 401) { layer.msg(data.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { diff --git a/src/main/resources/templates/system/user/account.html b/src/main/resources/templates/system/user/account.html index eed369fe..b08eb5ca 100644 --- a/src/main/resources/templates/system/user/account.html +++ b/src/main/resources/templates/system/user/account.html @@ -97,7 +97,7 @@ layer.msg(data.msg, {icon: 1}); } else if (data.code == 401) { layer.msg(data.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { diff --git a/src/main/resources/templates/system/user/add.html b/src/main/resources/templates/system/user/add.html index e137c488..e2f2c814 100755 --- a/src/main/resources/templates/system/user/add.html +++ b/src/main/resources/templates/system/user/add.html @@ -91,7 +91,7 @@ admin.finishPopupCenter(); } else if (result.code == 401) { layer.msg(result.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { diff --git a/src/main/resources/templates/system/user/bind.html b/src/main/resources/templates/system/user/bind.html index 96bca04d..e5ea4d5a 100755 --- a/src/main/resources/templates/system/user/bind.html +++ b/src/main/resources/templates/system/user/bind.html @@ -57,7 +57,7 @@ layer.msg(data.msg, {icon: 1}); } else if (data.code == 401) { layer.msg(data.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } diff --git a/src/main/resources/templates/system/user/index.html b/src/main/resources/templates/system/user/index.html index 122bbbbc..df7a1d5e 100644 --- a/src/main/resources/templates/system/user/index.html +++ b/src/main/resources/templates/system/user/index.html @@ -132,7 +132,7 @@ layer.msg(data.msg, {icon: 1}); } else if (data.code == 401) { layer.msg(data.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { diff --git a/src/main/resources/templates/system/user/point.html b/src/main/resources/templates/system/user/point.html index 618145b8..f5881102 100644 --- a/src/main/resources/templates/system/user/point.html +++ b/src/main/resources/templates/system/user/point.html @@ -74,7 +74,7 @@ layer.msg(data.msg, {icon: 1}); } else if (data.code == 401) { layer.msg(data.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { diff --git a/src/main/resources/templates/system/user/pointdtl.html b/src/main/resources/templates/system/user/pointdtl.html index e5f63789..9be6caf6 100644 --- a/src/main/resources/templates/system/user/pointdtl.html +++ b/src/main/resources/templates/system/user/pointdtl.html @@ -75,7 +75,7 @@ layer.msg(data.msg, {icon: 1}); } else if (data.code == 401) { layer.msg(data.msg, {icon: 2, time: 1500}, function () { - location.replace('/login'); + location.replace('[[@{/login}]]'); }, 1000); return; } else { -- 2.17.1