From 259c50828a98d3c41d07fd16130ac16206141f16 Mon Sep 17 00:00:00 2001 From: ywyonui Date: Mon, 11 Aug 2025 10:30:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=A6=96=E9=A1=B5=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E5=88=B0=E9=80=89=E8=AF=BE=E3=80=81=E5=B0=B1=E9=A4=90?= =?UTF-8?q?=E7=BC=B4=E8=B4=B9=E7=9B=B8=E5=85=B3=E9=80=BB=E8=BE=91=E7=9A=84?= =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/base/home/index.vue | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/pages/base/home/index.vue b/src/pages/base/home/index.vue index 252b8a0..bead2cd 100644 --- a/src/pages/base/home/index.vue +++ b/src/pages/base/home/index.vue @@ -85,7 +85,7 @@ import { useUserStore } from "@/store/modules/user"; import { useDataStore } from "@/store/modules/data"; import { hasPermission } from "@/utils/permission"; -const { getCurXs } = useUserStore(); +const { getCurXs, toHome } = useUserStore(); const { setData, getAppCode } = useDataStore(); // 刷新相关变量 @@ -220,18 +220,21 @@ const menuItems = ref([ icon: "/static/base/home/file-text-line.png", path: "/pages/base/gzs/xkXqk", permissionKey: "school-xqkxk", // 兴趣课选课权限编码 + type: 1, }, { title: "俱乐部选课", icon: "/static/base/home/contacts-book-3-line.png", path: "/pages/base/gzs/xkJlb", permissionKey: "school-jlbxk", // 俱乐部选课权限编码 + type: 2, }, { title: "就餐缴费", icon: "/static/base/home/contacts-book-3-line.png", path: "/pages/base/gzs/jc", permissionKey: "school-jcjf", + type: 3, }, ]); @@ -274,9 +277,13 @@ const goToGlxs = () => { // 处理菜单点击 function handleMenuClick(item: any) { if (item.path) { - uni.navigateTo({ - url: item.path, - }); + if (!item.type) { + uni.navigateTo({ + url: item.path, + }); + } else { + toHome(item.type); + } } }