import { createRouter, createWebHashHistory } from 'vue-router';

const routes = [
  // 定义你的路由规则
  {
    path: '/',
    redirect: '/home',
  },
  {
    path: '/demo',
    name: 'DemoHome',
    component: () => import('../views/demo/Home.vue'),
  },
  {
    path: '/home',
    name: 'home',
    component: () => import('../views/HomeView.vue'),
  },
  {
    path:'/detail',
    name:'detail',
    component:()=>import('../views/DetailView.vue')
  },
  {
    path:'/result',
    name:'result',
    component:()=>import('../views/ResultView.vue')
  },
  {
    path: '/demo/pic',
    name: 'DemoPic',
    component: () => import('../views/demo/Pic.vue'),
  },
  {
    path: '/demo/asr',
    name: 'DemoAsr',
    component: () => import('../views/demo/Asr.vue'),
  },
  {
    path: '/demo/asrDemo',
    name: 'DemoAsrDemo',
    component: () => import('../views/demo/AsrDemo.vue'),
  },
  {
    path: '/demo/tts',
    name: 'DemoTts',
    component: () => import('../views/demo/Tts.vue'),
  },
  {
    path: '/demo/steam',
    name: 'DemoSteam',
    component: () => import('../views/demo/Steam.vue'),
  },
  {
    path: '/chatTts',
    name: 'ChatTts',
    component: () => import('../views/ChatTts.vue'),
  }
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;
