瀏覽代碼

右侧小地图-章节页面不要

shaogen1995 7 月之前
父節點
當前提交
ea9a76a662

+ 0 - 2
Code/src/components/Zmap/index.module.scss

@@ -7,6 +7,4 @@
   width: 80px;
   height: auto;
   object-fit: fill !important;
-
-  display: none !important;
 }

+ 6 - 1
Code/src/pages/A2visit/index.tsx

@@ -16,8 +16,13 @@ function A2visit() {
   // 过度动画
   const [cutVideoShow, setCutVideoShow] = useState(false)
 
+  // 章节页不要右侧小地图
+  const [isMap, setIsMap] = useState(false)
+
   // 点击继续
   const btnStart = useCallback(() => {
+    setIsMap(true)
+
     // setCutVideoShow(true)
     // 修改逻辑 直接删除自己
     domDelOwnFu('#BaseImg')
@@ -67,7 +72,7 @@ function A2visit() {
           <PanoVideo lodingOk={() => setLastNum(100)} />
 
           {/* 右上角地图 */}
-          <Zmap src='visit' />
+          {isMap ? <Zmap src='visit' /> : null}
 
           {/* 跳到下一章 */}
           <NextPage clickSon={() => setLastVideo(true)} txt='行拜谒礼' />

+ 5 - 1
Code/src/pages/A3banquet/index.tsx

@@ -14,6 +14,9 @@ import history from '@/utils/history'
 import Zmap from '@/components/Zmap'
 
 function A3banquet() {
+  // 章节页不要右侧小地图
+  const [isMap, setIsMap] = useState(window.location.href.includes('?r=ren') ? true : false)
+
   // 过度动画
   const [cutVideoShow, setCutVideoShow] = useState(false)
 
@@ -22,6 +25,7 @@ function A3banquet() {
 
   // 点击继续
   const btnStart = useCallback(() => {
+    setIsMap(true)
     setCutVideoShow(true)
   }, [])
 
@@ -52,7 +56,7 @@ function A3banquet() {
       )}
 
       {/* 右上角地图 */}
-      <Zmap src='banquet' />
+      {isMap ? <Zmap src='banquet' /> : null}
 
       {/* 过度动画页面 */}
       {imgNow && !window.location.href.includes('?r=ren') ? (

+ 1 - 1
Code/src/pages/A4dance/index.tsx

@@ -66,7 +66,7 @@ function A4dance() {
         bird='yueWu'
       />
       {/* 右上角地图 */}
-      <Zmap src='dance' />
+      {baseSta ? <Zmap src='dance' /> : null}
 
       {/* 主要内容 */}
       {imgNow ? (

+ 1 - 1
Code/src/pages/A5chef/index.tsx

@@ -79,7 +79,7 @@ function A5chef() {
         />
 
         {/* 右上角地图 */}
-        <Zmap src='chef' />
+        {!baseFlag ? <Zmap src='chef' /> : null}
 
         {/* 热点按钮页面 */}
         {imgNow ? (

+ 1 - 1
Code/src/pages/A6plow/index.tsx

@@ -103,7 +103,7 @@ function A6plow() {
       />
 
       {/* 右上角地图 */}
-      <Zmap src='plow' />
+      {cutVideoShow ? <Zmap src='plow' /> : null}
 
       {/* 蔬菜的盒子 */}
       <div