Преглед изворни кода

改的乱七八糟,我自己都乱了

shaogen1995 пре 10 месеци
родитељ
комит
b350f6a963
40 измењених фајлова са 553 додато и 75 уклоњено
  1. 128 2
      Code/public/myData/myData.js
  2. BIN
      Code/src/assets/img/leftAc2.png
  3. 17 2
      Code/src/components/BaseImg/index.tsx
  4. 7 1
      Code/src/components/FloorBtn/index.tsx
  5. 13 5
      Code/src/pages/A1_1base/index.tsx
  6. 7 3
      Code/src/pages/A2visit2/index.tsx
  7. 1 1
      Code/src/pages/A4dance/index.tsx
  8. 36 0
      Code/src/pages/A6xian/index.module.scss
  9. 85 8
      Code/src/pages/A6xian/index.tsx
  10. 95 27
      Code/src/pages/B1more/S2mien/index.module.scss
  11. 78 17
      Code/src/pages/B1more/S2mien/index.tsx
  12. 9 0
      Code/src/pages/B1more/index.module.scss
  13. 43 4
      Code/src/pages/B1more/index.tsx
  14. 10 2
      Code/src/pages/B3yun/index.tsx
  15. 7 1
      Code/src/pages/B4xian/index.tsx
  16. 4 1
      Code/src/pages/C1unity/index.tsx
  17. 4 1
      Code/src/pages/C2unityEnd/index.tsx
  18. 9 0
      Code/src/types/declaration.d.ts
  19. BIN
      资源/staticData/more/ren/anPaiZuoCi.jpg
  20. BIN
      资源/staticData/more/ren/baiXi.jpg
  21. BIN
      资源/staticData/more/ren/beiYan.jpg
  22. BIN
      资源/staticData/more/ren/cheQiBaiYe.jpg
  23. BIN
      资源/staticData/more/ren/gengZuo.jpg
  24. BIN
      资源/staticData/more/ren/liChang.jpg
  25. BIN
      资源/staticData/more/ren/minXiang.jpg
  26. BIN
      资源/staticData/more/ren/saoDi.jpg
  27. BIN
      资源/staticData/more/ren/saoDi.mp4
  28. BIN
      资源/staticData/more/ren/touHu.jpg
  29. BIN
      资源/staticData/more/ren/touMingTie.jpg
  30. BIN
      资源/staticData/more/ren/xunYe.mp4
  31. BIN
      资源/staticData/more/ren/yanYin.jpg
  32. BIN
      资源/staticData/more/ren/yangJiuHeLi.jpg
  33. BIN
      资源/staticData/more/ren/yinBin.jpg
  34. BIN
      资源/staticData/more/ren/yinBin.mp4
  35. BIN
      资源/staticData/more/ren/yingBin.jpg
  36. BIN
      资源/staticData/more/ren/yueWu.jpg
  37. BIN
      资源/staticData/more/ren/yueWuBaiXi.jpg
  38. BIN
      资源/staticData/plow/leftAc2.png
  39. BIN
      资源/staticData/visit2/进入院落.mp4
  40. BIN
      资源/staticData/xianJu/chang.mp4

+ 128 - 2
Code/public/myData/myData.js

