shaogen1995 2 年之前
父節點
當前提交
c238ff9b68
共有 4 個文件被更改,包括 17 次插入24 次删除
  1. 2 2
      pc/src/assets/styles/base.css
  2. 2 2
      pc/src/assets/styles/base.less
  3. 10 19
      pc/src/pages/A0Map/index.tsx
  4. 3 1
      pc/src/pages/A2Main/index.module.scss

+ 2 - 2
pc/src/assets/styles/base.css

@@ -114,13 +114,13 @@ textarea {
   }
 }
 .yunSon2 {
-  animation: moveyun 10s linear infinite alternate;
+  animation: moveyun 8s linear infinite alternate;
 }
 @keyframes moveyun {
   0% {
     transform: translate(0);
   }
   100% {
-    transform: translate(-800px);
+    transform: translate(-1600px);
   }
 }

+ 2 - 2
pc/src/assets/styles/base.less

@@ -147,7 +147,7 @@ textarea {
 
 
 .yunSon2 {
-  animation: moveyun 10s linear infinite alternate;
+  animation: moveyun 8s linear infinite alternate;
 }
 
 // 动画帧
@@ -157,7 +157,7 @@ textarea {
   }
 
   100% {
-    transform: translate(-800px);
+    transform: translate(-1600px);
   }
 
 }

+ 10 - 19
pc/src/pages/A0Map/index.tsx

@@ -16,27 +16,18 @@ function A0Map() {
   const mouseMoveFu = useCallback((e: MouseEvent) => {
     let x = (e.clientX / window.innerWidth) * 2 - 1;
     let y = -(e.clientY / window.innerHeight) * 2 + 1;
-    // console.log("-------", x, y);
-    x = x > 1 ? 1 : x;
-    x = x < -1 ? -1 : x;
-    y = y > 1 ? 1 : y;
-    y = y < -1 ? -1 : y;
-    if (mapBac1.current) {
-      const dom1 = mapBac1.current;
-      dom1.style.transform = `rotateX(${
-        y * 2.5
-      }deg) rotateY(${x}deg) translate(${-x * 10}px,${y * 10}px)`;
-    }
-  }, []);
 
-  const [videoInd, setVidoeInd] = useState(true);
+    // x = x > 1 ? 1 : x < -1 ? -1 : x;
+    // y = y > 1 ? 1 : y < -1 ? -1 : y;
 
-  // 视频的播放
-  const videoPlayFu = useCallback(() => {}, []);
+    const moveParam = `rotateX(${y * 2.5}deg) rotateY(${x}deg) translate(${
+      -x * 10
+    }px,${y * 10}px)`;
 
-  useEffect(() => {
-    if (videoInd) videoPlayFu();
-  }, [videoInd, videoPlayFu]);
+    if (mapBac1.current) mapBac1.current.style.transform = moveParam;
+  }, []);
+
+  const [videoInd, setVidoeInd] = useState(true);
 
   useEffect(() => {
     if (mapBac1.current) {
@@ -52,7 +43,7 @@ function A0Map() {
 
   // 30个动画帧div
   const moveDiv = useMemo(() => {
-    const arr: any = [];
+    const arr = [];
 
     for (let i = 0; i <= 30; i++) {
       arr.push(

+ 3 - 1
pc/src/pages/A2Main/index.module.scss

@@ -130,10 +130,12 @@
           height: 70px;
           background-image: url('../../assets/img/main/icon_down.png');
           background-size: 100% 100%;
+          transform: rotate(180deg);
+
         }
 
         .openIconAc {
-          transform: rotate(180deg);
+          transform: rotate(0deg);
         }
 
       }