23 lines
639 B
Vue
23 lines
639 B
Vue
<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>
|
|
|