Kaynağa Gözat

feat: 修改

year 2 gün önce
ebeveyn
işleme
9d5c26b206

+ 6 - 2
src/app/[locale]/(TabBar)/profile/loginedHeader.tsx

@@ -3,6 +3,7 @@ import { userInfoApi } from "@/api/login";
 import { getNewVip } from "@/api/user";
 import { HeaderImageMap } from "@/enums";
 import { useVipStore } from "@/stores/useVipStore";
+import { useWalletStore } from "@/stores/useWalletStore";
 import { formatAmount } from "@/utils";
 import { copyText } from "@/utils/methods";
 import { useRequest } from "ahooks";
@@ -26,6 +27,7 @@ const LoginedHeader = () => {
     const { data: userVipData, run: getUserVip } = useRequest<any, any>(getNewVip, {
         pollingErrorRetryCount: 1,
     });
+    const wallet = useWalletStore((state) => state.wallet);
 
     const userVip = React.useMemo(() => {
         if (userVipData?.code === 200) {
@@ -70,7 +72,7 @@ const LoginedHeader = () => {
 
     const doCopyUsreId = (evt: any) => {
         (evt as any).stopPropagation();
-        copyText(`${userInfo.data.user_phone}`);
+        copyText(`${userInfo.data.id}`);
         Toast.show({ icon: "success", content: tc("SummaryPage.copySuc"), maskClickable: false });
     };
     const vipInfo = useVipStore((state) => state.vipData);
@@ -115,7 +117,9 @@ const LoginedHeader = () => {
                                 className="relative -top-[1px] mr-[.01rem] !inline-block h-[.12rem] w-[.12rem]"
                                 alt=""
                             />
-                            <span className="text-[var(--textColor4);]">3.00</span>
+                            <span className="text-[var(--textColor4);]">
+                                {formatAmount(wallet.score)}
+                            </span>
                         </span>
                     </div>
                 </div>