diff --git a/src/permission.js b/src/permission.js index 83fbf5f..7513f5c 100644 --- a/src/permission.js +++ b/src/permission.js @@ -12,7 +12,7 @@ router.beforeEach(async (to, from, next) => { if (to.path == "/") { next({ path: "/home" }); } else if (to.matched.length === 0) { - from.name ? next({ name: from.name }) : next({ path: "/404" }); + from.name ? next({ name: from.name }) : next({ path: "/" }); } else { next(); } diff --git a/src/router/index.js b/src/router/index.js index fb4c631..4717909 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -75,7 +75,7 @@ const routes = [ const createRouter = () => new VueRouter({ - base: "/official-website/", + base: "/", mode: "history", routes });