feature:代码初始化。

This commit is contained in:
tianyongbao
2024-04-19 09:36:13 +08:00
commit 2f89616d14
454 changed files with 111421 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
<template>
<div></div>
</template>
<script setup>
import { useRoute, useRouter } from 'vue-router'
const route = useRoute();
const router = useRouter();
const { params, query } = route
const { path } = params
router.replace({ path: '/' + path, query })
</script>

View File

@@ -0,0 +1,12 @@
<script setup>
import { setToken } from '@/utils/auth'
import { onMounted } from 'vue'
const { proxy } = getCurrentInstance()
onMounted(() => {
const token = proxy.$route.query && proxy.$route.query.token
setToken(token)
const redirect = proxy.$route.query && proxy.$route.query.redirect
proxy.$router.push({ path: redirect || '/' }).catch(() => {})
})
</script>