diff --git a/app/download/[user_id]/page.jsx b/app/download/[user_id]/page.jsx index 99cf95d..3521b64 100644 --- a/app/download/[user_id]/page.jsx +++ b/app/download/[user_id]/page.jsx @@ -11,6 +11,9 @@ import download_leftbottom from "@/public/images/download_leftbottom.png"; import download_rightbottom from "@/public/images/download_rightbottom.png"; import slogan from "@/public/images/slogan.png"; import qrcode from "@/public/images/qrcode.png"; +import baseRequest from "@/utils/baseRequest"; +import { generateSignature } from "@/utils/crypto"; +import { Toast } from "antd-mobile"; export default function Download({ params }) { const [deviceType, setDeviceType] = useState(""); @@ -37,6 +40,44 @@ export default function Download({ params }) { } }; + //页面数据 + const [data, setData] = useState({}); + useEffect(() => { + const getData = async () => { + try { + const base = baseRequest(); + const signature = generateSignature({ + user_id: parseInt(params.user_id, 10), + ...base, + }); + const detailResponse = await fetch( + `/api/streamer/list_ext_by_user_id?signature=${signature}`, + { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + user_id: parseInt(params.user_id, 10), + ...base, + }), + } + ); + const detailData = await detailResponse.json(); + if (detailData.ret === -1) { + Toast.show({ + content: detailData.msg, + }); + return; + } + setData(detailData.data.streamer_ext); + } catch (error) { + console.error(error); + } + }; + getData(); + }, []); + return (
@@ -142,6 +183,24 @@ export default function Download({ params }) {

)} +
+ +
+

+ {data?.name}  + + ID:{data?.user_id} + +

+

+ 邀请您加入「铁粉空间」,解锁更多福利 +

+
+
); diff --git a/app/vip/page.jsx b/app/vip/page.jsx index 4dbe61b..43ee022 100644 --- a/app/vip/page.jsx +++ b/app/vip/page.jsx @@ -123,13 +123,13 @@ export default function Vip() { } }; - if (isFetching) { - return ( -
- -
- ); - } + // if (isFetching) { + // return ( + //
+ // + //
+ // ); + // } return (
diff --git a/public/images/notvip.png b/public/images/notvip.png index 27e40ac..8d95aa3 100644 Binary files a/public/images/notvip.png and b/public/images/notvip.png differ diff --git a/public/images/viptitle.png b/public/images/viptitle.png index 7e0c376..370d073 100644 Binary files a/public/images/viptitle.png and b/public/images/viptitle.png differ