2020-10-12 10:11:24 +08:00
|
|
|
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'
|
2020-11-20 18:02:01 +08:00
|
|
|
import parentPlatformList from '../components/ParentPlatformList.vue'
|
2020-10-12 10:11:24 +08:00
|
|
|
|
|
|
|
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,
|
2020-12-16 20:29:19 +08:00
|
|
|
},
|
2020-11-20 18:02:01 +08:00
|
|
|
{
|
2020-11-23 18:17:20 +08:00
|
|
|
path: '/parentPlatformList/:count/:page',
|
2020-11-20 18:02:01 +08:00
|
|
|
name: 'parentPlatformList',
|
|
|
|
component: parentPlatformList,
|
2020-10-12 10:11:24 +08:00
|
|
|
},
|
|
|
|
]
|
|
|
|
})
|