fix(TopNavBar): update root page back navigation behavior

replace WeChat mini-program specific exit logic with uni.reLaunch to index page for consistent cross-platform behavior when at the root navigation stack
This commit is contained in:
duanshuwen
2026-07-22 22:13:42 +08:00
parent 14defcc5b7
commit 64c73ad6a6
4 changed files with 4 additions and 645 deletions

View File

@@ -155,12 +155,10 @@ const handleBack = () => {
const pages = getCurrentPages();
if (pages.length <= 1) {
// #ifdef MP-WEIXIN
if (typeof wx !== "undefined" && typeof wx.exitMiniProgram === "function") {
wx.exitMiniProgram();
return;
}
// #endif
uni.reLaunch({
url: "/pages/index/index",
});
return;
}
if (hasBackListener.value) {