From aa9d2e64d237c218539a24318bea8a49e689ccaa Mon Sep 17 00:00:00 2001 From: ZF sun <34314687@qq.com> Date: Fri, 23 Jan 2026 11:18:55 +0800 Subject: [PATCH] =?UTF-8?q?feat(util):=20=E6=B7=BB=E5=8A=A0=E9=9A=90?= =?UTF-8?q?=E8=97=8F=E5=BE=AE=E4=BF=A1=E5=B0=8F=E7=A8=8B=E5=BA=8F=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E6=8C=89=E9=92=AE=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加 hideHomeButton 方法用于在微信小程序环境中隐藏首页按钮,提升用户体验 --- common/js/util.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/common/js/util.js b/common/js/util.js index 21b3588..59114f2 100644 --- a/common/js/util.js +++ b/common/js/util.js @@ -843,6 +843,15 @@ export default { uni.navigateBack(); } }, + /** + * 隐藏“返回首页/小房子”按钮 + * 这个函数,用到页面show, onshow 的生命周期时 + */ + hideHomeButton() { + // #ifdef MP-WEIXIN + wx.hideHomeButton(); + // #endif + }, /** * * @param val 转化时间字符串 (转化时分秒)