在plugins
下面新建路由守卫文件routeguard.js
,在里面写如下代码
export default ({
app }) => {
app.router.beforeEach(async (to, from, next) => {
在plugins
下面新建路由守卫文件routeguard.js
,在里面写如下代码
export default ({
app }) => {
app.router.beforeEach(async (to, from, next) => {