Commit ca384a7c authored by guxukai's avatar guxukai

chore: index 设为根路径

parent df530d34
- [x] [登录注册入口](./entry) - [x] [登录注册入口](./index)
- [ ] [个人控制台](./account) - [ ] [个人控制台](./account)
- [ ] [联盟控制台](./federation) - [ ] [联盟控制台](./federation)
- [ ] [企业控制台](./organization) - [ ] [企业控制台](./organization)
......
import { createRouter, createWebHistory } from 'vue-router' import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
import { SYSTEM_ROUTES } from '@shared/router/constants' import { SYSTEM_ROUTES } from '@shared/router/constants'
const FIXED_ROUTES = [ const FIXED_ROUTES: RouteRecordRaw[] = [
{ {
path: '/login', path: '',
name: 'login', name: 'login',
component: () => import('@entry/views/fixed/login/index.vue'), alias: '/login',
component: () => import('@index/views/fixed/login/index.vue'),
}, },
{ {
path: '/proxy', path: '/proxy',
name: 'proxy', name: 'proxy',
component: () => import('@entry/views/fixed/proxy/index.vue'), component: () => import('@index/views/fixed/proxy/index.vue'),
}, },
{ {
path: '/retrieve', path: '/retrieve',
name: 'retrieve', name: 'retrieve',
component: () => import('@entry/views/fixed/retrieve/index.vue'), component: () => import('@index/views/fixed/retrieve/index.vue'),
}, },
{ {
path: '/register', path: '/register',
name: 'register', name: 'register',
component: () => import('@entry/views/fixed/register/index.vue'), component: () => import('@index/views/fixed/register/index.vue'),
}, },
] ]
const routes = [...FIXED_ROUTES, ...SYSTEM_ROUTES] const routes = [...FIXED_ROUTES, ...SYSTEM_ROUTES]
export const router = createRouter({ export const router = createRouter({
history: createWebHistory('/entry'), history: createWebHistory('/'),
routes, routes,
}) })
...@@ -256,7 +256,7 @@ const { ...@@ -256,7 +256,7 @@ const {
const handleLogout = () => { const handleLogout = () => {
logoutRun().then(res => { logoutRun().then(res => {
if (res?.code === GATEWAY_CODE.success) { if (res?.code === GATEWAY_CODE.success) {
window.location.replace(window.location.origin + '/entry/login') window.location.replace(window.location.origin + '/login')
} else { } else {
MessageUtils.warning(res?.message) MessageUtils.warning(res?.message)
} }
......
...@@ -37,7 +37,7 @@ export const zookeeper = (router: Router): void => { ...@@ -37,7 +37,7 @@ export const zookeeper = (router: Router): void => {
if (isInWhiteList) { if (isInWhiteList) {
next() next()
} else { } else {
window.location.replace(window.location.origin + '/entry/login') window.location.replace(window.location.origin + '/login')
} }
} }
}) })
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
"@organization/*": ["src/organization/*"], "@organization/*": ["src/organization/*"],
"@super/*": ["src/super/*"], "@super/*": ["src/super/*"],
"@system/*": ["src/system/*"], "@system/*": ["src/system/*"],
"@entry/*": ["src/entry/*"], "@index/*": ["src/index/*"],
}, },
"lib": [ "lib": [
"esnext", "esnext",
......
...@@ -101,7 +101,7 @@ module.exports = defineConfig({ ...@@ -101,7 +101,7 @@ module.exports = defineConfig({
.set('@organization', resolve('src/pages/organization')) .set('@organization', resolve('src/pages/organization'))
.set('@super', resolve('src/pages/super')) .set('@super', resolve('src/pages/super'))
.set('@system', resolve('src/pages/system')) .set('@system', resolve('src/pages/system'))
.set('@entry', resolve('src/pages/entry')) .set('@index', resolve('src/pages/index'))
config.plugins.delete('named-chunks') config.plugins.delete('named-chunks')
config.store.set('devtool', 'eval-source-map') config.store.set('devtool', 'eval-source-map')
isProduction && chainProd(config) isProduction && chainProd(config)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment