From f6d390988b1c9b5695338214e95ff0d6da70b300 Mon Sep 17 00:00:00 2001 From: zhaoxiaohao <279049017@qq.com> Date: Wed, 25 Nov 2020 16:34:41 +0800 Subject: [PATCH] 完善功能 --- kidgrow-web/kidgrow-web-manager/src/main/resources/static/assets/js/common.js | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/kidgrow-web/kidgrow-web-manager/src/main/resources/static/assets/js/common.js b/kidgrow-web/kidgrow-web-manager/src/main/resources/static/assets/js/common.js index 5ffbfdb..e1908dc 100644 --- a/kidgrow-web/kidgrow-web-manager/src/main/resources/static/assets/js/common.js +++ b/kidgrow-web/kidgrow-web-manager/src/main/resources/static/assets/js/common.js @@ -269,7 +269,6 @@ }; //从当前页面的url地址中获取参数数据 function getRequest() { - debugger var url = location.search; //获取url中"?"符后的字串 var theRequest = new Object(); if (url.indexOf("?") != -1) { @@ -294,9 +293,16 @@ function permissionsInput(res,config) { if(!strUtil.isEmpty(res)&&res.code==401){ config.removeToken(); - layer.msg('登录过期', {icon: 2, time: 1500}, function () { - location.replace('/login.html'); - }, 1000); + if(res.msg.includes("Access token expired")){ + layer.msg('登录过期', {icon: 2, time: 1500}, function () { + location.replace('/login.html'); + }, 5000); + }else if(msg.includes("Invalid access token")){ + layer.msg('您的账号在其他地方登陆,请重新登录或修改密码', {icon: 2, time: 1500}, function () { + location.replace('/login.html'); + }, 5000); + } + return; } var needpPermissions = $(".permissions"); -- Gitblit v1.8.0