Prechádzať zdrojové kódy

fix: 顶部导航栏

Before 9 mesiacov pred
rodič
commit
a241911b9f

+ 0 - 2
package.json

@@ -12,8 +12,6 @@
     "build": "cross-env NODE_ENV=production next build",
     "start": "cross-env NODE_ENV=production next start",
 
-
-
     "lint": "next lint",
     "preinstall": "npx only-allow pnpm"
   },

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

@@ -60,7 +60,7 @@ const HomePromotion: FC<Props> = (props) => {
                                     actionData={promotion.action_params}
                                 >
                                     <img
-                                        className={"h-[2.2222rem] w-[100%] pb-[0.1111rem]"}
+                                        className={"h-[2.5rem] w-[100%] pb-[0.1111rem]"}
                                         src={promotion.content.image}
                                         alt={promotion.content.title}
                                     />

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 35 - 37
src/components/Layout/Sidebar.tsx


+ 1 - 103
src/components/Layout/index.tsx

@@ -1,103 +1,7 @@
-// "use client";
-// import Footer, { FooterProps } from "@/components/Footer";
-// import Header, { HeaderProps } from "@/components/Header";
-// import { FC, PropsWithChildren, useEffect, useRef, useState } from "react";
-// import { SwiperClass } from "swiper/react";
-// import Sidebar from "./Sidebar";
-// import styles from "./style.module.scss";
-// type Props = FooterProps & HeaderProps;
-// const Layout: FC<PropsWithChildren<Props>> = (props) => {
-//     console.count("layout render");
-//     const { children, ...other } = props;
-//
-//     const swiperRef = useRef<SwiperClass>();
-//     const isOpen = useRef<boolean>(false);
-//     const homeContainerRef = useRef<HTMLDivElement>(null);
-//     const barRef = useRef<HTMLDivElement>(null);
-//     const leftRef = useRef<HTMLDivElement>(null);
-//
-//     const [mounted, setMounted] = useState(false);
-//
-//     useEffect(() => {
-//         setMounted(true);
-//     }, []);
-//
-//     const startHandler = () => {
-//         homeContainerRef.current?.classList.add(styles.containerMask);
-//         barRef.current?.classList.add(styles.cross);
-//         isOpen.current = true;
-//     };
-//     const endHandler = () => {
-//         homeContainerRef.current?.classList.remove(styles.containerMask);
-//         barRef.current?.classList.remove(styles.cross);
-//         isOpen.current = false;
-//     };
-//
-//     const openSliderHandler = () => {
-//         // if (isOpen.current) {
-//         //     swiperRef.current?.slideNext();
-//         // } else {
-//         //     swiperRef.current?.slidePrev();
-//         // }
-//         const isOpen = leftRef.current!.style.width === "0px";
-//         leftRef.current!.style.transition = "width 0.3s ease-in";
-//         if (isOpen) {
-//             leftRef.current!.style.width = "70%";
-//             setTimeout(() => {
-//                 leftRef.current!.style.opacity = "1";
-//             }, 300);
-//         } else {
-//             leftRef.current!.style.opacity = "0";
-//             leftRef.current!.style.width = "0px";
-//         }
-//     };
-//
-//     return (
-//         <>
-//             <div className={"flex"}>
-//                 <section
-//                     style={{ width: "0px", opacity: 0 }}
-//                     className={"flex-shrink-0"}
-//                     ref={leftRef}
-//                 >
-//                     <Sidebar></Sidebar>
-//                 </section>
-//                 <section className={"w-[100%]"}>
-//                     <Header
-//                         {...other}
-//                         menuRender={() => (
-//                             <div ref={homeContainerRef}>
-//                                 <div
-//                                     className={`absolute left-[0.1rem] top-[0.03rem] z-40 text-[#fff]`}
-//                                     ref={barRef}
-//                                     onClick={openSliderHandler}
-//                                 >
-//                                     <div className={styles.bar}></div>
-//                                     <div
-//                                         className={styles.bar}
-//                                         style={{ width: "0.1389rem" }}
-//                                     ></div>
-//                                     <div className={styles.bar}></div>
-//                                 </div>
-//                             </div>
-//                         )}
-//                     ></Header>
-//                     <main className={styles.main} id="maincontainer">
-//                         {children}
-//                     </main>
-//                     <Footer></Footer>
-//                 </section>
-//             </div>
-//         </>
-//     );
-// };
-//
-// export default Layout;
-
 "use client";
 import { FooterProps } from "@/components/Footer";
 import { HeaderProps } from "@/components/Header";
-import { FC, PropsWithChildren, useEffect, useRef, useState } from "react";
+import { FC, PropsWithChildren, useRef } from "react";
 import { Swiper, SwiperClass, SwiperSlide } from "swiper/react";
 import styles from "./style.module.scss";
 type Props = FooterProps & HeaderProps;
@@ -110,12 +14,6 @@ const Layout: FC<PropsWithChildren<Props>> = (props) => {
     const homeContainerRef = useRef<HTMLDivElement>(null);
     const barRef = useRef<HTMLDivElement>(null);
 
-    const [mounted, setMounted] = useState(false);
-
-    useEffect(() => {
-        setMounted(true);
-    }, []);
-
     const startHandler = () => {
         homeContainerRef.current?.classList.add(styles.containerMask);
         barRef.current?.classList.add(styles.cross);

+ 2 - 0
src/components/Layout/style.module.scss

@@ -15,6 +15,8 @@
     height: 100%;
     z-index: 3;
     background: rgba(0,0,0,0.5);
+
+
   }
 }
 

+ 0 - 1
src/utils/client/index.ts

@@ -5,7 +5,6 @@ import Request from "./axios";
 
 const BASE_URL = process.env.NEXT_PUBLIC_BASE_URL;
 
-console.log(`🚀🚀🚀🚀🚀-> in index.ts on 8`, process.env.NODE_ENV);
 const server = new Request({
     timeout: 10 * 1000,
     baseURL: BASE_URL,

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov