This commit is contained in:
yuanteng 2024-10-29 18:23:01 +08:00
parent 383486a3c1
commit 9c6a9857c2

View File

@ -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