Bladeren bron

fix: 修改cashback 样式

ansoni 2 maanden geleden
bovenliggende
commit
c2d1025131

+ 10 - 18
.env.local

@@ -1,24 +1,16 @@
-# 环境
 #baseurl
-# NEXT_PUBLIC_BASE_URL=http://192.168.0.71:8800
-NEXT_PUBLIC_BASE_URL=http://192.168.0.84:8800
-# NEXT_PUBLIC_BASE_URL=https://3rd-api.tiktokjakjkl.icu
+NEXT_PUBLIC_BASE_URL=https://api.bcwin777.com
 #share link
-NEXT_PUBLIC_SHARE_URL=http://192.168.0.84:3000
+NEXT_PUBLIC_SHARE_URL=https://bcwin777.com
 
 #firebase
-NEXT_PUBLIC_FIREBASE_APIKEY=AIzaSyDAWORGKhdyzb5KeqTi535VmD5gN2Cdle8
-NEXT_PUBLIC_FIREBASE_AUTHDOMAIN=bcwin-a99b1.firebaseapp.com
+NEXT_PUBLIC_FIREBASE_APIKEY=AIzaSyCIE8xtySsYztsSgmQJx_aqPrrpHEuvgvw
+NEXT_PUBLIC_FIREBASE_AUTHDOMAIN=bcwin777-1bdda.firebaseapp.com
+NEXT_PUBLIC_FIREBASE_PROJECTID=bcwin777-1bdda
+NEXT_PUBLIC_FIREBASE_STORAGEBUCKET=bcwin777-1bdda.firebasestorage.app
+NEXT_PUBLIC_FIREBASE_MESSAGINGSENDERID=542456379513
+NEXT_PUBLIC_FIREBASE_APPID=1:542456379513:web:851a46fc639085170bfca8
+NEXT_PUBLIC_FIREBASE_MEASUREMENTID=G-GV6Y8DXHHD
+NEXT_PUBLIC_FIREBASE_KEYS=BOCfpA08vK6uxhMdRblnx9gPVBLx9WpTn9AutVNhHQQpVtXzDIKW0X6cmsNRaFDhyFDJfMqWjqC7mq6uDFIKU_M
 
 
-
-
-NEXT_PUBLIC_FIREBASE_PROJECTID=bcwin-a99b1
-NEXT_PUBLIC_FIREBASE_STORAGEBUCKET=bcwin-a99b1.appspot.com
-NEXT_PUBLIC_FIREBASE_MESSAGINGSENDERID=1055413612814
-NEXT_PUBLIC_FIREBASE_APPID=1:1055413612814:web:7a563237de8e43849d275f
-
-
-
-NEXT_PUBLIC_FIREBASE_MEASUREMENTID=G-467M2BYJMS
-NEXT_PUBLIC_FIREBASE_KEYS=BAOsT7kii-ctLzGrgXe_wYhfuxlme1v4njnD0uPSKp3DpSnrUa2e709b9dRaeYVU7jF_qIx1y9tEv0CvilDCdnM

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

