From a6952de614c3382856f87640c7fa32671eb6c3cc Mon Sep 17 00:00:00 2001 From: weiwei Date: Mon, 31 Mar 2025 17:44:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=AF=E5=8A=A8=E8=B7=AF=E5=BE=84=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 44 ++++++++++++-------------------------------- 1 file changed, 12 insertions(+), 32 deletions(-) diff --git a/src/App.vue b/src/App.vue index 9e72797..9f0d742 100644 --- a/src/App.vue +++ b/src/App.vue @@ -104,6 +104,17 @@ export default { console.log("tabbar launch 启动路径参数", launchParam) if (isDevEnv()) { + tabbar.forEach(({ pagePath, text, iconPath, selectedIconPath, authPath, auth }, index) => { + uni.setTabBarItem({ + index, + pagePath, + text, + iconPath, + selectedIconPath, + visible: true, + }) + }) + } else { switch (launchParam) { case "canteen": tabbar.forEach(({ pagePath, text, iconPath, selectedIconPath, authPath }, index) => { @@ -153,40 +164,9 @@ export default { break default: uni.hideTabBar() - // tabbar.forEach(({ pagePath, text, iconPath, selectedIconPath, authPath }, index) => { - // uni.setTabBarItem({ - // index, - // pagePath, - // text, - // iconPath, - // selectedIconPath, - // visible: false, - // }) - // }) + uni.showToast({ title: "启动参数不合法", icon: "none" }) break } - } else { - tabbar.forEach(({ pagePath, text, iconPath, selectedIconPath, authPath, auth }, index) => { - if (auth.includes("zhezhengding")) { - uni.setTabBarItem({ - index, - pagePath, - text, - iconPath, - selectedIconPath, - visible: true, - }) - } else { - uni.setTabBarItem({ - index, - pagePath, - text, - iconPath, - selectedIconPath, - visible: false, - }) - } - }) } }, },