feat: 商家端代码

This commit is contained in:
FlowerWater
2025-12-19 12:04:22 +08:00
parent 3c21b074c4
commit 9591234e70
22 changed files with 4776 additions and 210 deletions

View File

@@ -32,10 +32,17 @@ function handleClick(index: number) {
}
const url = tabbarList[index].pagePath
tabbarStore.setCurIdx(index)
if (tabbarCacheEnable) {
// 判断是否为分包页面(分包页面路径以 /pages 开头的是主包,否则是分包)
const isSubPackagePage = !url.startsWith('/pages/')
if (isSubPackagePage) {
// 分包页面使用 reLaunch 跳转
uni.reLaunch({ url })
} else if (tabbarCacheEnable) {
// 主包 tabbar 页面使用 switchTab
uni.switchTab({ url })
}
else {
} else {
uni.navigateTo({ url })
}
}