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

import allMedia from "./allMedia";
import easyDiffusion from "./easyDiffusion";
import task from "./task";

import NotFound from "../errorPage/404.vue";

const router = createRouter({
  history: createWebHashHistory(process.env.BASE_URL),
  routes: [
    // 稿前校对-全媒体平台
    {
      path: '/Home',
      name: 'Home',
      component: () =>
        import(/* webpackChunkName: "Home" */ '../view/onlineText.vue'),
    },
    // 回看配置-全媒体平台
    {
      path: '/BackLook',
      name: 'BackLook',
      component: () =>
        import(/* webpackChunkName: "Home" */ '../view/backLook/index.vue'),
    },
    ...allMedia,
    ...easyDiffusion,
    ...task,
    {
        path: "/:pathMatch(.*)*",
        name: "NotFound",
        component: NotFound
    }
  ],
});

export default router;
