xiangpei
2024-12-26 dbf408fca06305771a5b7e6445e74a399ff71e22
src/router/index.js
@@ -1,26 +1,68 @@
import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
import CameraController from '../views/CameraController.vue'
import WxCameraPTZ1 from '../views/wx/CameraPTZ1.vue'
import WxCameraPTZ2 from '../views/wx/CameraPTZ2.vue'
import WxCameraPTZ3 from '../views/wx/CameraPTZ3.vue'
import WxCameraPTZ4 from '../views/wx/CameraPTZ4.vue'
import WebCameraPTZ1 from '../views/web/CameraPTZ1.vue'
import WebCameraPTZ2 from '../views/web/CameraPTZ2.vue'
import WebCameraPTZ3 from '../views/web/CameraPTZ3.vue'
import WebCameraPTZ4 from '../views/web/CameraPTZ4.vue'
Vue.use(VueRouter)
const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
    name: 'CameraController',
    component: CameraController
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
    path: '/wx/camera/1',
    name: 'WxCameraPTZ1',
    component: WxCameraPTZ1
  },
  {
    path: '/wx/camera/2',
    name: 'WxCameraPTZ2',
    component: WxCameraPTZ2
  },
  {
    path: '/wx/camera/3',
    name: 'WxCameraPTZ3',
    component: WxCameraPTZ3
  },
  {
    path: '/wx/camera/4',
    name: 'WxCameraPTZ4',
    component: WxCameraPTZ4
  },
  {
    path: '/web/camera/1',
    name: 'WebCameraPTZ1',
    component: WebCameraPTZ1
  },
  {
    path: '/web/camera/2',
    name: 'WebCameraPTZ2',
    component: WebCameraPTZ2
  },
  {
    path: '/web/camera/3',
    name: 'WebCameraPTZ3',
    component: WebCameraPTZ3
  },
  {
    path: '/web/camera/4',
    name: 'WebCameraPTZ4',
    component: WebCameraPTZ4
  }
]
const router = new VueRouter({
  mode: 'history',
  routes
})