u
This commit is contained in:
1 parent
07e0001b87
commit
46cbb2f50d
543 files changed
+32576
-4231
No files matched your search
@@ -0,0 +1,108 @@
|
||||
import type { App } from 'vue'
|
||||
import { createRouter, createWebHistory } from 'vue-router'
|
||||
import Layout from '@/layout/index.vue'
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
strict: true,
|
||||
routes: [
|
||||
{
|
||||
path: '/',
|
||||
component: Layout,
|
||||
children: [
|
||||
{
|
||||
path: '/',
|
||||
component: () => import('@/views/home/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/company',
|
||||
component: () => import('@/views/company/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/company/detail/:id',
|
||||
component: () => import('@/views/company/detail.vue'),
|
||||
},
|
||||
{
|
||||
path: '/post',
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
component: () => import('@/views/post/home/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/post/detail/:id',
|
||||
component: () => import('@/views/post/detail/index.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/aboutus',
|
||||
component: () => import('@/views/aboutus/index.vue'),
|
||||
},
|
||||
|
||||
{
|
||||
path: '/im/:type?/:id?',
|
||||
component: () => import('@/views/im/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/settings',
|
||||
component: () => import('@/views/settings/index.vue'),
|
||||
children: [
|
||||
{
|
||||
path: '/settings/info/company',
|
||||
component: () => import('@/views/settings/info/company.vue'),
|
||||
},
|
||||
{
|
||||
path: '/settings/info/user',
|
||||
component: () => import('@/views/settings/info/user/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/settings/creator/home',
|
||||
component: () => import('@/views/settings/creator/home/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/settings/creator/editor',
|
||||
component: () => import('@/views/settings/creator/editor.vue'),
|
||||
},
|
||||
{
|
||||
path: '/settings/creator/post',
|
||||
component: () => import('@/views/settings/creator/post.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/auth/login',
|
||||
name: 'Login',
|
||||
component: () => import('@/views/auth/login.vue'),
|
||||
},
|
||||
{
|
||||
path: '/auth/register',
|
||||
name: 'Register',
|
||||
component: () => import('@/views/auth/register/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/auth/forget',
|
||||
name: 'Forget',
|
||||
component: () => import('@/views/auth/forget.vue'),
|
||||
},
|
||||
{
|
||||
path: '/error/500',
|
||||
name: 'Error',
|
||||
component: () => import('@/views/error/500.vue'),
|
||||
},
|
||||
{
|
||||
path: '/:pathMatch(.*)*',
|
||||
name: 'NotFound',
|
||||
component: () => import('@/views/error/404.vue'),
|
||||
},
|
||||
],
|
||||
scrollBehavior: () => ({ left: 0, top: 0 }),
|
||||
})
|
||||
|
||||
export { router }
|
||||
|
||||
export function setupRouter(app: App) {
|
||||
app.use(router)
|
||||
}
|
||||
Reference in new issue
Block a user