|
@@ -21,7 +21,7 @@ import { setAppName } from '~uti/tools'
|
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
|
import svg403 from '~src/assets/view/403.svg'
|
|
|
import { initUserConfigInfo, setRouterData } from '~sto/user'
|
|
|
-import { getObjVal } from 'js-fast-way'
|
|
|
+import { getObjVal, isNullES } from 'js-fast-way'
|
|
|
|
|
|
//初始变量
|
|
|
const router = useRouter()
|
|
@@ -37,17 +37,12 @@ const isErrorShow = ref(false)
|
|
|
|
|
|
//渲染完成
|
|
|
onMounted(() => {
|
|
|
- // 域名后加 /#/auth-token?token=xxxxxxx&account=aaaa×tamp=1670233144838&timeInterval=300&moduleCode=UTF-8
|
|
|
- // eslint-disable-next-line no-unsafe-optional-chaining
|
|
|
- const { token, account, timestamp, timeInterval, moduleCode } = useRoutes?.query
|
|
|
- if (token && account && timestamp && timeInterval && moduleCode) {
|
|
|
+ // http://档案的域名/#/auth-token?token=xxxxxxx
|
|
|
+ const token = useRoutes?.query?.token
|
|
|
+ if (!isNullES(token)) {
|
|
|
isErrorShow.value = false
|
|
|
loginByTokenApi({
|
|
|
token: token,
|
|
|
- account: account,
|
|
|
- timestamp: timestamp,
|
|
|
- timeInterval: timeInterval,
|
|
|
- moduleCode: moduleCode,
|
|
|
})
|
|
|
} else {
|
|
|
loading.value = false
|