|
@@ -1,8 +1,12 @@
|
|
|
import Vue from 'vue'
|
|
|
import store from '@/store'
|
|
|
import VueRouter from 'vue-router'
|
|
|
-import { query } from '@/utils/query'
|
|
|
-
|
|
|
+import {
|
|
|
+ query
|
|
|
+} from '@/utils/query'
|
|
|
+import {
|
|
|
+ getPvUv
|
|
|
+} from '@/api/public.js'
|
|
|
Vue.use(VueRouter)
|
|
|
const routes = [
|
|
|
// {
|
|
@@ -11,10 +15,12 @@ const routes = [
|
|
|
// },
|
|
|
{
|
|
|
path: '/404',
|
|
|
+ name: "404页面",
|
|
|
component: () => import('../components/404'),
|
|
|
},
|
|
|
{
|
|
|
path: '/group',
|
|
|
+ name: "集团首页",
|
|
|
component: () => import('../views/statistics/index'),
|
|
|
},
|
|
|
// home
|
|
@@ -23,45 +29,52 @@ const routes = [
|
|
|
name: 'home',
|
|
|
component: () => import('../views/index'),
|
|
|
redirect: '/home/homepage',
|
|
|
- children: [
|
|
|
- {
|
|
|
+ children: [{
|
|
|
path: 'homepage',
|
|
|
+ name: '项目首页',
|
|
|
component: () => import('../views/homepage'),
|
|
|
redirect: '/home/overview',
|
|
|
},
|
|
|
//概览
|
|
|
{
|
|
|
path: 'overview',
|
|
|
+ name: '项目概览',
|
|
|
component: () => import('../views/overview'),
|
|
|
},
|
|
|
// 楼层功能
|
|
|
{
|
|
|
path: 'floorFunc',
|
|
|
+ name: '楼层功能',
|
|
|
component: () => import('../views/floorFunc'),
|
|
|
},
|
|
|
// 设备设施
|
|
|
{
|
|
|
path: 'equipment',
|
|
|
+ name: '设备设施',
|
|
|
component: () => import('../views/equipment'),
|
|
|
},
|
|
|
// 其他功能
|
|
|
{
|
|
|
path: 'other',
|
|
|
+ name: '其他事项',
|
|
|
component: () => import('../views/other'),
|
|
|
},
|
|
|
// 分析
|
|
|
{
|
|
|
path: 'analysis',
|
|
|
+ name: '分享报表',
|
|
|
component: () => import('../views/analysis'),
|
|
|
},
|
|
|
//图例库管理
|
|
|
{
|
|
|
path: 'legendLibrary',
|
|
|
+ name: '图例管理',
|
|
|
component: () => import('../views/legendLibrary'),
|
|
|
},
|
|
|
//图例绘制规则
|
|
|
{
|
|
|
path: 'legendRules',
|
|
|
+ name: '绘制规则',
|
|
|
component: () => import('../views/legendRules'),
|
|
|
},
|
|
|
],
|
|
@@ -110,4 +123,17 @@ router.beforeEach(async (to, from, next) => {
|
|
|
return
|
|
|
}
|
|
|
})
|
|
|
-export default router
|
|
|
+// 跳入路由后要对发送pvuv
|
|
|
+router.afterEach((to, from) => {
|
|
|
+ let data = {
|
|
|
+ "type": "router",
|
|
|
+ "target": to.name,
|
|
|
+ "parameter": to.path
|
|
|
+ }
|
|
|
+ getPvUv(data).then(res => {
|
|
|
+ console.log('pvuv', res)
|
|
|
+ }).catch(res => {
|
|
|
+ console.log('error', res)
|
|
|
+ })
|
|
|
+})
|
|
|
+export default router
|