forked from kidgrow-microservices-platform

zhaoxiaohao
2020-08-11 680916effb7cd9e8e1a6a38a27a2e28f4d5eb8d1
kidgrow-web/kidgrow-web-manager/src/main/resources/static/module/admin.js
@@ -128,9 +128,18 @@
                if (jsonRs) {
                    if (jsonRs.code == 401) {
                        config.removeToken();
                        layer.msg('登录过期', {icon: 2, time: 1500}, function () {
                            location.replace('/login.html');
                        }, 1000);
                        // var json=JSON.stringify(jsonRs)
                        // console.log(json,"jsonjsonjsonjsonjsonjsonjson")
                        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});