Explorar el Código

fix: 修改钱包展示bug

Before hace 8 meses
padre
commit
302dbcee43

+ 1 - 0
messages/br.json

@@ -349,6 +349,7 @@
     "1017": "The invitation code is incorrect",
     "1018": "The withdrawal channel is closed",
     "1019": "The amount of coding done is too small",
+    "1020": "Too many withdrawals in the same day",
     "1200":"Insufficient inventory",
     "1201": "",
     "1202":"",

+ 1 - 0
messages/en.json

@@ -350,6 +350,7 @@
     "1017": "The invitation code is incorrect",
     "1018": "The withdrawal channel is closed",
     "1019": "The amount of coding done is too small",
+    "1020": "Too many withdrawals in the same day",
     "1200":"Insufficient inventory",
     "1201": "",
     "1202":"",

+ 3 - 0
src/api/summary.ts

@@ -119,6 +119,9 @@ export interface UserLevelToDayResp {
      * 有效总投注人数
      */
     score_num?: number;
+
+    count_score?: number;
+    count_commissar?: number;
 }
 
 export const getInfoDayApi = (data: InfoDayRequest) => {

+ 1 - 1
src/api/userWallt.ts

@@ -6,7 +6,7 @@ export const getMoneyApi = async () => {
         .request<Wallet>({
             url: "/v1/api/user/user_money",
             method: "POST",
-            next: { revalidate: 30 },
+            next: { revalidate: 0 },
         })
         .then((res) => {
             if (res.code === 200) return res.data;

+ 1 - 1
src/app/[locale]/(TabBar)/deposit/actions.ts

@@ -2,7 +2,7 @@
 import { revalidatePath } from "next/cache";
 
 const actions = async () => {
-    revalidatePath("/profile");
+    return revalidatePath(`/profile`, "page");
 };
 
 export default actions;

+ 0 - 1
src/app/[locale]/(TabBar)/profile/page.tsx

@@ -14,7 +14,6 @@ const getUserInfo = async () => {
             method: "POST",
         })
         .then((res) => {
-            console.log(`🚀🚀🚀🚀🚀-> in page.tsx on 16`, res);
             if (res.code === 200) return res.data;
             return {};
         });

+ 3 - 1
src/app/[locale]/(navbar)/withdraw/actions.ts

@@ -2,5 +2,7 @@
 import { revalidatePath } from "next/cache";
 
 export const clearWallet = async () => {
-    return revalidatePath("/profile");
+    revalidatePath("/profile");
+    revalidatePath("/withdraw");
+    return Promise.resolve();
 };

+ 7 - 3
src/app/[locale]/affiliate/referrals/page.tsx

@@ -146,17 +146,21 @@ const App: FC<Props> = (props) => {
 
                 <div className="total">
                     <div>
-                        <span className="num">{t("R$")} 0</span>
+                        <span className="num">
+                            {t("R$")} {dataSource.list[0]?.count_score ?? 0}
+                        </span>
                         <span>{t("Aposta")}</span>
                     </div>
                     <div>
-                        <span className="num">{t("R$")} 0</span>
+                        <span className="num">
+                            {t("R$")} {dataSource.list[0]?.count_commissar ?? 0}
+                        </span>
                         <span>{t("Comissão")}</span>
                     </div>
                 </div>
-                {/* 日历 */}
             </div>
 
+            {/* 日历 */}
             <Popup
                 visible={visible}
                 bodyStyle={{

+ 1 - 0
src/components/Box/UserRecharge.tsx

@@ -32,6 +32,7 @@ export function Timeout(props: { endTime: number; className?: string }) {
     const cls = clsx(
         className ? className : "w-full mb-[0.0694rem] text-center text-[0.1528rem] font-bold"
     );
+
     const countdownText = `${time.days > 0 ? (time.days + "d").padStart(2, "0") : ""}`;
     return (
         <div className={cls}>