测试微信支付

This commit is contained in:
yezian 2024-02-26 23:44:25 +08:00
parent ee46b246ea
commit 6eb892bfba
2 changed files with 18 additions and 1 deletions

View File

@ -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}`);

View File

@ -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 <section className="bg-white"></section>;
}