Browse Source

解决IOS获取用户失效的问题

songxy 1 year ago
parent
commit
251bba8273
2 changed files with 6 additions and 2 deletions
  1. 1 1
      client_h5/.env.pro
  2. 5 1
      client_h5/src/router/index.ts

+ 1 - 1
client_h5/.env.pro

@@ -1,4 +1,4 @@
-VITE_BASE_URL='http://oa.zjugis.com:28080/'
+VITE_BASE_URL='https://oa.zjugis.com:28080/'
 
 # File上传路径
 VITE_FILE_BASE_URI='/admin-api/infra/file'

+ 5 - 1
client_h5/src/router/index.ts

@@ -25,7 +25,11 @@ router.beforeEach(async (to, from, next) => {
           if (action === 'confirm') {
             closeDialog()
             localStorage.clear();
-            window.location.reload()
+            getUserInfoPromise(false).then((isLoginHttp) => {
+              if (isLoginHttp) {
+                window.location.reload()
+               }
+             })
           }
         },
       })