import { createRouter, createWebHashHistory } from 'vue-router'; export default createRouter({ history: createWebHashHistory(), routes: [ { path: '/', component: () => import('@/views/Home.vue') }, { path: '/trace/:code', component: () => import('@/views/Trace.vue') }, // 后台预览模式:复用 Trace.vue,凭 ?token= 时间令牌访问,不激活/不计数 { path: '/trace/preview/:code', component: () => import('@/views/Trace.vue') }, { path: '/:pathMatch(.*)*', redirect: '/' }, ], });