马宇豪
2023-11-23 c6144c9892e370edf4dc747cbb327d0924791fe0
修改名称
已重命名1个文件
已修改3个文件
12 ■■■■ 文件已修改
src/layout/components/Register/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/permission.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/homePage.vue 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/components/Register/index.vue
@@ -135,7 +135,7 @@
          dangerouslyUseHTMLString: true,
          type: "success",
        }).then(() => {
          router.push("/login");
          router.push("/homePage");
        }).catch(() => {});
      }).catch(() => {
        loading.value = false;
src/permission.js
@@ -11,14 +11,14 @@
NProgress.configure({ showSpinner: false });
const whiteList = ['/login'];
const whiteList = ['/homePage'];
router.beforeEach((to, from, next) => {
  NProgress.start()
  if (getToken()) {
    to.meta.title && useSettingsStore().setTitle(to.meta.title)
    /* has token*/
    if (to.path === '/login') {
    if (to.path === '/homePage') {
      next({ path: '/' })
      NProgress.done()
    } else {
@@ -52,7 +52,7 @@
      // 在免登录白名单,直接进入
      next()
    } else {
      next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
      next(`/homePage?redirect=${to.fullPath}`) // 否则全部重定向到登录页
      NProgress.done()
    }
  }
src/router/index.js
@@ -38,8 +38,8 @@
    ]
  },
  {
    path: '/login',
    component: () => import('@/views/login'),
    path: '/homePage',
    component: () => import('@/views/homePage'),
    hidden: true
  },
  {
src/views/homePage.vue