From 6eb892bfba540ca467c3ac927827ff213f5714cf Mon Sep 17 00:00:00 2001 From: yezian Date: Mon, 26 Feb 2024 23:44:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E5=BE=AE=E4=BF=A1=E6=94=AF?= =?UTF-8?q?=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/pay/page.jsx | 6 +++++- app/pay/wxpay_h5/url/page.jsx | 13 +++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 app/pay/wxpay_h5/url/page.jsx diff --git a/app/pay/page.jsx b/app/pay/page.jsx index 3a9cf10..e2f62c9 100644 --- a/app/pay/page.jsx +++ b/app/pay/page.jsx @@ -134,7 +134,11 @@ export default function Pay() { router.push(`${data.data.alipay_h5_param_str}`); break; case "wxpay_jsapi": - router.push(`${data.data.wxpay_h5_param_str}`); + router.push( + `https://weixin.tiefen.fun/wxpay_h5/${encodeURIComponent( + data.data.wxpay_h5_param_str + )}` + ); break; default: router.push(`${data.data.alipay_h5_param_str}`); diff --git a/app/pay/wxpay_h5/url/page.jsx b/app/pay/wxpay_h5/url/page.jsx new file mode 100644 index 0000000..32922a8 --- /dev/null +++ b/app/pay/wxpay_h5/url/page.jsx @@ -0,0 +1,13 @@ +"use client"; + +import React, { useEffect } from "react"; +import { useRouter } from "next/navigation"; + +export default function WxpayH5({ params }) { + const router = useRouter(); + useEffect(() => { + const redirect_uri = decodeURIComponent(params.url); + router.replace(redirect_uri); + }, []); + return
; +}