Explorar el Código

Merge branch 'develop' of gitadmin/tuoheng_pilot_web into release

pull/123/head
zhangtao hace 1 año
padre
commit
f275bfafdc
Se han modificado 1 ficheros con 13 adiciones y 10 borrados
  1. +13
    -10
      src/views/login/index.vue

+ 13
- 10
src/views/login/index.vue Ver fichero

@@ -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()

Cargando…
Cancelar
Guardar