tiefen_space_web/app/pay/inweixin/[weixin]/page.jsx

37 lines
1.3 KiB
JavaScript

"use client";
import React, { useState, useEffect } from "react";
import { useRouter, useSearchParams } from "next/navigation";
export default function InWeixin({ params }) {
const router = useRouter();
const searchParams = useSearchParams();
const [code, setCode] = useState("no code");
useEffect(() => {
const temcode = searchParams.get("code");
setCode(temcode);
}, []);
return (
<section className="flex flex-1 flex-col container bg-white">
<div className="flex flex-col">
<p className="text-center text-black text-lg font-medium py-2">
微信安全支付
</p>
<hr className="bg-secondary" />
</div>
<div className="flex flex-col items-center">
<svg viewBox="0 0 1024 1024" width="100" height="100">
<path
d="M512 85.333333a426.666667 426.666667 0 1 0 426.666667 426.666667A426.666667 426.666667 0 0 0 512 85.333333z m42.666667 597.333334a42.666667 42.666667 0 0 1-85.333334 0v-213.333334a42.666667 42.666667 0 0 1 85.333334 0z m-42.666667-298.666667a42.666667 42.666667 0 1 1 42.666667-42.666667 42.666667 42.666667 0 0 1-42.666667 42.666667z"
fill="#5fc157"
></path>
</svg>
<p className="text-sm text-[#5fc157]">正在跳转...</p>
</div>
<p className="text-base text-black">{code}</p>
</section>
);
}