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