1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
| import Vue from 'vue'
| import VueRouter from 'vue-router'
|
| import control from '../components/control.vue'
| import videoList from '../components/videoList.vue'
| import channelList from '../components/channelList.vue'
| import login from '../components/Login.vue'
| import parentPlatformList from '../components/ParentPlatformList.vue'
|
| const originalPush = VueRouter.prototype.push
| VueRouter.prototype.push = function push(location) {
| return originalPush.call(this, location).catch(err => err)
| }
|
| Vue.use(VueRouter)
|
|
| export default new VueRouter({
| mode:'hash',
| routes: [
| {
| path: '/',
| component: control,
| },
| {
| path: '/videoList',
| component: videoList,
| },
| {
| path: '/login',
| name: '登录',
| component: login,
| },
| {
| path: '/channelList/:deviceId/:parentChannelId/:count/:page',
| name: 'channelList',
| component: channelList,
| },,
| {
| path: '/parentPlatformList/:count/:page',
| name: 'parentPlatformList',
| component: parentPlatformList,
| },
| ]
| })
|
|