From 5132c9258ba305fedcb810522a8419a22f9385e9 Mon Sep 17 00:00:00 2001 From: yezian Date: Tue, 6 Feb 2024 00:29:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/pay/[weixin]/page.jsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/pay/[weixin]/page.jsx b/app/pay/[weixin]/page.jsx index ed872e1..70078c1 100644 --- a/app/pay/[weixin]/page.jsx +++ b/app/pay/[weixin]/page.jsx @@ -37,12 +37,10 @@ export default function Weixin({ params }) { //android打开微信,ios打开微信扫一扫,0:android,1:ios const openWechat = () => { if (device === 0) { - window.open("weixin://", "_blank"); + router.push("weixin://"); return; } - var link = document.createElement("a"); - link.href = "weixin://scanqrcode"; - link.click(); + router.replace("weixin://scanqrcode"); }; if (isLoading) {