2024-01-17 17:26:19 +08:00
|
|
|
import { createRouter, createWebHashHistory } from 'vue-router'
|
|
|
|
import type { RouteRecordRaw } from 'vue-router'
|
|
|
|
import type { App } from 'vue'
|
|
|
|
|
|
|
|
export const routes: AppRouteRecordRaw[] = [
|
|
|
|
{
|
|
|
|
path: '/',
|
|
|
|
name: '/',
|
|
|
|
redirect: '/index',
|
|
|
|
hidden: true,
|
|
|
|
meta: {}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/index',
|
|
|
|
name: 'index',
|
|
|
|
component: () => import('@/views/mobile/index.vue'),
|
|
|
|
hidden: true,
|
|
|
|
meta: {}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/login',
|
|
|
|
name: 'login',
|
|
|
|
hidden: true,
|
|
|
|
meta: {},
|
|
|
|
component: () => import('@/views/mobile/login/index.vue')
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/panel',
|
|
|
|
name: 'panel',
|
|
|
|
hidden: true,
|
|
|
|
meta: {},
|
|
|
|
component: () => import('@/views/mobile/panel/index.vue')
|
2024-01-29 15:27:52 +08:00
|
|
|
},
|
2024-03-15 16:29:12 +08:00
|
|
|
{
|
|
|
|
path: '/de-link/:uuid',
|
|
|
|
name: 'link',
|
|
|
|
hidden: true,
|
|
|
|
meta: {},
|
|
|
|
component: () => import('@/views/share/link/mobile.vue')
|
|
|
|
},
|
2024-04-03 11:40:05 +08:00
|
|
|
{
|
|
|
|
path: '/pc/de-link/:uuid',
|
|
|
|
name: 'linkPc',
|
|
|
|
hidden: true,
|
|
|
|
meta: {},
|
|
|
|
component: () => import('@/views/share/link/index.vue')
|
|
|
|
},
|
2024-01-29 15:27:52 +08:00
|
|
|
{
|
|
|
|
path: '/panel/mobile',
|
|
|
|
name: 'mobile',
|
|
|
|
hidden: true,
|
|
|
|
meta: {},
|
|
|
|
component: () => import('@/views/mobile/panel/Mobile.vue')
|
2024-01-17 17:26:19 +08:00
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
const router = createRouter({
|
|
|
|
history: createWebHashHistory(),
|
|
|
|
routes: routes as RouteRecordRaw[]
|
|
|
|
})
|
|
|
|
|
|
|
|
export const setupRouter = (app: App<Element>) => {
|
|
|
|
app.use(router)
|
|
|
|
}
|
|
|
|
|
|
|
|
export default router
|