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

Reviewed-on: https://git.wishpal.cn/wishpal_ironfan/tiefen_space_web/pulls/56
This commit is contained in:
yezian 2024-02-20 15:24:46 +08:00
commit 813b9c9ee5
1 changed files with 19 additions and 1 deletions

View File

@ -7,7 +7,7 @@ export default function SafePay({ params }) {
const router = useRouter();
useEffect(() => {
const weixinUrl = decodeURIComponent(params.weixin);
router.push(weixinUrl);
router.replace(weixinUrl);
}, []);
return (
@ -27,6 +27,24 @@ export default function SafePay({ params }) {
</svg>
<p className="text-sm text-[#5fc157]">正在跳转...</p>
</div>
<button
className="bg-red-100 p-2"
onClick={() => router.push(decodeURIComponent(params.weixin))}
>
push
</button>
<button
className="bg-red-200 p-2"
onClick={() => router.replace(decodeURIComponent(params.weixin))}
>
replace
</button>
<button
className="bg-red-300 p-2"
onClick={() => window.open(decodeURIComponent(params.weixin))}
>
window
</button>
</section>
);
}