Parcourir la source

fix: 修改侧边栏显示问题

Before il y a 10 mois
Parent
commit
600075bba0

+ 11 - 7
src/app/[locale]/(TabBar)/[[...share]]/layout.tsx

@@ -4,6 +4,7 @@ import Footer from "@/components/Footer";
 import Header from "@/components/Header";
 import Sidebar from "@/components/Layout/Sidebar";
 import styles from "@/components/Layout/style.module.scss";
+import { SpinLoading } from "antd-mobile";
 import { FC, PropsWithChildren, ReactNode, useRef } from "react";
 import { Swiper, SwiperClass, SwiperSlide } from "swiper/react";
 type Props = {
@@ -53,23 +54,26 @@ const Layout: FC<PropsWithChildren<Props>> = (props) => {
         <>
             <Swiper
                 resistanceRatio={10}
-                initialSlide={1}
+                initialSlide={2}
                 slidesPerView={"auto"}
                 onSlidePrevTransitionStart={startHandler}
                 onSlideNextTransitionEnd={endHandler}
                 slideToClickedSlide
                 onSwiper={(swiper) => {
                     swiperRef.current = swiper;
-                    // 设置第一个元素
-                    swiper.slides[0].style.display = "block";
                 }}
                 runCallbacksOnInit={false}
                 allowTouchMove={false}
+                observer={true}
+                observeParents={true}
             >
-                <SwiperSlide
-                    style={{ width: `${"70%"}`, display: "none" }}
-                    className={"bg-[rgb(31,31,31)]"}
-                >
+                <SwiperSlide>
+                    <section className="relative flex h-[100vh] items-center justify-center">
+                        <SpinLoading color="default" />
+                    </section>
+                </SwiperSlide>
+
+                <SwiperSlide style={{ width: "70%" }} className={"bg-[rgb(31,31,31)]"}>
                     <section className="relative h-[100vh]">
                         <Sidebar></Sidebar>
                     </section>

+ 1 - 1
src/app/[locale]/affiliate/summary/page.tsx

@@ -26,7 +26,7 @@ const App: FC<Props> = (props) => {
     const [num, setNum] = useState(100);
     const [money, setMoney] = useState("5000");
     const { token, userInfo } = useGlobalStore();
-    const shareUrl = `http://192.168.0.46:3000/${locale}/${userInfo ? userInfo.referrer_code : "xxxxxx"}`;
+    const shareUrl = `http://192.168.0.84:3000/${locale}/${userInfo ? userInfo.referrer_code : "xxxxxx"}`;
 
     const TIME = 180000;
     const [todayData, setTodayData] = useState<UserAgentToDayInfo>({

+ 4 - 0
src/components/Layout/Sidebar.tsx

@@ -140,6 +140,10 @@ const Sidebar: FC<PropsWithChildren<Props>> = (props) => {
                     <div className={"flex-1"}> {t("inicial")} </div>
                 </div>
             </section>
+            <section className={"flex justify-between p-[0.08rem] text-[12px] text-[#7d7d7d]"}>
+                <span>Version</span>
+                <span>0.0.2</span>
+            </section>
         </Box>
     );
 };