From eecbd88eea7dea9e46ed395e8af8dd29b2af0e86 Mon Sep 17 00:00:00 2001 From: yj <1336058017@qq.com> Date: Thu, 26 Sep 2024 11:10:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.tsx | 2 +- src/page/Login/index.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 60179bc..92a36d8 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -35,7 +35,7 @@ const App: React.FC = () => { useEffect(() => { let userInfo = JSON.parse(storage.getItem('user') as string) let loginInfo = JSON.parse(storage.getItem('login') as string) - if (userInfo) { + if (userInfo && Number(userInfo.perms)) { if (loginInfo && loginInfo.isAutoLogin) { PostLogin({ account: loginInfo.account, diff --git a/src/page/Login/index.tsx b/src/page/Login/index.tsx index 90da6f0..a6bd69b 100644 --- a/src/page/Login/index.tsx +++ b/src/page/Login/index.tsx @@ -320,6 +320,7 @@ const Login: React.FC = () => { if (res.code == 200) { storage.setItem('user', JSON.stringify(res.data)) storage.setItem('userLogin', true) + startSignalr() getRoomRtcToken(anonInfo.roomNum, (options: any) => { if (options) { GetRoomInfo(anonInfo.roomNum).then(async (res) => { @@ -345,7 +346,6 @@ const Login: React.FC = () => { }) } }) - startSignalr() } }) }}>进入