新增支持API添加用户,查询邮件
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import {createRouter, createWebHistory} from 'vue-router'
|
||||
import {useUiStore} from "@/store/ui.js";
|
||||
import {replace} from "lodash-es";
|
||||
|
||||
const routes = [
|
||||
{
|
||||
@@ -81,7 +82,7 @@ router.beforeEach(async (to, from, next) => {
|
||||
if (!token && to.name !== 'login') {
|
||||
|
||||
return next({
|
||||
name: 'login'
|
||||
name: 'login',
|
||||
})
|
||||
}
|
||||
|
||||
@@ -89,6 +90,10 @@ router.beforeEach(async (to, from, next) => {
|
||||
return next()
|
||||
}
|
||||
|
||||
if (token && to.name === 'login') {
|
||||
next(from.path)
|
||||
}
|
||||
|
||||
next()
|
||||
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user