Merge pull request '测试微信支付' (#70) from feat-20240218 into main

Reviewed-on: https://git.wishpal.cn/wishpal_ironfan/tiefen_space_web/pulls/70
This commit is contained in:
yezian 2024-02-26 23:44:45 +08:00
commit a915a2c8fe
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>;
}