@@ -389,6 +389,8 @@ const visitHotArr = [
 // 主客宴请热点信息(后面的更多模块也会复用)
 const banquetHotArr = [
   // 待完善 louType 字段 1=一楼 2=2楼 3=庭院 (字符串)
+  // 新加热点注意:isModel: true,表示是文物 图标有所不同
+  // noShow: true,表示不再更多模块中显示(所有新加的热点带上这个字段)
   {
     louType: '1',
     // 热点名字
@@ -1590,13 +1592,14 @@ const plowHotArr = [
 
 // 更多模块的热点(过滤-通过 noShow )
 let moreHotArr = [...visitHotArr, ...banquetHotArr, ...danceHotArr, ...plowHotArr]
+// console.log('---------', moreHotArr.length)
 
 moreHotArr = moreHotArr.filter(v => !v.noShow)
 
 const myDataTemp = {
   // 开发调试为 false  正式上线为  true
   // 开发调试的时候 取消所有加载进度条 所有的视频动画都加上跳过按钮
-  isLdong: false,
+  isLdong: true,
 
   // 首页(静态资源目录位置:staticData/home)
   home: {
@@ -1946,7 +1949,130 @@ const myDataTemp = {
       },
       人: {
         // 背景图路径+名字
-        bg: 'more/bg2.jpg'
+        bg: 'more/bg2.jpg',
+        skArr: [
+          {
+            name: '庄园主',
+            // imgSrc 666666666
+            son: [
+              {
+                name: '迎宾',
+                imgSrc: 'more/ren/yingBin.jpg',
+                videoSrc: 'more/ren/yinBin.mp4',
+                path: '/visit'
+              },
+              {
+                name: '投壶',
+                imgSrc: 'more/ren/touHu.jpg',
+                path: '/unend/game3?r=ren'
+              },
+              {
+                name: '安排座次',
+                imgSrc: 'more/ren/anPaiZuoCi.jpg',
+                path: '/unend/game2?r=ren'
+              },
+              {
+                name: '宴饮',
+                imgSrc: 'more/ren/yanYin.jpg',
+                path: '/banquet'
+              },
+              {
+                name: '乐舞百戏',
+                imgSrc: 'more/ren/yueWuBaiXi.jpg',
+                path: '/dance'
+              },
+              {
+                name: '冥想',
+                imgSrc: 'more/ren/minXiang.jpg',
+                path: '/xianJu'
+              }
+            ]
+          },
+          {
+            name: '宾客',
+            son: [
+              {
+                name: '投名帖',
+                imgSrc: 'more/ren/touMingTie.jpg',
+                path: '/base?r=ren'
+              },
+              {
+                name: '车骑拜谒',
+                imgSrc: 'more/ren/cheQiBaiYe.jpg',
+                videoSrc: 'base/end.mp4',
+                path: '/visit'
+              },
+              {
+                name: '羊酒贺礼',
+                imgSrc: 'more/ren/yangJiuHeLi.jpg',
+                path: '/visit2'
+              },
+              {
+                name: '投壶',
+                imgSrc: 'more/ren/touHu.jpg',
+                path: '/unend/game3?r=ren'
+              },
+              {
+                name: '宴饮',
+                imgSrc: 'more/ren/yanYin.jpg',
+                path: '/banquet'
+              },
+              {
+                name: '乐舞',
+                imgSrc: 'more/ren/yueWu.jpg',
+                path: '/dance'
+              },
+              {
+                name: '离场',
+                imgSrc: 'more/ren/liChang.jpg',
+                videoSrc: 'xianJu/end.mp4',
+                path: '/end'
+              }
+            ]
+          },
+          {
+            name: '奴仆',
+            son: [
+              {
+                name: '扫地',
+                imgSrc: 'more/ren/saoDi.jpg',
+                videoSrc: 'more/ren/saoDi.mp4',
+                path: '/visit'
+              },
+              {
+                name: '备宴',
+                imgSrc: 'more/ren/beiYan.jpg',
+                path: '/chef'
+              },
+              {
+                name: '耕作',
+                imgSrc: 'more/ren/gengZuo.jpg',
+                path: '/plow'
+              },
+              {
+                name: '巡夜',
+                imgSrc: 'more/ren/xunYe.jpg',
+                videoSrc: 'more/ren/xunYe.mp4',
+                path: '/end'
+              }
+            ]
+          },
+          {
+            name: '歌舞伎',
+            son: [
+              {
+                name: '乐舞',
+                imgSrc: 'more/ren/yueWu.jpg',
+                path: '/dance?r=ren'
+              },
+              {
+                name: '百戏',
+                imgSrc: 'more/ren/baiXi.jpg',
+                path: '/visit2?r=ren'
+              }
+            ]
+          }
+        ]
       }
     },
     文物欣赏: {

BIN
Code/src/assets/img/leftAc2.png


+ 17 - 2
Code/src/components/BaseImg/index.tsx

@@ -13,9 +13,20 @@ type Props = {
   moreSta?: boolean
   imgNumFu: () => void
   imgNow: boolean
+  hidden?: boolean
 }
 
-function BaseImg({ isShow, iconSrc, parentFu, bgImg, num = 30, moreSta, imgNumFu, imgNow }: Props) {
+function BaseImg({
+  isShow,
+  iconSrc,
+  parentFu,
+  bgImg,
+  num = 30,
+  moreSta,
+  imgNumFu,
+  imgNow,
+  hidden = false
+}: Props) {
   const [loding, setLoding] = useState(myData.isLdong ? 0 : 100)
 
   const timeRR = useRef(-1)
@@ -46,7 +57,11 @@ function BaseImg({ isShow, iconSrc, parentFu, bgImg, num = 30, moreSta, imgNumFu
   }, [btnStartFu, imgNow, loding, moreSta, num])
 
   return (
-    <div id='BaseImg' className={classNames(styles.BaseImg, isShow ? styles.BaseImgHide : '')}>
+    <div
+      id='BaseImg'
+      hidden={hidden}
+      className={classNames(styles.BaseImg, isShow ? styles.BaseImgHide : '')}
+    >
       {bgImg ? <img onLoad={imgNumFu} id='bgImgBox' src={bgImg} alt='' /> : null}
 
       {moreSta ? null : <img onLoad={imgNumFu} className='BIlogo' src={iconSrc} alt='' />}

+ 7 - 1
Code/src/components/FloorBtn/index.tsx

@@ -21,7 +21,13 @@ function FloorBtn({ unityId, gameFu, plowFu }: Props) {
         onClick={() => history.push(`/unity/${unityId}`)}
       ></div>
       {/* 更多 跳新页面 */}
-      <div title='更多' className='FloorBtn2' onClick={() => history.push('/more')}></div>
+      <div
+        title='更多'
+        className='FloorBtn2'
+        onClick={() =>
+          history.push(window.location.href.includes('r=ren') ? '/more?r=ren' : '/more')
+        }
+      ></div>
     </div>
   )
 }

+ 13 - 5
Code/src/pages/A1_1base/index.tsx

@@ -6,6 +6,7 @@ import EndVideo from '@/components/EndVideo'
 import useLoding from '@/components/ownUse/useLoding'
 import BtnRight from '@/components/BtnRight'
 import CatVideo from '@/components/CatVideo'
+import history from '@/utils/history'
 
 function A11base() {
   // 先加载背景图 序列帧等 在加载视频
@@ -43,7 +44,7 @@ function A11base() {
   }, [])
 
   // 名帖信息展示
-  const [tieShow, setTieShow] = useState(false)
+  const [tieShow, setTieShow] = useState(window.location.href.includes('r=ren') ? true : false)
 
   // 名帖1点击毛笔
   const [biShow, setBiShow] = useState(false)
@@ -55,7 +56,7 @@ function A11base() {
     <div className={styles.A11base}>
       {/* 背景图页面 */}
       {!tieVideoSrc ? (
-        <div className={classNames('A11bg')}>
+        <div className={classNames('A11bg')} hidden={window.location.href.includes('r=ren')}>
           <img onLoad={imgNumFu} id='bgImgBox' src={baseURL + myData.base.bgImg} alt='' />
 
           <img onLoad={imgNumFu} className='A11Vlogo' src={`${baseURL}home/logo.png`} alt='' />
@@ -88,7 +89,14 @@ function A11base() {
               src={`${baseURL}base/bi1.png`}
               alt=''
             />
-            <BtnRight title='返回' clickSon={() => setTieShow(false)} imgName='back' />
+            <BtnRight
+              title='返回'
+              clickSon={() => {
+                if (window.location.href.includes('?r=ren')) history.go(-1)
+                else setTieShow(false)
+              }}
+              imgName='back'
+            />
           </div>
 
           {/* 名帖2 */}
@@ -118,12 +126,12 @@ function A11base() {
         <>
           <CatVideo
             isShow={tieVideoSrc === 'tie1'}
-            src={baseURL + '/base/tie1.mp4'}
+            src={baseURL + 'base/tie1.mp4'}
             parentFu={() => btnStartFu()}
           />
           <CatVideo
             isShow={tieVideoSrc === 'tie2'}
-            src={baseURL + '/base/tie2.mp4'}
+            src={baseURL + 'base/tie2.mp4'}
             parentFu={() => btnStartFu()}
           />
         </>

+ 7 - 3
Code/src/pages/A2visit2/index.tsx

@@ -41,7 +41,7 @@ function A2visit2() {
   const [toShi, setToShi] = useState(false)
 
   // 点击观看百戏
-  const [baiXi, setBaiXi] = useState(false)
+  const [baiXi, setBaiXi] = useState(window.location.href.includes('r=ren') ? true : false)
 
   const [xiAc, setXiAc] = useState('')
 
@@ -229,8 +229,12 @@ function A2visit2() {
         <BtnRight
           title='返回'
           clickSon={() => {
-            setBaiXi(false)
-            setXiAc('')
+            if (window.location.href.includes('?r=ren')) {
+              history.go(-1)
+            } else {
+              setBaiXi(false)
+              setXiAc('')
+            }
           }}
           imgName='back'
         />

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

@@ -13,7 +13,7 @@ import BtnRight from '@/components/BtnRight'
 import VideoModel from '@/components/VideoModel'
 
 function A4dance() {
-  const [baseSta, setBaseSta] = useState(false)
+  const [baseSta, setBaseSta] = useState(window.location.href.includes('r=ren') ? true : false)
 
   // 点击继续
   const btnStart = useCallback(() => {

+ 36 - 0
Code/src/pages/A6xian/index.module.scss

@@ -43,6 +43,7 @@
     }
 
     .A6XimgBox {
+      background-color: #cbc5b7;
       position: absolute;
       top: 0;
       left: 0;
@@ -50,6 +51,41 @@
       width: 100%;
       height: 100%;
       z-index: 30;
+
+      .A6XimgBoxSon {
+        width: 100%;
+        height: 100%;
+        overflow-x: auto;
+        overflow-y: hidden;
+        &::-webkit-scrollbar {
+          display: none;
+        }
+        video {
+          pointer-events: none;
+          width: auto;
+        }
+      }
+      .A6XimgBoxBtn {
+        position: absolute;
+        z-index: 100;
+        bottom: 10px;
+        left: 50%;
+        transform: translateX(-50%);
+        display: flex;
+        & > div {
+          margin: 0 10px;
+        }
+      }
+    }
+
+    // 屏幕<=1200
+    @media screen and (max-width: 1200px) {
+      .A6XimgBox {
+        .A6XimgBoxSon {
+          overflow-y: auto;
+          overflow-x: auto;
+        }
+      }
     }
   }
 }

+ 85 - 8
Code/src/pages/A6xian/index.tsx

@@ -1,4 +1,4 @@
-import React, { useCallback, useState } from 'react'
+import React, { useCallback, useRef, useState } from 'react'
 import styles from './index.module.scss'
 import BaseImg from '@/components/BaseImg'
 import { baseURL, myData } from '@/utils/http'
@@ -7,6 +7,10 @@ import CatVideo from '@/components/CatVideo'
 import A6PanoVideo from './A6PanoVideo'
 import classNames from 'classnames'
 import { domDelOwnFu } from '@/utils/utilsSome'
+import FloorBtn from '@/components/FloorBtn'
+import NextPage from '@/components/NextPage'
+import EndVideo from '@/components/EndVideo'
+import history from '@/utils/history'
 
 function A6xian() {
   // 过度动画
@@ -29,12 +33,40 @@ function A6xian() {
   const { imgNow, imgNumFu } = useLoding(3)
 
   // 点击升仙
-  const [xianShow, setXianShow] = useState(false)
+  const [xianShow, setXianShow] = useState(window.location.href.includes('t=xian') ? true : false)
+
+  // 滚动
+  const [isFlag, setIsFlag] = useState(false)
+
+  const xianRef = useRef<HTMLDivElement>(null)
+
+  const mousemoveFu = useCallback(
+    (ev: any, flag?: boolean) => {
+      if (xianRef.current) {
+        if (flag && !isFlag) {
+          const nowMove = xianRef.current.scrollLeft
+          // 滚轮
+          let num = 50
+          if (ev.deltaY < 0) num = -num
+          xianRef.current.scrollLeft = nowMove + num
+        } else if (isFlag) {
+          const nowMove = xianRef.current.scrollLeft
+
+          // 鼠标按住移动
+          xianRef.current.scrollLeft = nowMove - ev.movementX
+        }
+      }
+    },
+    [isFlag]
+  )
+
+  const videoRef = useRef<HTMLVideoElement>(null)
 
   return (
     <div className={styles.A6xian}>
       {/* 初始静态图 */}
       <BaseImg
+        hidden={window.location.href.includes('t=xian')}
         isShow={cutVideoShow}
         iconSrc={`${baseURL}xianJu/mulu.png`}
         parentFu={() => btnStart()}
@@ -62,6 +94,9 @@ function A6xian() {
             onClick={() => {
               domDelOwnFu('.pvBox')
               setXianShow(true)
+              setTimeout(() => {
+                if (videoRef.current) videoRef.current.play()
+              }, 100)
             }}
           >
             升仙之途
@@ -69,12 +104,54 @@ function A6xian() {
         </div>
       ) : null}
 
-      <div
-        className='A6XimgBox'
-        style={{ opacity: xianShow ? '1' : '0', pointerEvents: xianShow ? 'auto' : 'none' }}
-      >
-        4564654
-      </div>
+      {/* 点击升仙之途 出来的长 滚动 页面 */}
+      {imgNow || window.location.href.includes('t=xian') ? (
+        <div
+          className='A6XimgBox'
+          style={{ opacity: xianShow ? '1' : '0', pointerEvents: xianShow ? 'auto' : 'none' }}
+        >
+          <div
+            className='A6XimgBoxSon'
+            style={{ cursor: isFlag ? 'move' : 'default' }}
+            ref={xianRef}
+            onMouseDown={() => setIsFlag(true)}
+            onMouseUp={() => setIsFlag(false)}
+            onMouseLeave={() => setIsFlag(false)}
+            onMouseMove={e => mousemoveFu(e)}
+            onWheel={e => mousemoveFu(e, true)}
+          >
+            <video
+              ref={videoRef}
+              playsInline
+              muted
+              webkit-playsinline='true'
+              x5-video-player-type='h5'
+              loop={true}
+            >
+              <source type='video/mp4' src={`${baseURL}xianJu/chang.mp4`} />
+              Your browser does not support the video tag.
+            </video>
+          </div>
+          {/* 跳到下一章 */}
+          <NextPage clickSon={() => setLastVideo(true)} txt='结束冥想' />
+          {/* 右下角按钮 */}
+          <FloorBtn />
+
+          {/* 底部按钮 */}
+          <div className='A6XimgBoxBtn'>
+            <div onClick={() => history.push('/yun?t=xian')}>四神云气图</div>
+            <div onClick={() => history.push('/xian?t=xian')}>卜千秋墓中的升仙图</div>
+          </div>
+        </div>
+      ) : null}
+
+      {/* 最后的视频 */}
+      <EndVideo
+        lastVideo={lastVideo}
+        src={baseURL + 'xianJu/end.mp4'}
+        path='/end'
+        delDom='.A22Pano'
+      />
     </div>
   )
 }

+ 95 - 27
Code/src/pages/B1more/S2mien/index.module.scss

@@ -52,36 +52,71 @@
           }
         }
       }
-      .S2btn {
-        position: absolute;
-        bottom: 0;
-        left: 0;
-        height: 50px;
+
+      // 人-----
+      .S2renBox {
+        width: 100%;
+        height: 100%;
         display: flex;
-        padding-left: 40px;
-        & > div {
-          cursor: pointer;
-          transition: all 0.3s;
-          color: #fffddc;
-          opacity: 0.5;
-          width: 36px;
-          height: 36px;
-          border-radius: 50%;
-          margin-right: 20px;
-          text-align: center;
-          line-height: 32px;
-          background-image: url('../../../assets/img/icon-bcxz.png');
-          background-size: 100% 100%;
-          &:hover {
-            opacity: 1;
-            color: #eacf60;
-            background-image: url('../../../assets/img/icon-bcxz1.png');
+        .S2renBox1 {
+          width: 70px;
+          .S2renRow {
+            width: 54px;
+            height: 54px;
+            background-size: 100% 100%;
+            cursor: pointer;
+            transition: all 0.3s;
+            margin: 10px 0;
+            display: flex;
+            justify-content: center;
+            align-items: center;
+            font-size: 14px;
+            padding-bottom: 3px;
+            &:hover {
+              background-image: url('../../../assets/img/leftAc2.png') !important;
+              color: #eacf60 !important;
+            }
           }
         }
-        .S2btnAc {
-          opacity: 1;
-          color: #eacf60;
-          background-image: url('../../../assets/img/icon-bcxz1.png');
+        .S2renBox2 {
+          width: 120px;
+          height: 100%;
+
+          & > div {
+            width: 100%;
+            height: 100%;
+            overflow: auto;
+            padding-right: 10px;
+
+            flex-direction: column;
+            justify-content: center;
+            &::-webkit-scrollbar {
+              width: 2px;
+            }
+            &::-webkit-scrollbar-thumb {
+              background: var(--themeColor2);
+            }
+
+            .S2ren2Row {
+              cursor: pointer;
+              width: 108px;
+              height: 56px;
+              border-radius: 4px;
+              overflow: hidden;
+              margin-bottom: 10px;
+              border: 1px solid transparent;
+              transition: all 0.3s;
+              & > img {
+                pointer-events: none;
+                width: 100%;
+                height: 100%;
+                object-fit: fill !important;
+              }
+              &:hover {
+                border-color: var(--themeColor2);
+              }
+            }
+          }
         }
       }
     }
@@ -94,5 +129,38 @@
       height: 100%;
       z-index: 10;
     }
+
+    .S2btn {
+      position: absolute;
+      bottom: 0;
+      left: 50px;
+      height: 50px;
+      display: flex;
+      padding-left: 40px;
+      & > div {
+        cursor: pointer;
+        transition: all 0.3s;
+        color: #fffddc;
+        opacity: 0.5;
+        width: 36px;
+        height: 36px;
+        border-radius: 50%;
+        margin-right: 20px;
+        text-align: center;
+        line-height: 32px;
+        background-image: url('../../../assets/img/icon-bcxz.png');
+        background-size: 100% 100%;
+        &:hover {
+          opacity: 1;
+          color: #eacf60;
+          background-image: url('../../../assets/img/icon-bcxz1.png');
+        }
+      }
+      .S2btnAc {
+        opacity: 1;
+        color: #eacf60;
+        background-image: url('../../../assets/img/icon-bcxz1.png');
+      }
+    }
   }
 }

+ 78 - 17
Code/src/pages/B1more/S2mien/index.tsx

@@ -9,6 +9,7 @@ import history from '@/utils/history'
 
 type Props = {
   hidden: boolean
+  setLastVideo: (info: any) => void
 }
 type TitType = '物' | '人'
 
@@ -18,16 +19,13 @@ const dataTemp = myData.more['汉代百科']
 
 const data1 = dataTemp['物']
 
-function S2mien({ hidden }: Props) {
+function S2mien({ hidden, setLastVideo }: Props) {
   const sroolDomRef = useRef<HTMLDivElement>(null)
 
   const [tit, setTit] = useState<TitType>('物')
 
-  const titFu = useCallback((val: TitType) => {
-    if (val === '人') {
-      return alert('正在努力开发中')
-    }
-    setTit(val)
+  useEffect(() => {
+    if (window.location.href.includes('r=ren')) setTit('人')
   }, [])
 
   // 选中的索引
@@ -65,6 +63,23 @@ function S2mien({ hidden }: Props) {
     return name
   }, [opnInd])
 
+  // 人---------------
+  // 一级选中
+  const [renAc1, setRenAc1] = useState('庄园主')
+
+  useEffect(() => {
+    if (renSorrlRef.current) {
+      renSorrlRef.current.scrollTo({ top: 0, behavior: 'smooth' })
+    }
+  }, [renAc1])
+
+  // 一级选中的数据
+  const renAcData = useMemo(() => {
+    return myData.more.汉代百科.人.skArr.find(v => v.name === renAc1)!.son
+  }, [renAc1])
+
+  const renSorrlRef = useRef<HTMLDivElement>(null)
+
   return (
     <div
       hidden={hidden}
@@ -76,7 +91,8 @@ function S2mien({ hidden }: Props) {
         className='S2left'
         style={{ backgroundImage: `url(${baseURL}more/s1Zhe.png)`, opacity: opnInd > -1 ? 0 : 1 }}
       >
-        <div ref={sroolDomRef} className='S2leftMain'>
+        {/* 物----------- */}
+        <div ref={sroolDomRef} className='S2leftMain' hidden={tit !== '物'}>
           {data1.hot.map((item, index) => (
             <div
               onClick={() => clickSon(index)}
@@ -87,22 +103,58 @@ function S2mien({ hidden }: Props) {
             </div>
           ))}
         </div>
-        {/* 人和物的选择 */}
-        <div className='S2btn' hidden>
-          {leftFloorArr.map(v => (
+
+        {/* 人------------- */}
+        <div className='S2renBox' hidden={tit !== '人'}>
+          {/* 左侧 */}
+          <div className='S2renBox1'>
+            {myData.more.汉代百科.人.skArr.map((item, index) => (
+              <div
+                style={{
+                  backgroundImage: `url(${baseURL}plow/left${
+                    renAc1 === item.name ? 'Ac2' : ''
+                  }.png)`,
+                  color: renAc1 === item.name ? '#EACF60' : '#DACB8B'
+                }}
+                key={index}
+                className='S2renRow'
+                onClick={() => setRenAc1(item.name)}
+              >
+                {item.name}
+              </div>
+            ))}
+          </div>
+
+          {/* 右侧图文信息 */}
+          <div className='S2renBox2'>
             <div
-              key={v}
-              onClick={() => titFu(v)}
-              className={classNames(tit === v ? 'S2btnAc' : '')}
+              className='mySorrl'
+              ref={renSorrlRef}
+              style={{
+                display: renAcData.length < 4 ? 'flex' : 'block',
+                paddingBottom: renAcData.length < 4 ? '30px' : '0'
+              }}
             >
-              {v}
+              {renAcData.map((item, index) => (
+                <div
+                  className='S2ren2Row'
+                  key={index}
+                  onClick={() => {
+                    if (item.videoSrc) {
+                      setLastVideo({ src: item.videoSrc, path: item.path })
+                    } else history.push(item.path)
+                  }}
+                >
+                  <img src={baseURL + item.imgSrc} alt='' />
+                </div>
+              ))}
             </div>
-          ))}
+          </div>
         </div>
       </div>
 
-      {/* 右侧 */}
-      <div className='S2right'>
+      {/* 物-----------右侧 */}
+      <div className='S2right' hidden={tit !== '物'}>
         {/* 热点图标 */}
         {data1.hot.map((item, index) => (
           <HotIcon
@@ -134,6 +186,15 @@ function S2mien({ hidden }: Props) {
           <Hot2 data={data1.hot[opnInd].data} closeFu={() => setOpenInd(-1)} name={hotName} />
         )
       ) : null}
+
+      {/* 人和物的选择 */}
+      <div className='S2btn'>
+        {leftFloorArr.map(v => (
+          <div key={v} onClick={() => setTit(v)} className={classNames(tit === v ? 'S2btnAc' : '')}>
+            {v}
+          </div>
+        ))}
+      </div>
     </div>
   )
 }

+ 9 - 0
Code/src/pages/B1more/index.module.scss

@@ -1,6 +1,15 @@
 .B1more {
   position: relative;
   :global {
+    .lastVideo {
+      position: absolute;
+      z-index: 99999;
+      top: 0;
+      left: 0;
+      width: 100%;
+      height: 100%;
+    }
+
     video {
       width: 100%;
       height: 100%;

+ 43 - 4
Code/src/pages/B1more/index.tsx

@@ -32,8 +32,11 @@ type TxtType = '探索庄园' | '汉代百科' | '文物欣赏'
 const floorArr: TxtType[] = ['探索庄园', '汉代百科', '文物欣赏']
 
 function B1more() {
-  const [floorTxt, setFloorTxt] = useState<TxtType>('探索庄园')
-  const floorRef = useRef<TxtType>('探索庄园')
+  const [floorTxt, setFloorTxt] = useState<TxtType>(
+    window.location.href.includes('r=ren') ? '汉代百科' : '探索庄园'
+  )
+
+  const floorRef = useRef<TxtType>(window.location.href.includes('r=ren') ? '汉代百科' : '探索庄园')
 
   // 需要播放的视频路径
   const [videoSrc, setVideoSrc] = useState('')
@@ -66,7 +69,7 @@ function B1more() {
   }, [floorTxt])
 
   // 初始加载中动画
-  const [isLoding, setIsLoding] = useState(true)
+  const [isLoding, setIsLoding] = useState(window.location.href.includes('r=ren') ? false : true)
 
   // 先加载背景图 序列帧等 在加载视频
   const { imgNow, imgNumFu } = useLoding(1)
@@ -74,6 +77,18 @@ function B1more() {
   // 点击左下角按钮
   const [leftVideo, setLeftVideo] = useState(false)
 
+  //  汉代百科点击人 离开前先播放视频
+  const [lastVideo, setLastVideo] = useState({ src: '', path: '' })
+  const videoRef = useRef<HTMLVideoElement>(null)
+
+  useEffect(() => {
+    if (lastVideo.src) {
+      setTimeout(() => {
+        if (videoRef.current) videoRef.current.play()
+      }, 100)
+    }
+  }, [lastVideo.src])
+
   return (
     <div className={styles.B1more}>
       {/* 三个主要页面 */}
@@ -89,7 +104,10 @@ function B1more() {
       {imgNow ? (
         <>
           <S1manor hidden={!!videoSrc || floorTxt !== '探索庄园'} />
-          <S2mien hidden={!!videoSrc || floorTxt !== '汉代百科'} />
+          <S2mien
+            hidden={!!videoSrc || floorTxt !== '汉代百科'}
+            setLastVideo={info => setLastVideo(info)}
+          />
           <S3goods hidden={!!videoSrc || floorTxt !== '文物欣赏'} />
         </>
       ) : null}
@@ -174,6 +192,27 @@ function B1more() {
           closeFu={() => setLeftVideo(false)}
         />
       ) : null}
+
+      {/* 点击人 播放视频 然后跳转 */}
+
+      {lastVideo.src ? (
+        <div className='lastVideo' id='HotOpCss'>
+          <video
+            ref={videoRef}
+            playsInline
+            muted
+            webkit-playsinline='true'
+            x5-video-player-type='h5'
+            onEnded={() => history.push(lastVideo.path)}
+          >
+            <source type='video/mp4' src={baseURL + lastVideo.src} />
+            Your browser does not support the video tag.
+          </video>
+
+          {/* 右下角的跳过按钮 */}
+          <BtnRight imgName='skip' clickSon={() => history.push(lastVideo.path)} title='跳过' />
+        </div>
+      ) : null}
     </div>
   )
 }

+ 10 - 2
Code/src/pages/B3yun/index.tsx

@@ -136,8 +136,16 @@ function B3yun() {
       {/* 右下角的图标 */}
       {imgNow ? (
         <div className='yunBtn'>
-          <div className='yunBtn1' title='仙居世界' onClick={() => history.push('/hots')}></div>
-          <div className='yunBtn2' title='返回' onClick={() => history.go(-1)}></div>
+          {/* <div className='yunBtn1' title='仙居世界' onClick={() => history.push('/hots')}></div> */}
+          <div
+            className='yunBtn2'
+            title='返回'
+            onClick={() =>
+              window.location.href.includes('t=xian')
+                ? history.push('/xianJu?t=xian')
+                : history.go(-1)
+            }
+          ></div>
         </div>
       ) : null}
     </div>

+ 7 - 1
Code/src/pages/B4xian/index.tsx

@@ -43,7 +43,13 @@ function B4xian() {
       </div>
 
       {/* 返回按钮 */}
-      <BtnRight imgName='back' clickSon={() => history.go(-1)} title='返回' />
+      <BtnRight
+        imgName='back'
+        clickSon={() =>
+          window.location.href.includes('t=xian') ? history.push('/xianJu?t=xian') : history.go(-1)
+        }
+        title='返回'
+      />
     </div>
   )
 }

+ 4 - 1
Code/src/pages/C1unity/index.tsx

@@ -31,6 +31,8 @@ function C1unity() {
 
     const temp = Reflect.get(obj, urlObj.id)
 
+    console.log(123, temp)
+
     const res = Reflect.get(temp, isPc ? 'pc' : 'mo')
 
     setUrl(`${otherUrl + res}?T=${Date.now()}`)
@@ -45,7 +47,8 @@ function C1unity() {
 
     window.unityBack = () => {
       // 退出
-      history.go(-1)
+      if (window.location.href.includes('r=ren')) history.replace('/more?r=ren')
+      else history.go(-1)
     }
   }, [urlObj.id])
 

+ 4 - 1
Code/src/pages/C2unityEnd/index.tsx

@@ -31,6 +31,8 @@ function C2unityEnd() {
   useEffect(() => {
     const key = urlObj.key
 
+    console.log(123, key)
+
     const objTemp = Reflect.get(obj, key)
     const res = Reflect.get(objTemp, isPc ? 'pc' : 'app')
     setUrl(`${otherUrl + res}?T=${Date.now()}`)
@@ -59,7 +61,8 @@ function C2unityEnd() {
   useEffect(() => {
     window.unityBack = () => {
       // 退出
-      history.go(-1)
+      if (window.location.href.includes('r=ren')) history.replace('/more?r=ren')
+      else history.go(-1)
     }
   }, [])
 

+ 9 - 0
Code/src/types/declaration.d.ts

@@ -173,6 +173,15 @@ type MyDataType = {
       }
       人: {
         bg: string
+        skArr: {
+          name: string
+          son: {
+            name: string
+            imgSrc: string
+            videoSrc?: string
+            path: string
+          }[]
+        }[]
       }
     }
     文物欣赏: {

BIN
资源/staticData/more/ren/anPaiZuoCi.jpg


BIN
资源/staticData/more/ren/baiXi.jpg


BIN
资源/staticData/more/ren/beiYan.jpg


BIN
资源/staticData/more/ren/cheQiBaiYe.jpg


BIN
资源/staticData/more/ren/gengZuo.jpg


BIN
资源/staticData/more/ren/liChang.jpg


BIN
资源/staticData/more/ren/minXiang.jpg


BIN
资源/staticData/more/ren/saoDi.jpg


BIN
资源/staticData/more/ren/saoDi.mp4


BIN
资源/staticData/more/ren/touHu.jpg


BIN
资源/staticData/more/ren/touMingTie.jpg


BIN
资源/staticData/more/ren/xunYe.mp4


BIN
资源/staticData/more/ren/yanYin.jpg


BIN
资源/staticData/more/ren/yangJiuHeLi.jpg


BIN
资源/staticData/more/ren/yinBin.jpg


BIN
资源/staticData/more/ren/yinBin.mp4


BIN
资源/staticData/more/ren/yingBin.jpg


BIN
资源/staticData/more/ren/yueWu.jpg


BIN
资源/staticData/more/ren/yueWuBaiXi.jpg


BIN
资源/staticData/plow/leftAc2.png


BIN
资源/staticData/visit2/进入院落.mp4


BIN
资源/staticData/xianJu/chang.mp4