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