From a7ef77145c329b5e9d905c27ca39ffe9751c5038 Mon Sep 17 00:00:00 2001 From: lanzhihui <503792708@qq.com> Date: Fri, 20 Jun 2025 15:49:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=AB=E7=A0=81=E5=9C=B0=E5=9D=80=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.wpy | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/app.wpy b/src/app.wpy index 900ceff..82c19ba 100644 --- a/src/app.wpy +++ b/src/app.wpy @@ -35,7 +35,7 @@ wepy.app({ } }, globalData: { - versions: 'v5.5.99', // 版本号 + versions: 'v5.5.100', // 版本号 navBarHeight: 0, // 导航栏高度 navRight: 0, // 胶囊距右方间距(方保持左、右间距一致) navTop: 0, // 胶囊距顶部间距 @@ -89,9 +89,9 @@ wepy.app({ onShow(options) { console.log('路径携带参数:', options) - if (options.path === 'pages/home/informationV2') { - wx.redirectTo({ url: `/pages/home/information?${decodeURIComponent(options.query.scene)}` }) - } + // if (options.path === 'pages/home/informationV2') { + // wx.redirectTo({ url: `/pages/home/information?${decodeURIComponent(options.query.scene)}` }) + // } if (options.path === 'pages/tabBar/home1') { wx.switchTab({ url: `/pages/tabBar/home?${decodeURIComponent(options.query.scene)}` }) } @@ -114,9 +114,13 @@ wepy.app({ }, onPageNotFound(res) { console.log(res, '错误res') - wx.switchTab({ - url: '/pages/tabBar/home' - }) // 如果是 tabbar 页面,请使用 wx.switchTab + if (res.path === 'pages/home/informationV2') { + wx.redirectTo({ url: `/pages/home/information?${decodeURIComponent(res.query.scene)}` }) + } else { + wx.switchTab({ + url: `/pages/tabBar/home?${decodeURIComponent(res.query.scene)}` + }) // 如果是 tabbar 页面,请使用 wx.switchTab + } }, onHide() {},