From 14bd3c2946989c51c54ca4b17d5f1d495ad91ab8 Mon Sep 17 00:00:00 2001 From: cwchen <1048842385@qq.com> Date: Wed, 10 Apr 2024 15:41:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E5=85=B1js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/publics/public.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/publics/public.js b/js/publics/public.js index a170af5..553c02b 100644 --- a/js/publics/public.js +++ b/js/publics/public.js @@ -47,7 +47,9 @@ function loginout(type) { } }); } else if (result.code === 500) { - layer.msg(result.msg, { icon: 2 }); + layer.msg("登出失败", { icon: 2 }); + }else if(result.code === 401 || result.code === 403){ + backLoginPage(); } }, function (xhr) { error(xhr) @@ -71,6 +73,8 @@ function backLoginPage() { top.location.href = login_sg_page; } else if (zhgd_type === "1") { top.location.href = login_sc_page; + }else { + top.location.href = login_sc_page; } } //判断字符是否为空的方法