From dba8c16c8afadbdde339bd5b9e380fe7ce249d48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=A6=E5=BD=A6=E7=A5=96?= <605893810@qq.com> Date: Tue, 27 Jan 2026 21:56:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BE=A7=E6=BB=91=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/other_package/productInfo/productInfo.vue | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pages/other_package/productInfo/productInfo.vue b/pages/other_package/productInfo/productInfo.vue index 22cfa1c..6b4984b 100644 --- a/pages/other_package/productInfo/productInfo.vue +++ b/pages/other_package/productInfo/productInfo.vue @@ -544,6 +544,17 @@ export default { isSplash: false, }; }, + onBackPress(options) { + console.log("我是侧滑",options) + // #ifdef APP-PLUS + if (options.from === 'backbutton' && this.isSplash) { + // 1. 阻止默认 pop + plus.webview.currentWebview().canBack = false // 关键句 + uni.reLaunch({ url: '/pages/home/home' }) // 举例:回首页 + return true // 返回 true 即“我处理过了” + } + // #endif + }, onLoad(options) { const id = options.id; const source = options.source; @@ -577,6 +588,7 @@ export default { this ); }, + onHide() { timer && clearTimeout(timer); timer = null;