Browse Source

2021-8-21

hwq 4 years ago
parent
commit
afde3074ae
2 changed files with 7 additions and 58 deletions
  1. 0 23
      src/components/navBar/NavBar.vue
  2. 7 35
      src/router/index.js

+ 0 - 23
src/components/navBar/NavBar.vue

@@ -61,33 +61,10 @@ export default {
 				console.log(this.currentIndex);
 				this.$router.push(url);
 			}
-<<<<<<< HEAD
 		],
 		currentIndex: 0
 	};
   },
-  computed: {
-	  currentUrl() {
-		  return this.$route.path
-	  }
-  },
-  methods: {
-	  navClick(url,index) {
-		  let currentUrl = this.$route.path
-		  if(currentUrl === url) {
-			  return 
-		  }else {
-			 this.currentIndex = index
-			 this.$router.push(url) 
-		  }
-		  
-		  
-	  }
-  }
-=======
-		}
-	}
->>>>>>> 3eb8156c5037847aa2ac2d617689590b9a3d19c7
 };
 </script>
 

+ 7 - 35
src/router/index.js

@@ -2,7 +2,6 @@ import Vue from 'vue'
 import Router from 'vue-router'
 const routerPush = Router.prototype.push
 Vue.use(Router)
-<<<<<<< HEAD
 const ter = new Router({
 	// mode: 'history',
 	base: process.env.BASE_URL,
@@ -11,6 +10,13 @@ const ter = new Router({
 			redirect: '/home'
 		},
 		{
+			path: '/test',
+			name: 'home',
+			component: () => import('../views/test.vue'),
+			meta: {
+				title: '节水测试'
+			}
+		}, {
 			path: '/home',
 			name: 'home',
 			component: () => import('../views/Home.vue'),
@@ -52,40 +58,6 @@ const ter = new Router({
 				}
 			]
 		}
-=======
-const ter =  new Router({
-  // mode: 'history',
-  base: process.env.BASE_URL,
-  routes: [
-    {
-      path: '/',
-      redirect: '/home'
-    },
-    {
-      path: '/home',
-      name: 'home',
-      component: () => import('../views/Home.vue'),
-      meta: {
-        title: '添利'
-      }
-    },
-	{
-	  path: '/test',
-	  name: 'home',
-	  component: () => import('../views/test.vue'),
-	  meta: {
-	    title: '添利'
-	  }
-	},
-	{
-		path: '*',
-		redirect: '/home'
-	}
-  ]
-})
-
-
->>>>>>> 3eb8156c5037847aa2ac2d617689590b9a3d19c7
 
 		// {
 		// 	path: '*',