diff --git a/src/components/menu.vue b/src/components/menu.vue index 36a48aaf9318adca35e51223bc2d4ea1e4c5f110..e113f15dbcc4f271acd81f5aa78e122a02472839 100644 --- a/src/components/menu.vue +++ b/src/components/menu.vue @@ -64,7 +64,7 @@ v-for="(item, index) in menu_arr" :key="index + 200" class="menu_box user_hover" - @click="now_menu = index" + @click="navAction(index, item.path)" :style="{ color: now_menu == index ? '#fff' : '' }" > {{ item.name }} @@ -103,7 +103,7 @@ export default { }, { name: "技术支持", - path: "", + path: "/xxx", }, { name: "服务超市", @@ -198,6 +198,10 @@ export default { getDetail() { // if you want goto detail page, you should give me the type at first }, + navAction(index, path) { + this.$router.push(path); + this.now_menu = index; + }, gotoChildPage(v) { if (v.path) { this.$router.push(v.path); diff --git a/src/router/index.js b/src/router/index.js index 7ef5ac265ee2bb6b3067f72ce6d8e275b98e55a2..e758a3da49212a9daf2a6bc613ed28055057fd76 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -36,7 +36,7 @@ export default new Router({ component: () => import("@/pages/fwzc_fwcs"), }, ], - }, + }, // 工作台 - 服务注册模块 { path: "/fwgl/:level", // 服务管理 level:用户等级 name: "fwgl", @@ -69,7 +69,7 @@ export default new Router({ component: () => import("@/pages/approval_service_detail"), }, // 审批的服务 - 详情 ], - }, + }, // 工作台 - 服务管理模块 { path: "/shop", // 服务超市 name: "shop", @@ -117,37 +117,37 @@ export default new Router({ component: () => import("@/pages/shopping_cart"), }, ], - }, + }, // 服务超市 - 列表页 { path: "/shop/sjfwDetail/:id", name: "sjfwDetail", component: () => import("@/pages/sjfwDetail"), - }, // 数据服务详情 + }, // 服务超市 - 数据服务详情 { path: "/shop/skfwDetail/:id", name: "skfwDetail", component: () => import("@/pages/skfwDetail"), - }, // 时空服务详情 + }, // 服务超市 - 时空服务详情 { path: "/shop/zhyyfwDetail/:id", name: "zhyyfwDetail", component: () => import("@/pages/zhyyfwDetail"), - }, // 综合应用服务详情 + }, // 服务超市 - 综合应用服务详情 { path: "/shop/yysdDetail/:id", name: "yysdDetail", component: () => import("@/pages/yysdDetail"), - }, // 应用详情 + }, // 服务超市 - 应用详情 { path: "/workplace", name: "workPlace", component: () => import("@/pages/workPlace"), - }, + }, // 主页 - 工作台 { path: "/services_shop", name: "services_shop", component: () => import("@/pages/services_shop"), - }, + }, // 主页 - 服务超市 ], }, {