[Ai] chore(init): 初始化项目代码
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
// src/router.ts
|
||||
import { createRouter, createWebHistory, type RouteRecordRaw } from 'vue-router';
|
||||
|
||||
const routes: RouteRecordRaw[] = [
|
||||
{
|
||||
path: '/h5-install',
|
||||
component: () => import('./pages/mobile/h5-install.vue'),
|
||||
},
|
||||
{
|
||||
path: '/b',
|
||||
component: () => import('./pages/land-b/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/works',
|
||||
redirect: (to) => ({ path: '/b', query: { ...to.query, view: 'works' }, hash: to.hash }),
|
||||
},
|
||||
{
|
||||
path: '/',
|
||||
component: () => import('./pages/index.vue'),
|
||||
},
|
||||
{
|
||||
// Google 会导向 /lander,统一回首页;保留 query 与 hash,避免丢失 dc / uid 等渠道参数
|
||||
path: '/lander',
|
||||
redirect: (to) => ({ path: '/', query: to.query, hash: to.hash }),
|
||||
},
|
||||
];
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
routes,
|
||||
});
|
||||
|
||||
export default router;
|
||||
Reference in New Issue
Block a user