From 7cf0fabc43e9f52164f55631f32eabc83e38bd28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E9=A3=9E=E6=B4=8B?= <15778543+xufeiyang6017@user.noreply.gitee.com> Date: Fri, 2 Jan 2026 13:32:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=B8=A1=E8=9B=8B=E4=BC=B0?= =?UTF-8?q?=E4=BB=B7=E6=8C=89=E9=92=AE=E8=B7=B3=E8=BD=AC=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- custom-tab-bar/index.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/custom-tab-bar/index.js b/custom-tab-bar/index.js index 0e7a139..f806017 100644 --- a/custom-tab-bar/index.js +++ b/custom-tab-bar/index.js @@ -176,6 +176,29 @@ Component({ }) }, + // 跳转到鸡蛋估价页面 + goToEvaluatePage() { + console.log('点击鸡蛋估价按钮,跳转到估价页面'); + wx.switchTab({ + url: '/pages/evaluate/index', + success: (res) => { + console.log('跳转到估价页面成功:', res); + }, + fail: (err) => { + console.error('跳转到估价页面失败,尝试使用reLaunch:', err); + wx.reLaunch({ + url: '/pages/evaluate/index', + success: (res) => { + console.log('reLaunch到估价页面成功:', res); + }, + fail: (err) => { + console.error('reLaunch到估价页面也失败:', err); + } + }); + } + }); + }, + // 从全局数据同步状态的方法 - 增强版