Przeglądaj źródła

Merge branch 'develop' of gitadmin/tuoheng_pilot_web into release

pull/123/head
zhangtao 1 rok temu
rodzic
commit
f275bfafdc
1 zmienionych plików z 13 dodań i 10 usunięć
  1. +13
    -10
      src/views/login/index.vue

+ 13
- 10
src/views/login/index.vue Wyświetl plik

@@ -13,6 +13,7 @@ import { useRoute, useRouter } from 'vue-router'
import { useUserStore } from '@/store/modules/user'
import { signinRedirectCallback, signoutRedirectCallback, signoutRedirect, getPath, removePath } from '@/utils/oidc/index.js'
import { updateLoginTime } from '@/api/dashboard/index'
import { nextTick } from '@vue/runtime-core'

export default {
name: 'LoginPage',
@@ -26,16 +27,18 @@ export default {
// router.push({ path: getPath() })
// removePath()
userStore.getUserInfos()
const authority = res.profile.authority
const { VITE_PLATFORM } = import.meta.env
if (authority && (authority.includes(VITE_PLATFORM))) {
router.push({ path: '/' })
} else {
$message.error('暂无权限访问,请联系管理员')
setTimeout(() => {
signoutRedirect()
}, 2000)
}
nextTick(() => {
const authority = res.profile.authority
const { VITE_PLATFORM } = import.meta.env
if (authority && (authority.includes(VITE_PLATFORM))) {
router.push({ path: '/' })
} else {
$message.error('暂无权限访问,请联系管理员')
setTimeout(() => {
signoutRedirect()
}, 2000)
}
})
}).catch(err => {
console.log(err)
signoutRedirect()

Ładowanie…
Anuluj
Zapisz