@@ -18,7 +18,6 @@ const getBanners = React.cache(async () => {
 const Page = async () => {
     const banners = await getBanners();
 
-    console.log(`🚀🚀🚀🚀🚀-> in page.tsx on 19 组件加载中。。。。`);
     if (!banners.length) return null;
 
     return <HomeSwiper banners={banners}></HomeSwiper>;

+ 0 - 1
src/app/[locale]/(TabBar)/[[...share]]/_home/HomeSwiper.tsx

@@ -13,7 +13,6 @@ interface Props {
 const HomeSwiper: FC<Props> = (props) => {
     const { banners = [] } = props;
 
-    console.log(`🚀🚀🚀🚀🚀-> in HomeSwiper.tsx on 17`);
     return (
         <div
             style={{ height: "1.86rem" }}

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

@@ -14,6 +14,7 @@ const Template = ({ children }: { children: ReactNode }) => {
             routerStack.set(key, key);
         }
     }, [key]);
+    const isEnter = routerStack.has(key);
 
     return (
         <AnimatePresence mode="popLayout">

+ 21 - 10
src/app/[locale]/(navbar)/cashback/CashbackTable.tsx

@@ -1,8 +1,6 @@
 "use client";
 import { CashbackTypes, Rule } from "@/api/cashback";
-import Box from "@/components/Box";
 import Table, { TableHeaderItem } from "@/components/Table";
-import clsx from "clsx";
 import { useTranslations } from "next-intl";
 import { JSX } from "react";
 import styles from "./components/style.module.scss";
@@ -45,13 +43,7 @@ const Page = (props: Props) => {
         return Promise.resolve();
     };
     return (
-        <Box
-            className={clsx(
-                "mt-[10px] rounded-[10px] shadow-[0_0_20px_#3796b3_inset]",
-                styles.tableBox
-            )}
-        >
-            <div className={"mb-[10px] text-[#00fffc]"}> {t("cashbackStatus")}</div>
+        <>
             <Table
                 columns={columns}
                 dataSource={cashbackInfo.rules || []}
@@ -63,7 +55,26 @@ const Page = (props: Props) => {
                 evenClassName={styles.even}
                 tdClassName={styles.td}
             />
-        </Box>
+            {/*<Box*/}
+            {/*    className={clsx(*/}
+            {/*        "mt-[10px] rounded-[10px] shadow-[0_0_20px_#3796b3_inset]",*/}
+            {/*        styles.tableBox*/}
+            {/*    )}*/}
+            {/*>*/}
+            {/*    <div className={"mb-[10px] text-[#00fffc]"}> {t("cashbackStatus")}</div>*/}
+            {/*    <Table*/}
+            {/*        columns={columns}*/}
+            {/*        dataSource={cashbackInfo.rules || []}*/}
+            {/*        loadMore={loadMore}*/}
+            {/*        hasMore={false}*/}
+            {/*        isLoadMore={false}*/}
+            {/*        isBackground={false}*/}
+            {/*        oddClassName={styles.odd}*/}
+            {/*        evenClassName={styles.even}*/}
+            {/*        tdClassName={styles.td}*/}
+            {/*    />*/}
+            {/*</Box>*/}
+        </>
     );
 };
 

+ 14 - 10
src/app/[locale]/(navbar)/cashback/components/style.module.scss

@@ -73,17 +73,21 @@
 }
 .even {
     position: relative;
+    border: 1px solid #46e3ff;
+    background: rgba(172, 89, 235, 0.25);
+    box-shadow: 0 0 10px #35a1b4 inset;
+    //border-radius: 0.1rem;
     &:after {
-        content: "";
-        position: absolute;
-        left: 0;
-        top: 0;
-        right: 0;
-        bottom: 0;
-        border: 1px solid #46e3ff;
-        box-shadow: 0 0 10px #35a1b4 inset;
-        border-radius: 0.1rem;
-        background: rgba(172, 89, 235, 0.25);
+        //content: "";
+        //position: absolute;
+        //left: 0;
+        //top: 0;
+        //right: 0;
+        //bottom: 0;
+        //border: 1px solid #46e3ff;
+        //box-shadow: 0 0 10px #35a1b4 inset;
+        //border-radius: 0.1rem;
+        //background: rgba(172, 89, 235, 0.25);
     }
     // border: 1px solid #46e3ff;
 

+ 5 - 0
src/app/[locale]/(navbar)/cashback/layout.tsx

@@ -20,6 +20,11 @@ export default async function Layout({
         <div className="h-[100%] overflow-auto bg-[url('/home/bg.jpg')]">
             <HeaderBack showBack={true} useBg={true} title={t("cashbackTitle")} />
             <main className={"main-header"}>
+                {/*{Array.from({ length: 100 }).map((n, index) => (*/}
+                {/*    <div key={} className="bg-white h-[100px]">*/}
+                {/*        {n}*/}
+                {/*    </div>*/}
+                {/*))}*/}
                 <Box>{children}</Box>
             </main>
         </div>

+ 16 - 9
src/utils/server/index.ts

@@ -17,7 +17,8 @@ const requestInterceptor = (options: ServerOptions) => {
 const responseInterceptor = <T = any, R = unknown>(
     response: Response<T> & R,
     options: ServerOptions,
-    url: string
+    url: string,
+    header: any
 ): Promise<Response<T> & R> => {
     return new Promise((resolve, reject) => {
         const { code, msg } = response;
@@ -26,7 +27,7 @@ const responseInterceptor = <T = any, R = unknown>(
                 resolve(response);
                 break;
             case 401:
-                console.log(`🚀🚀🚀🚀🚀->server-code: 401`, options);
+                console.log(`🚀🚀🚀🚀🚀->server-code: 401`, options, response, header);
                 redirect({ href: "/login", locale: "br" });
                 break;
             case 500:
@@ -51,15 +52,16 @@ class Server {
         options = requestInterceptor(options);
         const { method = "GET", url, headers = {}, data = {}, body, ...other } = options;
         const params = JSON.stringify(data);
+        const header = {
+            Token: cookies().get("Token")?.value || "",
+            "Content-Type": "application/json",
+            language: cookies().get("language")?.value || defaultLocale,
+            ...headers,
+        };
         try {
             const response = await fetch(`${config.NEXT_PUBLIC_BASE_URL}${url}`, {
                 method: method,
-                headers: {
-                    Token: cookies().get("Token")?.value || "",
-                    "Content-Type": "application/json",
-                    language: cookies().get("language")?.value || defaultLocale,
-                    ...headers,
-                },
+                headers: header,
                 body: params,
                 ...other,
             })
@@ -68,7 +70,12 @@ class Server {
                     console.log(`🚀🚀🚀🚀🚀-> in index.ts on 68`, error);
                     return {};
                 });
-            return responseInterceptor<T, R>(response, options, config.NEXT_PUBLIC_BASE_URL);
+            return responseInterceptor<T, R>(
+                response,
+                options,
+                config.NEXT_PUBLIC_BASE_URL,
+                header
+            );
         } catch (error) {
             console.log(
                 `🚀🚀🚀🚀🚀-> in index.ts on 67`,