| | |
| | | const code = route.query.code as string; |
| | | const state = route.query.state as string; |
| | | const source = route.query.source as string; |
| | | const tenantId = localStorage.getItem('tenantId') ? (localStorage.getItem('tenantId') as string) : '000000'; |
| | | const tenantId = route.query.tenantId as string ? route.query.tenantId as string : '000000'; |
| | | |
| | | const processResponse = async (res: any) => { |
| | | if (res.code !== 200) { |
| | | throw new Error(res.msg); |
| | | } |
| | | if (res.data !== null) { |
| | | if (res.data !== null && res.data.access_token !== null) { |
| | | setToken(res.data.access_token); |
| | | } |
| | | ElMessage.success(res.msg); |
| | | setTimeout(() => { |
| | | location.href = import.meta.env.VITE_APP_CONTEXT_PATH + 'index'; |
| | | if (res.data !== null && res.data.domain !== null) { |
| | | location.href = res.data.domain + import.meta.env.VITE_APP_CONTEXT_PATH + 'index'; |
| | | } else { |
| | | location.href = import.meta.env.VITE_APP_CONTEXT_PATH + 'index'; |
| | | } |
| | | }, 2000); |
| | | }; |
| | | |