From 07b489356b394414f7b28ca2a0472ab6539be7a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com> Date: Thu, 11 Jun 2020 22:18:52 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E7=99=BB=E5=BD=95=E8=B6=85?= =?UTF-8?q?=E6=97=B6=E4=B9=8B=E5=90=8E=E4=B8=8D=E9=80=80=E5=87=BA=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- erp_web/js/modules/sys/userInfo.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/erp_web/js/modules/sys/userInfo.js b/erp_web/js/modules/sys/userInfo.js index 5409fd2f..26de41ce 100644 --- a/erp_web/js/modules/sys/userInfo.js +++ b/erp_web/js/modules/sys/userInfo.js @@ -11,12 +11,13 @@ $.ajax({ sessionStorage.setItem("userId", user.id); if (user.username) { $(".main-header .user-menu .hidden-xs,.main-sidebar .info p").text(user.username); - } else { - top.location.href = '/login.html'; } - } else { - top.location.href = '/login.html'; } + } else { + top.location.href = '/login.html'; } + }, + error: function () { + top.location.href = '/login.html'; } -}); \ No newline at end of file +});