fix(移动端): DIY 自定义组件 url 链跳转失败时回退 switchTab 打开 tabBar 页

This commit is contained in:
From-wh 2026-10-20 16:41:56 +08:00 committed by 吴昊天
parent 110232261f
commit 3f6372d38e

View File

@ -1027,7 +1027,10 @@ function handleUserClick(item) {
if (item.propValue.linkType === "url") {
uni.navigateTo({
url: item.propValue.link,
});
fail: () => {
uni.switchTab({ url: item.propValue.link });
},
})
}
} else if (!isLogin.value) {
emit("changeLogin"); // Trigger login modal via parent