diff --git a/src/cool/router/index.ts b/src/cool/router/index.ts index ae49e83..0a1b527 100644 --- a/src/cool/router/index.ts +++ b/src/cool/router/index.ts @@ -18,7 +18,8 @@ const routes: RouteRecordRaw[] = [ children: [] }, { - path: "/:pathMatch(.*)*", + path: "/:catchAll(.*)", + name: "404", component: () => import("/$/base/pages/error/404.vue") } ]; @@ -174,9 +175,8 @@ router.beforeEach(async (to, from, next) => { if (!route?.components) { next(user.token ? "/404" : "/login"); } else { - // 注册后重定向 if (!isReg) { - next({ ...to, ...route }); + next(to.fullPath); } else { // 登录成功 if (user.token) { diff --git a/src/modules/base/pages/main/components/process.vue b/src/modules/base/pages/main/components/process.vue index 988da0e..ca62900 100644 --- a/src/modules/base/pages/main/components/process.vue +++ b/src/modules/base/pages/main/components/process.vue @@ -1,7 +1,7 @@