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, - }) - } - }) } }, },