From 01d42cce4abdbd5d232d241b1b6b662314cf3999 Mon Sep 17 00:00:00 2001
From: zhaoxiaohao <279049017@qq.com>
Date: Sat, 06 Feb 2021 16:27:33 +0800
Subject: [PATCH] xigai筛查的问题

---
 kidgrow-web/kidgrow-web-manager/src/main/resources/static/module/admin.js |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/kidgrow-web/kidgrow-web-manager/src/main/resources/static/module/admin.js b/kidgrow-web/kidgrow-web-manager/src/main/resources/static/module/admin.js
index 001500a..66bc9a0 100644
--- a/kidgrow-web/kidgrow-web-manager/src/main/resources/static/module/admin.js
+++ b/kidgrow-web/kidgrow-web-manager/src/main/resources/static/module/admin.js
@@ -128,9 +128,16 @@
                 if (jsonRs) {
                     if (jsonRs.code == 401) {
                         config.removeToken();
-                        layer.msg('登录过期', {icon: 2, time: 1500}, function () {
-                            location.replace('/login.html');
-                        }, 1000);
+                        var msg=jsonRs.msg;
+                        if(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;
                     } else if (jsonRs.code == 403) {
                         layer.msg('没有权限', {icon: 2});
@@ -145,7 +152,6 @@
             };
             //发送同步ajax请求
             param.async = false;
-            //console.log(param);
             $.ajax(param);
         },
         // 判断是否有权限

--
Gitblit v1.8.0