fix: fix incorrent usage of vue router

This commit is contained in:
张传龙 2022-07-17 14:54:45 +08:00
parent 6ec5588ed4
commit 40f9ac1a6b
2 changed files with 2 additions and 2 deletions

View File

@ -3,6 +3,6 @@ import { router } from '@/router'
export function toLogin() { export function toLogin() {
router.replace({ router.replace({
path: '/login', path: '/login',
query: { ...router.currentRoute.query, redirect: router.currentRoute.path }, query: { ...router.currentRoute.value.query, redirect: router.currentRoute.value.path },
}) })
} }

View File

@ -53,7 +53,7 @@ import { useStorage } from '@vueuse/core'
const title = import.meta.env.VITE_APP_TITLE const title = import.meta.env.VITE_APP_TITLE
const router = useRouter() const router = useRouter()
const query = unref(router.currentRoute).query const { query } = useRoute()
const loginInfo = ref({ const loginInfo = ref({
name: '', name: '',