shaogen1995 6 godzin temu
rodzic
commit
64cbabc520

+ 2 - 2
H5/src/App.tsx

@@ -13,7 +13,7 @@ import screenImg from '@/assets/img/landtip.png'
 
 const A1home = React.lazy(() => import('./pages/A1home'))
 const A2details = React.lazy(() => import('./pages/A2details'))
-const A3banner = React.lazy(() => import('./pages/A3banner'))
+// const A3banner = React.lazy(() => import('./pages/A3banner'))
 
 // const scriptArr = [`${myUrl}videoJs/jsmpeg.min.js`, `${myUrl}videoJs/f-video.js`]
 
@@ -65,7 +65,7 @@ export default function App() {
               {/* <Route path='/codeSucc/:id' component={A3codeSucc} /> */}
               <Route path='/info/:id' component={A2details} />
               <Route path='/' component={A1home} exact />
-              <Route path='/banner' component={A3banner} />
+              {/* <Route path='/banner' component={A3banner} /> */}
             </Switch>
           </React.Suspense>
         </Router>

+ 5 - 1
H5/src/pages/A1home/index.tsx

@@ -1,6 +1,6 @@
 import React, { useCallback, useEffect, useRef, useState } from 'react'
 import styles from './index.module.scss'
-import history, { HomeDataRow, isMobileFu, myData, myUrl } from '@/utils/history'
+import history, { HomeDataRow, myData, myUrl } from '@/utils/history'
 import classNmaes from 'classnames'
 import A1info from './A1info'
 import { imgInitFu } from './data'
@@ -56,6 +56,10 @@ function A1home() {
           }
         }
       }
+    } else {
+      window.moveFu = val => {
+        moveRef.current = val
+      }
     }
   }, [])
 

+ 0 - 60
H5/src/pages/A3banner/index.module.scss

@@ -1,60 +0,0 @@
-.A3banner {
-  background-size: 100% 100%;
-  display: flex;
-  flex-direction: column;
-
-  :global {
-    .topPic{
-      width: 100%;
-      height: 20%;
-      display: flex;
-      justify-content: center;
-      align-items: center;
-      & >img{
-        width: 75%;
-        object-fit: contain;  
-      }
-    }
-    .swiper_container{
-      width: 100%;
-      height: 50%;
-      perspective:1500px;
-      .swiper-slide-shadow-coverflow{
-        background-image:none;
-      }
-      .swiper-button-arr-custom{
-        width: 50px;
-        height: 65px;
-        &:after{
-          content: '';
-        }
-        &>img{
-          width: 50px;
-          height: 55px;
-          object-fit: cover;
-        }
-      }
-    }
-    .contentTxt{
-      width: 100%;
-      height: 30%;
-      display: flex;
-      flex-direction: column;
-      align-items: center;
-      gap: 30px;
-      padding: 0 20px;
-      .title{
-        letter-spacing: 5px;
-        font-size: 20px;
-        font-weight: 700;
-        color: #EFDBAC;
-      }
-      .txt{
-        text-indent: 2em;
-        font-size: 14px;
-        font-weight: 400;
-        color: #EFDBAC;
-      }
-    }
-  }
-}

+ 0 - 74
H5/src/pages/A3banner/index.tsx

@@ -1,74 +0,0 @@
-import React, { useCallback, useEffect, useRef, useState } from 'react'
-import styles from './index.module.scss'
-import history, { HomeDataRow, myData, myUrl } from '@/utils/history'
-import classNmaes from 'classnames'
-
-import { Swiper, SwiperSlide } from 'swiper/react';
-
-import 'swiper/css';
-import 'swiper/css/effect-coverflow';
-import 'swiper/css/pagination';
-import 'swiper/css/navigation';
-
-import { EffectCoverflow, Pagination, Navigation } from 'swiper/modules';
-function A3banner() {
-  const imgArr = myData.homeData.map((item) => myUrl + item.cover)
-
-  console.log(imgArr, 'imgArr')
-  const [curIndex, setCurIndex] = useState(0)
-  return (
-    <div className={styles.A3banner} style={{ backgroundImage: `url(${myUrl + myData.homeBgDark})` }}>
-      <div className="topPic"><img src={require('@/assets/img/title.png')} alt="" /></div>
-      <Swiper
-        effect={'coverflow'}
-        grabCursor={true}
-        centeredSlides={true}
-        loop={true}
-        slidesPerView={'auto'}
-        coverflowEffect={{
-          rotate: 0,
-          stretch: 0,
-          depth: 150,
-          modifier: 4,
-        }}
-        spaceBetween={-100}
-        pagination={{ el: '.swiper-pagination', clickable: true }}
-        navigation={{
-          nextEl: '.swiper-button-next',
-          prevEl: '.swiper-button-prev',
-          clickable: true,
-        }}
-        modules={[EffectCoverflow, Pagination, Navigation]}
-        className="swiper_container"
-        onActiveIndexChange={(swiper: any) => {
-          if (swiper.activeIndex !== undefined) {
-            setCurIndex(swiper.realIndex); // 使用realIndex处理loop模式下的真实索引
-          }
-        }}
-
-      >
-        {
-          imgArr.map((item, index) => (
-            <SwiperSlide key={index}>
-              <img style={{
-                width: '100%',
-                height: '100%',
-                objectFit: 'contain',
-              }} src={item} alt="slide_image" />
-            </SwiperSlide>
-          ))
-        }
-        <div className="swiper-button-prev swiper-button-arr-custom"><img src={require('@/assets/img/left.png')} alt="" /></div>
-        <div className="swiper-button-next swiper-button-arr-custom"><img src={require('@/assets/img/right.png')} alt="" /></div>
-      </Swiper>
-      <div className="contentTxt">
-        <div className="title">{myData.homeData[curIndex].name}</div>
-        <div className="txt">{myData.homeData[curIndex].txt}</div>
-      </div>
-    </div>
-  );
-}
-
-const MemoA3banner = React.memo(A3banner)
-
-export default MemoA3banner