123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- const index = () => import('@/views/index/index.vue')
- // const index2 = () => import('@/views/index/index.vue')
- const cases = () => import('@/views/cases/index.vue')
- const cases_Read = () => import('@/views/cases/read.vue')
- const services = () => import('@/views/services/index.vue')
- const services_Read = () => import('@/views/services/read.vue')
- const news = () => import('@/views/news/index.vue')
- const news_Read = () => import('@/views/news/read.vue')
- const about = () => import('@/views/about/index.vue')
- import { createRouter, createMemoryHistory, createWebHistory } from 'vue-router'
- const routes = [
- {
- path: "/index",
- name: "首页",
- component: index,
- meta: {
- title: "首页",
- keepAlive: false
- }
- },
- {
- path: "/cases",
- name: "客户案例",
- component: cases,
- meta: {
- title: "客户案例",
- keepAlive: false
- }
- },
- {
- path: "/cases_Read",
- name: "案例详情页",
- component: cases_Read,
- meta: {
- title: "案例详情页",
- keepAlive: false
- }
- },
-
- {
- path: "/services",
- name: "产品服务",
- component: services,
- meta: {
- title: "产品服务",
- keepAlive: false
- }
- },
- {
- path: "/services_Read",
- name: "产品详情页",
- component: services_Read,
- meta: {
- title: "产品详情页",
- keepAlive: false
- }
- },
- {
- path: "/news",
- name: "新闻动态",
- component: news,
- meta: {
- title: "新闻动态",
- keepAlive: false
- }
- },
- {
- path: "/news_Read",
- name: "新闻详情",
- component: news_Read,
- meta: {
- title: "新闻详情",
- keepAlive: false
- }
- },
- {
- path: "/about",
- name: "关于永天",
- component: about,
- meta: {
- title: "关于永天",
- keepAlive: false
- }
- }
- ]
- // const router = createRouter({
- // history: import.meta.env.SSR ? createMemoryHistory() : createWebHistory(),
- // routes
- // })
- // export default router
- export function createSSRRouter(){
- return createRouter({
- history: import.meta.env.SSR ? createMemoryHistory() : createWebHistory(),
- routes
- })
- }
|