应急管理厅专家管理系统
马宇豪
2023-11-23 c6144c9892e370edf4dc747cbb327d0924791fe0
修改名称
1 files renamed
3 files modified
12 ■■■■ changed files
src/layout/components/Register/index.vue 2 ●●● patch | view | raw | blame | history
src/permission.js 6 ●●●● patch | view | raw | blame | history
src/router/index.js 4 ●●●● patch | view | raw | blame | history
src/views/homePage.vue patch | view | raw | blame | history
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