test : 测试cas登录
This commit is contained in:
22
src/views/cas-login/index.vue
Normal file
22
src/views/cas-login/index.vue
Normal file
@@ -0,0 +1,22 @@
|
||||
<script setup>
|
||||
import {useRouter} from 'vue-router';
|
||||
import {useAuthStore} from '@/stores/userstore'
|
||||
import {ElLoading} from 'element-plus'
|
||||
|
||||
const authStore = useAuthStore()
|
||||
const router = useRouter();
|
||||
const tokenValue = reactive(router.currentRoute.value.query.token)
|
||||
console.log('tokenValue', tokenValue)
|
||||
const init = () => {
|
||||
// console.log('authStore.casToken(tokenValue)',authStore.casToken(tokenValue))
|
||||
if (authStore.casToken(tokenValue)) {
|
||||
// ElLoading.service({text: '正在加载系统资源', background: '#409eff', lock: true})
|
||||
router.push('/')
|
||||
}
|
||||
// else {
|
||||
// router.push('/login')
|
||||
// }
|
||||
}
|
||||
init()
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user