diff --git a/.env b/.env index b2ad9951..14cc6a8e 100644 --- a/.env +++ b/.env @@ -2,7 +2,7 @@ VITE_APP_TITLE=智慧轮渡大数据平台 # 项目本地运行端口号 -VITE_PORT=82 +VITE_PORT=80 # open 运行 npm run dev 时自动打开浏览器 diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 0721651d..31e88c00 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -151,6 +151,7 @@ export default { }, router: { login: '登录', + logout: '登出', socialLogin: '社交登录', home: '首页', analysis: '分析页', diff --git a/src/permission.ts b/src/permission.ts index d538303b..23fea96b 100644 --- a/src/permission.ts +++ b/src/permission.ts @@ -53,7 +53,8 @@ const whiteList = [ '/auth-redirect', '/bind', '/register', - '/oauthLogin/gitee' + '/oauthLogin/gitee', + '/logout' ] // 路由加载前 diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index 989bed96..cdc0a436 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -184,6 +184,16 @@ const remainingRouter: AppRouteRecordRaw[] = [ noTagsView: true } }, + { + path: '/logout', + component: () => import('@/views/Login/Logout.vue'), + name: 'Logout', + meta: { + hidden: true, + title: t('router.logout'), + noTagsView: true + } + }, { path: '/sso', component: () => import('@/views/Login/components/SSOLoginCustom.vue'), diff --git a/src/views/Login/Login.vue b/src/views/Login/Login.vue index 75a5aa23..7b125988 100644 --- a/src/views/Login/Login.vue +++ b/src/views/Login/Login.vue @@ -1,12 +1,7 @@ diff --git a/src/views/Login/Logout.vue b/src/views/Login/Logout.vue new file mode 100644 index 00000000..fc2be454 --- /dev/null +++ b/src/views/Login/Logout.vue @@ -0,0 +1,26 @@ + + + \ No newline at end of file