fix: 场馆与折扣页返回按钮回首页

- 直接链接进入(无历史栈)时返回首页兜底

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
jacobxu666
2026-08-27 15:17:08 +08:00
co-authored by Claude Haiku 4.5
parent f2c8364d87
commit 124e77c049
2 changed files with 14 additions and 2 deletions
+6
View File
@@ -104,7 +104,13 @@ export default {
}
},
goBack() {
// xuchao: 直接通过链接进入(无历史栈)时回到首页
const pages = getCurrentPages()
if (pages.length > 1) {
uni.navigateBack()
} else {
uni.reLaunch({ url: '/pages/index/index' })
}
},
goDetail(item) {
uni.navigateTo({ url: '/pages/venue/detail?id=' + item.shopId })
+6
View File
@@ -104,7 +104,13 @@ export default {
}
},
goBack() {
// xuchao: 直接通过链接进入(无历史栈)时回到首页
const pages = getCurrentPages()
if (pages.length > 1) {
uni.navigateBack()
} else {
uni.reLaunch({ url: '/pages/index/index' })
}
},
goDetail(item) {
uni.navigateTo({ url: '/pages/venue/detail?id=' + item.shopId })