From 967361aa8c51c08f6c86998eccbfcc233aeb7cc0 Mon Sep 17 00:00:00 2001 From: zhangds Date: Tue, 7 May 2024 18:23:42 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A2=9E=E5=8A=A0=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- goods-v2/ysf-reduce.html | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/goods-v2/ysf-reduce.html b/goods-v2/ysf-reduce.html index 7e3be45..ec7fed1 100644 --- a/goods-v2/ysf-reduce.html +++ b/goods-v2/ysf-reduce.html @@ -18,7 +18,7 @@
-
{{prompt_text}} @@ -148,6 +148,10 @@ } }, mounted() { + window.addEventListener('popstate', function (event) { + history.go(-2); // 监听返回按钮 直接关闭按钮 + }); + document.title = localStorage.getItem('title'); /* 判断是否是微信小程序内 */ let ua = window.navigator.userAgent.toLowerCase(); @@ -248,13 +252,7 @@ backGoodsFn() { /* 判断是否web-view打开 则不返回 */ if (this.isMini) return; - if (this.backAble) { - setTimeout(() => { - window.location.replace('./homepage.html'); - }, 300); - } else { - history.go(-2); - } + history.go(-2); }, /* 触发提示 */