zpf 11 mēneši atpakaļ
vecāks
revīzija
18ec5459cc
2 mainītis faili ar 11 papildinājumiem un 5 dzēšanām
  1. 11 3
      src/router/index.js
  2. 0 2
      src/views/map3d.vue

+ 11 - 3
src/router/index.js

@@ -70,9 +70,17 @@ let routerPush = Router.prototype.push;
 Router.prototype.push = function push(location) {
     return routerPush.call(this, location).catch(err => err)
 }
-
-export default new Router({
+const router = new Router({
     mode: 'history', // 去掉url中的#
     scrollBehavior: () => ({ y: 0 }),
     routes: constantRoutes
-})
+})
+router.afterEach((to, from) => {
+
+    // // 三维报建
+    // if (to.path == "/checkmodel") {
+
+    // }
+
+})
+export default router;

+ 0 - 2
src/views/map3d.vue

@@ -135,8 +135,6 @@ export default {
       this.$refs.routeViewRef["switch"]();
     },
     handleMenuSelect(item) {
-      console.log(item);
-
       this.$router.push({ path: item });
       // 菜单切换的时候取消左或者右高亮菜单
       // var lis = document.querySelectorAll('.el-menu-demo1 li');