From 73bd6567b8e53cb190f929591f37e51b04b78172 Mon Sep 17 00:00:00 2001 From: yezian Date: Tue, 23 Jan 2024 21:42:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E4=BC=9A=E5=91=98=E5=85=85?= =?UTF-8?q?=E5=80=BC=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/vip/page.jsx | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/app/vip/page.jsx b/app/vip/page.jsx index 2ea093f..b18a5e2 100644 --- a/app/vip/page.jsx +++ b/app/vip/page.jsx @@ -3,7 +3,6 @@ import React, { useState, useEffect } from "react"; import { generateSignature } from "@/utils/crypto"; import webviewBaseRequest from "@/utils/webviewBaseRequest"; -import { getCookies } from "cookies-next"; import Image from "next/image"; import vipbackground from "@/public/images/vipbackground.png"; import isvip from "@/public/images/isvip.png"; @@ -24,6 +23,7 @@ export default function Vip() { //检查用户是否是vip const [isVip, setIsVip] = useState(false); const [name, setName] = useState(""); + const [isFetching, setIsFetching] = useState(true); useEffect(() => { const getUserData = async () => { try { @@ -54,11 +54,14 @@ export default function Vip() { } setName(detailData.data.account.name); if (detailData.data.account.is_a_member === 1) setIsVip(true); + setIsFetching(false); } catch (error) { console.error(error); } }; - getUserData(); + setTimeout(() => { + getUserData(); + }, 500); }, []); //创建充值订单 @@ -120,6 +123,14 @@ export default function Vip() { } }; + if (isFetching) { + return ( +
+ +
+ ); + } + return (
{isLoading && ( @@ -132,7 +143,7 @@ export default function Vip() { />
-
+
{isVip ? (
@@ -153,12 +164,12 @@ export default function Vip() { }} >

会员权益

-
+

解锁动态

-

专属标识

+

永久查看

@@ -172,14 +183,14 @@ export default function Vip() {

专属客服

-

专属标识

+

极速服务

期待更多

-

专属标识

+

惊喜福利

@@ -193,19 +204,22 @@ export default function Vip() { >

会员规则

- 1、阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴 + 1、会员权限永久有效,开通后请勿传播平台付费内容;

- 2、阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴 + 2、更多特权内容敬请期待,详情请关注本页面会员权益信息变化。

注意事项

- 1、阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴 + 1、会员特权属于虚拟商品,一经售出概不退换;

- 2、阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴 + 2、请确保支付时您的网络环境保持畅通,避免因第三方网络环境导致的支付失败; +

+

+ 3、本项特权内容最终解释权归铁粉空间运营方所有。