File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
frontend/src/pages/chatRunning Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -179,7 +179,13 @@ const ChatRunning = () => {
179179
180180 // 校验公共访问页面地址是否访问合规
181181 const validatePage = ( isGuest ) => {
182- return location . pathname . includes ( '/guest' ) ? isGuest : ! isGuest ;
182+ if ( process . env . PACKAGE_MODE === 'spa' ) {
183+ return ! isGuest ;
184+ } else if ( location . pathname . includes ( '/guest' ) ) {
185+ return isGuest ;
186+ } else {
187+ return true ;
188+ }
183189 } ;
184190
185191 useEffect ( ( ) => {
@@ -192,7 +198,7 @@ const ChatRunning = () => {
192198 if ( uid ) {
193199 getAppGuestIsOpen ( uid ) . then ( ( res ) => {
194200 const isGuest = res . data ;
195- if ( process . env . PACKAGE_MODE === 'spa' && ! validatePage ( isGuest ) ) {
201+ if ( ! validatePage ( isGuest ) ) {
196202 setWrongAddress ( true ) ;
197203 return ;
198204 }
You can’t perform that action at this time.
0 commit comments