71b6a3a8 by lihua

fix

1 parent a6fe3478
...@@ -8,6 +8,8 @@ VITE_API_BASEURL = https://daop-zcgl-test.zgsjzc.com/ ...@@ -8,6 +8,8 @@ VITE_API_BASEURL = https://daop-zcgl-test.zgsjzc.com/
8 8
9 VITE_IDASS_BASEURL = https://daop-test.zgsjzc.com/portalLogin 9 VITE_IDASS_BASEURL = https://daop-test.zgsjzc.com/portalLogin
10 10
11 VITE_IDASS_BASEURL = https://idaas-test.csbr.cn/login
12
11 # 平台用户 接口请地址 13 # 平台用户 接口请地址
12 VITE_APP_USER_API_BASEURL = gateway-server 14 VITE_APP_USER_API_BASEURL = gateway-server
13 15
......
...@@ -42,7 +42,7 @@ router.beforeEach(async (to, from, next) => { ...@@ -42,7 +42,7 @@ router.beforeEach(async (to, from, next) => {
42 // name: 'login', 42 // name: 'login',
43 // replace: true, 43 // replace: true,
44 // }) 44 // })
45 window.location.href = userStore.idassLoginUrl; 45 window.location.href = import.meta.env.VITE_IDASS_BASEURL;
46 } 46 }
47 else if (to.name == 'scenes') { 47 else if (to.name == 'scenes') {
48 next({ 48 next({
...@@ -131,7 +131,7 @@ router.beforeEach(async (to, from, next) => { ...@@ -131,7 +131,7 @@ router.beforeEach(async (to, from, next) => {
131 next() 131 next()
132 } 132 }
133 else if (!to.query.code && to.name !== 'login') { 133 else if (!to.query.code && to.name !== 'login') {
134 window.location.href = userStore.idassLoginUrl; 134 window.location.href = import.meta.env.VITE_IDASS_BASEURL;
135 // next({ 135 // next({
136 // name: 'login', 136 // name: 'login',
137 // query: { 137 // query: {
......
...@@ -176,7 +176,7 @@ const useUserStore = defineStore( ...@@ -176,7 +176,7 @@ const useUserStore = defineStore(
176 menuStore.setActived(0) 176 menuStore.setActived(0)
177 tabbar.value = [] 177 tabbar.value = []
178 tabbarMap.value = {} 178 tabbarMap.value = {}
179 window.location.href = idassLoginUrl.value + '?logout=1'; 179 window.location.href = idassLoginUrl + '?logout=1';
180 }); 180 });
181 } else { 181 } else {
182 let hasCode = localStorage.getItem('code'); 182 let hasCode = localStorage.getItem('code');
...@@ -195,7 +195,7 @@ const useUserStore = defineStore( ...@@ -195,7 +195,7 @@ const useUserStore = defineStore(
195 tabbar.value = [] 195 tabbar.value = []
196 tabbarMap.value = {} 196 tabbarMap.value = {}
197 if (hasCode) { 197 if (hasCode) {
198 window.location.href = idassLoginUrl.value + '?logout=1'; 198 window.location.href = idassLoginUrl + '?logout=1';
199 } else { 199 } else {
200 router.push({ 200 router.push({
201 name: 'login', 201 name: 'login',
...@@ -313,7 +313,6 @@ const useUserStore = defineStore( ...@@ -313,7 +313,6 @@ const useUserStore = defineStore(
313 permissions, 313 permissions,
314 isLogin, 314 isLogin,
315 isLoginOut, 315 isLoginOut,
316 idassLoginUrl,
317 getTokenPromise, 316 getTokenPromise,
318 getToken, 317 getToken,
319 login, 318 login,
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!