diff --git a/src/router/index.js b/src/router/index.js index cb9259b..0c62dc0 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -97,6 +97,11 @@ export const constantRoutes = [ } ] }, + { + path: '*', // 匹配未定义的路由 + redirect: '/dashboard', // 重定向 + hidden: true + }, { path: '*', // 匹配未定义的路由 redirect: '/404', // 重定向