浏览代码

更新一波室内

shaogen1995 9 月之前
父节点
当前提交
f80cc7ca6f
共有 3 个文件被更改,包括 215 次插入26 次删除
  1. 208 17
      public/info/index.js
  2. 1 3
      src/pages/A1home/Bottom/index.tsx
  3. 6 6
      src/pages/A1home/index.tsx

+ 208 - 17
public/info/index.js

@@ -73,37 +73,228 @@ const KKobjTemp = {
 // 看看的数据(室内)
 const KKlist1Temp2 = [
   {
-    name: '海军静展区0',
-    id: 'kj2',
-    children: ['海军静展区0']
+    name: '1号馆',
+    id: 'kj4',
+    children: ['1号馆']
   },
   {
-    name: 'SU570',
-    id: 'kj3',
-    children: ['SU570']
+    name: '2号馆',
+    id: 'kj5',
+    children: ['2号馆']
+  },
+  {
+    name: '3号馆',
+    id: 'kj6',
+    children: ['3号馆']
+  },
+  {
+    name: '4号馆',
+    id: 'kj7',
+    children: ['4号馆']
+  },
+  {
+    name: '5号馆',
+    id: 'kj8',
+    children: ['5号馆']
+  },
+  {
+    name: '6号馆',
+    id: 'kj9',
+    children: ['6号馆']
+  },
+  {
+    name: '7号馆',
+    id: 'kj10',
+    children: ['7号馆']
+  },
+  {
+    name: '8号馆',
+    id: 'kj11',
+    children: ['8号馆']
+  },
+  {
+    name: '9号馆',
+    id: 'kj12',
+    children: ['9号馆']
+  },
+  {
+    name: '10号馆',
+    id: 'kj13',
+    children: ['10号馆']
+  },
+  {
+    name: '11号馆',
+    id: 'kj14',
+    children: ['11号馆']
+  },
+  {
+    name: '12号馆',
+    id: 'kj15',
+    children: ['12号馆']
+  },
+  {
+    name: '13号馆',
+    id: 'kj16',
+    children: ['13号馆']
   }
 ]
 
 const KKobjTemp2 = {
-  海军静展区0: [
+  '1号馆': [
     {
-      id: 'SG-VZzjvTCyHV4',
-      sceneCode: 'SG-VZzjvTCyHV4',
-      sceneTitle: '海军静展区0-1',
+      id: 'SG-cntbUCn6vVr',
+      sceneCode: 'SG-cntbUCn6vVr',
+      sceneTitle: '1号馆-1',
+      type: 'kk'
+    }
+  ],
+  '2号馆': [
+    {
+      id: 'SG-q4qTGHTv6if',
+      sceneCode: 'SG-q4qTGHTv6if',
+      sceneTitle: '2号馆-1',
       type: 'kk'
     },
     {
-      id: 'SG-K6C0Sfl4zzu',
-      sceneCode: 'SG-K6C0Sfl4zzu',
-      sceneTitle: '海军静展区0-2',
+      id: 'SG-ITwMf8W1BNf',
+      sceneCode: 'SG-ITwMf8W1BNf',
+      sceneTitle: '2号馆-2',
+      type: 'kk'
+    },
+    {
+      id: 'SG-IItg0VqqILb',
+      sceneCode: 'SG-IItg0VqqILb',
+      sceneTitle: '2号馆-3',
       type: 'kk'
     }
   ],
-  SU570: [
+  '3号馆': [
     {
-      id: 'SG-2vQApDenbb8',
-      sceneCode: 'SG-2vQApDenbb8',
-      sceneTitle: 'SU570',
+      id: 'SG-ircOx4QW668',
+      sceneCode: 'SG-ircOx4QW668',
+      sceneTitle: '3号馆-1',
+      type: 'kk'
+    },
+    {
+      id: 'SG-FNfEaQXFAKR',
+      sceneCode: 'SG-FNfEaQXFAKR',
+      sceneTitle: '3号馆-2',
+      type: 'kk'
+    }
+  ],
+  '4号馆': [
+    {
+      id: 'SS-PQ1ph8QtBBS',
+      sceneCode: 'SS-PQ1ph8QtBBS',
+      sceneTitle: '4号馆-1',
+      type: 'kk'
+    },
+    {
+      id: 'SS-abt963Cpw07',
+      sceneCode: 'SS-abt963Cpw07',
+      sceneTitle: '4号馆-2',
+      type: 'kk'
+    }
+  ],
+  '5号馆': [
+    {
+      id: 'SG-5JOhc1V8dKd',
+      sceneCode: 'SG-5JOhc1V8dKd',
+      sceneTitle: '5号馆-1',
+      type: 'kk'
+    }
+  ],
+  '6号馆': [
+    {
+      id: 'SG-D4mGUKctqQF',
+      sceneCode: 'SG-D4mGUKctqQF',
+      sceneTitle: '6号馆-1',
+      type: 'kk'
+    }
+  ],
+  '7号馆': [
+    {
+      id: 'SG-AOkvid90EAH',
+      sceneCode: 'SG-AOkvid90EAH',
+      sceneTitle: '7号馆-1',
+      type: 'kk'
+    },
+    {
+      id: 'SG-fTWiTQCv0uE',
+      sceneCode: 'SG-fTWiTQCv0uE',
+      sceneTitle: '7号馆-2',
+      type: 'kk'
+    }
+  ],
+  '8号馆': [
+    {
+      id: 'SG-6fDujHMNMnp',
+      sceneCode: 'SG-6fDujHMNMnp',
+      sceneTitle: '8号馆-1',
+      type: 'kk'
+    },
+    {
+      id: 'SG-M7nGlwLV6C5',
+      sceneCode: 'SG-M7nGlwLV6C5',
+      sceneTitle: '8号馆-2',
+      type: 'kk'
+    }
+  ],
+  '9号馆': [
+    {
+      id: 'SG-ne7HQvU3wya',
+      sceneCode: 'SG-ne7HQvU3wya',
+      sceneTitle: '9号馆-1',
+      type: 'kk'
+    }
+  ],
+  '10号馆': [
+    {
+      id: 'SS-MAMFGDfSGB0',
+      sceneCode: 'SS-MAMFGDfSGB0',
+      sceneTitle: '10号馆-1',
+      type: 'kk'
+    }
+  ],
+  '11号馆': [
+    {
+      id: 'SG-cZNHYfretVt',
+      sceneCode: 'SG-cZNHYfretVt',
+      sceneTitle: '11号馆-1',
+      type: 'kk'
+    }
+  ],
+  '12号馆': [
+    {
+      id: 'SG-G2ihnmWMxe5',
+      sceneCode: 'SG-G2ihnmWMxe5',
+      sceneTitle: '12号馆-1',
+      type: 'kk'
+    },
+    {
+      id: 'SG-U7QXmTG4g8n',
+      sceneCode: 'SG-U7QXmTG4g8n',
+      sceneTitle: '12号馆-2',
+      type: 'kk'
+    },
+    {
+      id: 'SG-UlG0OED4hpC',
+      sceneCode: 'SG-UlG0OED4hpC',
+      sceneTitle: '12号馆-3',
+      type: 'kk'
+    }
+  ],
+  '13号馆': [
+    {
+      id: 'SG-8NPyWvY8AYO',
+      sceneCode: 'SG-8NPyWvY8AYO',
+      sceneTitle: '13号馆-1',
+      type: 'kk'
+    },
+    {
+      id: 'SG-uF0Elei6Eci',
+      sceneCode: 'SG-uF0Elei6Eci',
+      sceneTitle: '13号馆-2',
       type: 'kk'
     }
   ]

+ 1 - 3
src/pages/A1home/Bottom/index.tsx

@@ -97,9 +97,7 @@ function Bottom({ setTopObj, pageKey }: Props) {
         if (srollRef.current) srollRef.current.scrollLeft = 0
       }, 500)
     }
-    // 这里忽略
-    // eslint-disable-next-line react-hooks/exhaustive-deps
-  }, [ac1])
+  }, [ac1, myObj, setTopObj])
 
   // 点击二级目录
   const setAcObj = useCallback(

+ 6 - 6
src/pages/A1home/index.tsx

@@ -41,8 +41,11 @@ function A1home() {
   // 分享、介绍
   const [sonPageShow, setSonPageShow] = useState<'分享' | '介绍' | ''>('')
 
-  // 选中的对象数据
+  const setAcObjFu = useCallback((info: MyObjRowType) => {
+    setAcObj(info)
+  }, [])
 
+  // 选中的对象数据
   const [acObj, setAcObj] = useState({} as MyObjRowType)
 
   useEffect(() => {
@@ -83,10 +86,7 @@ function A1home() {
           <div className='b1Btn'>
             <img className='b1img' src={top4Img} alt='' />
             <ul>
-              {/* 待完善 */}
-              <li onClick={() => clickBtn('室内')} style={{ opacity: 0, pointerEvents: 'none' }}>
-                展馆漫游
-              </li>
+              <li onClick={() => clickBtn('室内')}>展馆漫游</li>
               <li onClick={() => clickBtn('室外')}>展区漫游</li>
             </ul>
           </div>
@@ -119,7 +119,7 @@ function A1home() {
       {/* 分享页面 */}
       <Share isShowType={sonPageShow} closeFu={() => setSonPageShow('')} />
       {/* 底部页面 */}
-      <Bottom setTopObj={val => setAcObj(val)} pageKey={pageKey} />
+      <Bottom setTopObj={setAcObjFu} pageKey={pageKey} />
       {/* 顶部title */}
       {acObj.sceneCode ? (
         <>