test
This commit is contained in:
parent
383486a3c1
commit
9c6a9857c2
|
@ -10,8 +10,8 @@ const router = createRouter({
|
||||||
//路由的请求拦截器
|
//路由的请求拦截器
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
const store = userStore()
|
const store = userStore()
|
||||||
console.log(to.name,123213123)
|
|
||||||
if (to.name == 'login') {
|
if (to.name == 'login') {
|
||||||
|
//当回到登录页时,清空pinia
|
||||||
store.$reset()
|
store.$reset()
|
||||||
next()
|
next()
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue
Block a user