From a1a23e2231453234a272ea49634ae053b2df7d27 Mon Sep 17 00:00:00 2001 From: WindowBird <13870814+windows-bird@user.noreply.gitee.com> Date: Fri, 17 Oct 2025 17:38:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=8C=E6=AC=A1=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E8=BF=94=E5=9B=9E=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/custom-navbar/custom-navbar.vue | 6 ++++++ pages/memorial/memorialHall.vue | 16 ++-------------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/components/custom-navbar/custom-navbar.vue b/components/custom-navbar/custom-navbar.vue index cab3fcc..f0c6531 100644 --- a/components/custom-navbar/custom-navbar.vue +++ b/components/custom-navbar/custom-navbar.vue @@ -117,6 +117,12 @@ export default { // 自动执行返回逻辑 uni.navigateBack({ delta: 1, + fail: () => { + // 如果没有上一页,跳转到首页 + uni.reLaunch({ + url: "/pages/index/index", // 确保路径正确 + }); + }, }); } }, diff --git a/pages/memorial/memorialHall.vue b/pages/memorial/memorialHall.vue index 7f10779..e7a161b 100644 --- a/pages/memorial/memorialHall.vue +++ b/pages/memorial/memorialHall.vue @@ -2,11 +2,7 @@ - + {{ memorialDetail ? memorialDetail.name : "加载中..." }} + >{{ memorialDetail ? memorialDetail.code : "加载中..." }}