优化ui,修补bug

This commit is contained in:
yezian 2024-04-16 20:39:02 +08:00
parent 0f7dfc0952
commit 6825a25d9b
2 changed files with 141 additions and 130 deletions

View File

@ -70,11 +70,13 @@ export default function Zone({ params }) {
</div>
</div>
<div className="flex flex-row items-center gap-3 px-6 pt-12 z-10">
<div className="flex w-[4.6rem] aspect-square rounded-full border-2 border-white overflow-hidden">
<img
src={data?.streamer_ext?.avatar?.images[0]?.urls[0]}
alt=""
className="w-[4.6rem] aspect-square rounded-full border-2 border-white"
className="w-full object-cover"
/>
</div>
<div className="flex flex-col gap-1">
<p className="text-white font-medium text-[22px] w-64 truncate">
{data?.streamer_ext?.name}

View File

@ -6,8 +6,11 @@ import Link from "next/link";
import { Toast, Switch } from "antd-mobile";
import { generateSignature } from "@/utils/crypto";
import webviewBaseRequest from "@/utils/webviewBaseRequest";
import { useRouter } from "next/navigation";
export default function Pay({ params }) {
const router = useRouter();
//
const [data, setData] = useState({});
//
@ -119,6 +122,7 @@ export default function Pay({ params }) {
}
);
const data = await response.json();
console.log(data);
if (data.ret === -1) {
Toast.show({
content: data.msg,
@ -156,10 +160,11 @@ export default function Pay({ params }) {
}
return (
<section className="flex flex-col container p-4">
<section className="flex justify-center container">
{isLoading && (
<span className="absolute top-1/2 loading loading-spinner loading-lg z-20"></span>
)}
<div className="flex flex-col p-4 mt-20">
<h1 className="text-[#FF669E] text-3xl font-medium text-center my-10">
¥ {checked ? superfanshipData?.price / 100 : data?.price / 100}
</h1>
@ -287,12 +292,16 @@ export default function Pay({ params }) {
</div>
<p className="text-secondary text-xs font-medium mt-4 text-center mb-1">
确认购买即视为同意
<Link className="link text-[#309EDC]" href="/doc/rechargeagreement">
<Link
className="link text-[#309EDC]"
href="/doc/rechargeagreement"
>
用户充值协议
</Link>
</p>
</div>
</div>
</div>
</section>
);
}