优化ui,修补bug
This commit is contained in:
parent
0f7dfc0952
commit
6825a25d9b
|
@ -70,11 +70,13 @@ export default function Zone({ params }) {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-row items-center gap-3 px-6 pt-12 z-10">
|
<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
|
<img
|
||||||
src={data?.streamer_ext?.avatar?.images[0]?.urls[0]}
|
src={data?.streamer_ext?.avatar?.images[0]?.urls[0]}
|
||||||
alt=""
|
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">
|
<div className="flex flex-col gap-1">
|
||||||
<p className="text-white font-medium text-[22px] w-64 truncate">
|
<p className="text-white font-medium text-[22px] w-64 truncate">
|
||||||
{data?.streamer_ext?.name}
|
{data?.streamer_ext?.name}
|
||||||
|
|
|
@ -6,8 +6,11 @@ import Link from "next/link";
|
||||||
import { Toast, Switch } from "antd-mobile";
|
import { Toast, Switch } from "antd-mobile";
|
||||||
import { generateSignature } from "@/utils/crypto";
|
import { generateSignature } from "@/utils/crypto";
|
||||||
import webviewBaseRequest from "@/utils/webviewBaseRequest";
|
import webviewBaseRequest from "@/utils/webviewBaseRequest";
|
||||||
|
import { useRouter } from "next/navigation";
|
||||||
|
|
||||||
export default function Pay({ params }) {
|
export default function Pay({ params }) {
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
//当前选购的商品数据
|
//当前选购的商品数据
|
||||||
const [data, setData] = useState({});
|
const [data, setData] = useState({});
|
||||||
//超粉商品数据
|
//超粉商品数据
|
||||||
|
@ -119,6 +122,7 @@ export default function Pay({ params }) {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
|
console.log(data);
|
||||||
if (data.ret === -1) {
|
if (data.ret === -1) {
|
||||||
Toast.show({
|
Toast.show({
|
||||||
content: data.msg,
|
content: data.msg,
|
||||||
|
@ -156,10 +160,11 @@ export default function Pay({ params }) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section className="flex flex-col container p-4">
|
<section className="flex justify-center container">
|
||||||
{isLoading && (
|
{isLoading && (
|
||||||
<span className="absolute top-1/2 loading loading-spinner loading-lg z-20"></span>
|
<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">
|
<h1 className="text-[#FF669E] text-3xl font-medium text-center my-10">
|
||||||
¥ {checked ? superfanshipData?.price / 100 : data?.price / 100}
|
¥ {checked ? superfanshipData?.price / 100 : data?.price / 100}
|
||||||
</h1>
|
</h1>
|
||||||
|
@ -287,12 +292,16 @@ export default function Pay({ params }) {
|
||||||
</div>
|
</div>
|
||||||
<p className="text-secondary text-xs font-medium mt-4 text-center mb-1">
|
<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>
|
</Link>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue