From 6c2743a2bfe719b4d6704efd78aa93b2215b87d2 Mon Sep 17 00:00:00 2001 From: yezian Date: Tue, 20 Feb 2024 15:06:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BE=AE=E4=BF=A1=E5=86=85?= =?UTF-8?q?=E6=B5=8F=E8=A7=88=E5=99=A8=E6=94=AF=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/pay/[weixin]/page.jsx | 10 ++++++---- app/pay/inweixin/[weixin]/page.jsx | 32 ++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 app/pay/inweixin/[weixin]/page.jsx diff --git a/app/pay/[weixin]/page.jsx b/app/pay/[weixin]/page.jsx index be97480..d677db9 100644 --- a/app/pay/[weixin]/page.jsx +++ b/app/pay/[weixin]/page.jsx @@ -14,10 +14,12 @@ export default function Weixin({ params }) { const [isLoading, setIsLoading] = useState(true); useEffect(() => { var QRCode = require("qrcode"); - const weixinUrl = decodeURIComponent(params.weixin); - QRCode.toDataURL(weixinUrl, function (err, url) { - setQrcodeUrl(url); - }); + QRCode.toDataURL( + `https://tiefen.fun/pay/inweixin/${params.weixin}`, + function (err, url) { + setQrcodeUrl(url); + } + ); //确认设备类型 const base = webviewBaseRequest(); if (base?.b_dt === 1) setDevice(1); diff --git a/app/pay/inweixin/[weixin]/page.jsx b/app/pay/inweixin/[weixin]/page.jsx new file mode 100644 index 0000000..8167ab4 --- /dev/null +++ b/app/pay/inweixin/[weixin]/page.jsx @@ -0,0 +1,32 @@ +"use client"; + +import React, { useEffect } from "react"; +import { useRouter } from "next/navigation"; + +export default function SafePay({ params }) { + const router = useRouter(); + useEffect(() => { + const weixinUrl = decodeURIComponent(params.weixin); + router.push(weixinUrl); + }, []); + + return ( +
+
+

+ 微信安全支付 +

+
+
+
+ + + +

正在跳转...

+
+
+ ); +}