Browse Source

fix: merge

Before 8 months ago
parent
commit
85c10c45b4
2 changed files with 11 additions and 8 deletions
  1. 1 1
      src/api/promo.ts
  2. 10 7
      src/app/[locale]/(navbar)/doings/discount/page.tsx

+ 1 - 1
src/api/promo.ts

@@ -135,7 +135,7 @@ export interface PayCondition {
     /**
      * 参加金额
      */
-    amount: string;
+    amount: number;
     /**
      * 奖励代币类型1现金2彩金3免费币4重玩币
      */

+ 10 - 7
src/app/[locale]/(navbar)/doings/discount/page.tsx

@@ -1,26 +1,29 @@
-import { DepositsTypes } from "@/api/depositsApi";
+import { PayDataType } from "@/api/promo";
 import Empty from "@/components/Empty";
 import { server } from "@/utils/server";
 import DepositData from "./DepositData";
-
 const getDepositApi = async () => {
     return server
-        .request<DepositsTypes[]>({
-            url: "/v1/api/user/user_deposit_config",
+        .request<PayDataType>({
+            url: "/v1/api/front/activity/pay",
             method: "post",
         })
         .then((res) => {
             if (res.code === 200) return res.data;
-            return [];
+            return {
+                first_pay: [],
+                pay: [],
+            };
         });
 };
 
 const Deposit = async () => {
     const deposits = await getDepositApi();
-    if (!deposits.length) return <Empty />;
+    console.log(`🚀🚀🚀🚀🚀-> in page.tsx on 22`, deposits);
+    if (!deposits.pay.length) return <Empty />;
     return (
         <>
-            <DepositData deposits={deposits} />
+            <DepositData deposits={deposits.pay} />
         </>
     );
 };