Commit ca384a7c authored by guxukai's avatar guxukai

chore: index 设为根路径

parent df530d34
- [x] [登录注册入口](./entry)
- [x] [登录注册入口](./index)
- [ ] [个人控制台](./account)
- [ ] [联盟控制台](./federation)
- [ ] [企业控制台](./organization)
......
import { createRouter, createWebHistory } from 'vue-router'
import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
import { SYSTEM_ROUTES } from '@shared/router/constants'
const FIXED_ROUTES = [
const FIXED_ROUTES: RouteRecordRaw[] = [
{
path: '/login',
path: '',
name: 'login',
component: () => import('@entry/views/fixed/login/index.vue'),
alias: '/login',
component: () => import('@index/views/fixed/login/index.vue'),
},
{
path: '/proxy',
name: 'proxy',
component: () => import('@entry/views/fixed/proxy/index.vue'),
component: () => import('@index/views/fixed/proxy/index.vue'),
},
{
path: '/retrieve',
name: 'retrieve',
component: () => import('@entry/views/fixed/retrieve/index.vue'),
component: () => import('@index/views/fixed/retrieve/index.vue'),
},
{
path: '/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]
export const router = createRouter({
history: createWebHistory('/entry'),
history: createWebHistory('/'),
routes,
})
......@@ -256,7 +256,7 @@ const {
const handleLogout = () => {
logoutRun().then(res => {
if (res?.code === GATEWAY_CODE.success) {
window.location.replace(window.location.origin + '/entry/login')
window.location.replace(window.location.origin + '/login')
} else {
MessageUtils.warning(res?.message)
}
......
......@@ -37,7 +37,7 @@ export const zookeeper = (router: Router): void => {
if (isInWhiteList) {
next()
} else {
window.location.replace(window.location.origin + '/entry/login')
window.location.replace(window.location.origin + '/login')
}
}
})
......
......@@ -31,7 +31,7 @@
"@organization/*": ["src/organization/*"],
"@super/*": ["src/super/*"],
"@system/*": ["src/system/*"],
"@entry/*": ["src/entry/*"],
"@index/*": ["src/index/*"],
},
"lib": [
"esnext",
......
......@@ -101,7 +101,7 @@ module.exports = defineConfig({
.set('@organization', resolve('src/pages/organization'))
.set('@super', resolve('src/pages/super'))
.set('@system', resolve('src/pages/system'))
.set('@entry', resolve('src/pages/entry'))
.set('@index', resolve('src/pages/index'))
config.plugins.delete('named-chunks')
config.store.set('devtool', 'eval-source-map')
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