From 0f54604435521d08c803e0ef30b363c97f230724 Mon Sep 17 00:00:00 2001 From: Michelle.Chung <1242874891@qq.com> Date: 星期五, 16 六月 2023 20:32:46 +0800 Subject: [PATCH] update 适配登录重构的修改(修改token命名, 修改接口传参) ; --- src/components/TopNav/index.vue | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/TopNav/index.vue b/src/components/TopNav/index.vue index 79b7786..2092415 100644 --- a/src/components/TopNav/index.vue +++ b/src/components/TopNav/index.vue @@ -104,7 +104,7 @@ visibleNumber.value = parseInt(String(width / 85)); } -const handleSelect = (key: string, keyPath: string[]) => { +const handleSelect = (key: string) => { currentIndex.value = key; const route = routers.value.find(item => item.path === key); if (isHttp(key)) { @@ -112,7 +112,13 @@ window.open(key, "_blank"); } else if (!route || !route.children) { // 娌℃湁瀛愯矾鐢辫矾寰勫唴閮ㄦ墦寮� - router.push({ path: key, fullPath: '' }); + const routeMenu = childrenMenus.value.find(item => item.path === key); + if (routeMenu && routeMenu.query) { + let query = JSON.parse(routeMenu.query); + router.push({ path: key, query: query }); + } else { + router.push({ path: key }); + } appStore.toggleSideBarHide(true); } else { // 鏄剧ず宸︿晶鑱斿姩鑿滃崟 -- Gitblit v1.9.3