feat: 商家端代码
This commit is contained in:
@@ -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 })
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user