From a8d689789d7f91f8e1e768fce4584076e048718c Mon Sep 17 00:00:00 2001 From: xuyiming Date: Mon, 18 May 2020 10:37:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=A6=96=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/menu.vue | 8 ++++++-- src/router/index.js | 18 +++++++++--------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/components/menu.vue b/src/components/menu.vue index 36a48aa..e113f15 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 7ef5ac2..e758a3d 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"), - }, + }, // 主页 - 服务超市 ], }, { -- 2.26.0