소스 검색

feat:大场景开发

lanxin 3 달 전
부모
커밋
a80623b0b1
53개의 변경된 파일59개의 추가작업 그리고 108개의 파일을 삭제
  1. 0 5
      public/css/main.css
  2. 10 8
      public/css/oldVer/main0.css
  3. BIN
      public/images/Volume btn_off.png
  4. BIN
      public/images/Volume btn_on.png
  5. BIN
      public/images/auto-suspend.png
  6. BIN
      public/images/auto.png
  7. BIN
      public/images/close1.png
  8. BIN
      public/images/dollhouse.png
  9. BIN
      public/images/dollhouse_active.png
  10. BIN
      public/images/floor.png
  11. BIN
      public/images/floor_active.png
  12. BIN
      public/images/full.png
  13. BIN
      public/images/fullx.png
  14. BIN
      public/images/hotlist.png
  15. BIN
      public/images/inside.png
  16. BIN
      public/images/inside_active.png
  17. BIN
      public/images/pause.png
  18. BIN
      public/images/play.png
  19. 1 1
      public/index.html
  20. 5 4
      public/js/Hot.js
  21. BIN
      src/assets/img/close.png
  22. BIN
      src/assets/img/hot_bg.png
  23. BIN
      src/assets/img/hot_bg_M.png
  24. BIN
      src/assets/img/hotlist_bg.png
  25. BIN
      src/assets/img/hotlist_bg_M.png
  26. BIN
      src/assets/img/like.png
  27. BIN
      src/assets/img/likeAc.png
  28. BIN
      src/assets/img/share.png
  29. BIN
      src/assets/img/view.png
  30. 7 8
      src/pages/A2main/index.module.scss
  31. 17 6
      src/pages/A2main/index.tsx
  32. 11 9
      src/pages/A3hotList/index.module.scss
  33. BIN
      src/pages/A4base/image/bg.png
  34. BIN
      src/pages/A4base/image/button.png
  35. BIN
      src/pages/A4base/image/logo.png
  36. BIN
      src/pages/A4base/image/other.png
  37. BIN
      src/pages/A4base/image/pic_1.png
  38. BIN
      src/pages/A4base/image/pic_2.png
  39. BIN
      src/pages/A4base/image/title.png
  40. BIN
      src/pages/A4base/image/title_2.png
  41. BIN
      src/pages/A4base/image/title_3.png
  42. 1 19
      src/pages/A4base/index.tsx
  43. BIN
      src/pages/A5Mobile/image/bg.png
  44. BIN
      src/pages/A5Mobile/image/button.png
  45. BIN
      src/pages/A5Mobile/image/logo.png
  46. BIN
      src/pages/A5Mobile/image/other.png
  47. BIN
      src/pages/A5Mobile/image/pic_1.png
  48. BIN
      src/pages/A5Mobile/image/pic_2.png
  49. BIN
      src/pages/A5Mobile/image/pic_3.png
  50. BIN
      src/pages/A5Mobile/image/title.png
  51. BIN
      src/pages/A5Mobile/image/title_2.png
  52. 6 29
      src/pages/A5Mobile/index.module.scss
  53. 1 19
      src/pages/A5Mobile/index.tsx

+ 0 - 5
public/css/main.css

@@ -4462,11 +4462,6 @@ a.tag-link {
   bottom: 135px;
 }
 
-#gui #drawer.playing,
-#gui .pinBottom.playing {
-  bottom: 20px;
-}
-
 #thumb-container .thumbImg {
   cursor: pointer;
 }

+ 10 - 8
public/css/oldVer/main0.css

@@ -187,10 +187,11 @@ a {
 
 @media screen and (max-width: 1200px) {
   #closepop {
-    width: 40px;
-    height: 40px;
-    top: 20px;
-    right: 20px;
+    width: 45px;
+    height: 45px;
+    top: 50%;
+    right: 50%;
+    transform: translate(50%, 156px);
   }
   .specialTitle {
     bottom: 66%;
@@ -220,10 +221,11 @@ a {
 }
 @media screen and (max-width: 667px) {
   #closepop {
-    width: 20px;
-    height: 20px;
-    top: 105px;
-    right: 30px;
+    width: 45px;
+    height: 45px;
+    top: 50%;
+    right: 50%;
+    transform: translate(50%, 176px);
   }
 
   #title-toggle {

BIN
public/images/Volume btn_off.png


BIN
public/images/Volume btn_on.png


BIN
public/images/auto-suspend.png


BIN
public/images/auto.png


BIN
public/images/close1.png


BIN
public/images/dollhouse.png


BIN
public/images/dollhouse_active.png


BIN
public/images/floor.png


BIN
public/images/floor_active.png


BIN
public/images/full.png


BIN
public/images/fullx.png


BIN
public/images/hotlist.png


BIN
public/images/inside.png


BIN
public/images/inside_active.png


BIN
public/images/pause.png


BIN
public/images/play.png


+ 1 - 1
public/index.html

@@ -8,7 +8,7 @@
     <meta name="description" content="Web site created using create-react-app" />
     <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
 
-    <title>海南省博物馆-物华天宝黎海琼珍</title>
+    <title>武汉博物馆-琬琰英华</title>
 
     <!-- 大场景相关 -->
     <link rel="stylesheet" href="./css/oldVer/main0.css" />

+ 5 - 4
public/js/Hot.js

@@ -57,10 +57,11 @@ window.initHot = function (model) {
       ? (src = link + '?time=' + randomTime().getTime() + '&id=' + window.number + o)
       : (src = link + '&time=' + randomTime().getTime() + '&id=' + window.number + o)
 
-    return src.replace(
-      'https://www.4dmodel.com/SuperTwo/hot_online1',
-      'https://houseoss.4dkankan.com/project/HainanMuseum/hot'
-    )
+    // return src.replace(
+    //   'https://www.4dmodel.com/SuperTwo/hot_online1',
+    //   'https://houseoss.4dkankan.com/project/HainanMuseum/hot'
+    // )
+    return src.replace('https://www.4dmodel.com/SuperTwo/hot_online1', 'http://localhost:8080')
     // return src
   }
   var removeSrcPostMark = function (url) {

BIN
src/assets/img/close.png


BIN
src/assets/img/hot_bg.png


BIN
src/assets/img/hot_bg_M.png


BIN
src/assets/img/hotlist_bg.png


BIN
src/assets/img/hotlist_bg_M.png


BIN
src/assets/img/like.png


BIN
src/assets/img/likeAc.png


BIN
src/assets/img/share.png


BIN
src/assets/img/view.png


+ 7 - 8
src/pages/A2main/index.module.scss

@@ -18,7 +18,6 @@
       line-height: 30px;
       text-align: center;
       font-size: 14px;
-      font-family: 'fzFont';
       color: #fff;
     }
 
@@ -176,23 +175,23 @@
     .scrollbar {
       background-color: transparent;
       .handle {
-        background-color: blue;
+        background-color: rgb(253, 251, 178);
         height: 6px;
       }
     }
 
     // 进度条
     #playHead {
-      background-color: red;
+      background-color: rgba(0, 0, 0, 0.5);
       #progressBar {
         .step {
           &::before {
-            background-color: #fff;
+            background-color: rgb(195, 164, 125);
           }
         }
         .active {
           &::before {
-            background-color: blue;
+            background-color: rgb(253, 251, 178);
           }
         }
       }
@@ -211,7 +210,7 @@
         justify-content: flex-end;
         align-items: center;
         flex-direction: column;
-        gap: 20px;
+        gap: 30px;
         #play,
         #pause,
         #next,
@@ -241,8 +240,8 @@
         justify-content: flex-end;
         flex-direction: column;
         align-items: center;
-        gap: 20px;
-        margin-bottom: -20px;
+        gap: 30px;
+        margin-bottom: -30px;
         .likeBox,
         #volume,
         #gui-fullscreen,

+ 17 - 6
src/pages/A2main/index.tsx

@@ -14,7 +14,7 @@ const imgArrTemp = ['like.png', 'likeAc.png']
 const imgArr = imgArrTemp.map(item => require(`@/assets/img/${item}`))
 
 function A2main() {
-  const sceneCode = 'mm-1562'
+  const SCENE_CODE = 'SG-zeRFYMaTE9F'
   // 漫游的状态
   const { state3d } = useSelector((state: RootState) => state.three)
 
@@ -24,10 +24,10 @@ function A2main() {
   const [viewNum, setViewNum] = useState(1)
 
   useEffect(() => {
-    http.get(`https://count.4dage.com/api/count/detail/${sceneCode}`).then(res => {
+    http.get(`https://count.4dage.com/api/count/detail/${SCENE_CODE}`).then(res => {
       setLikeNum(res.data.starSum!)
     })
-    http.get(`https://count.4dage.com/api/count/saveVisit/${sceneCode}`).then(res => {
+    http.get(`https://count.4dage.com/api/count/saveVisit/${SCENE_CODE}`).then(res => {
       setViewNum(res.data.visitSum!)
     })
   }, [])
@@ -37,7 +37,7 @@ function A2main() {
     if (like) return
     setLike(true)
     setTimeout(() => {
-      http.get(`https://count.4dage.com/api/count/saveStar/${sceneCode}`).then(res => {
+      http.get(`https://count.4dage.com/api/count/saveStar/${SCENE_CODE}`).then(res => {
         setLikeNum(likeNum + 1)
         setLike(false)
       })
@@ -70,6 +70,13 @@ function A2main() {
     }
   }
 
+  const hiddenMap = (isShow: boolean) => {
+    const cad: any = document.querySelector('.cad')
+    if (cad) {
+      cad.style.visibility = isShow ? 'hidden' : 'visible'
+    }
+  }
+
   return (
     <div className={styles.A2main} id='gui' style={{ display: 'none' }}>
       <A21vrOff />
@@ -167,6 +174,7 @@ function A2main() {
                   // 停止自动导览
                   window.player.director.stopTour()
                   setHotListShow(true)
+                  hiddenMap(true)
                 }}
               >
                 <img src='images/hotlist.png' alt='' />
@@ -190,7 +198,7 @@ function A2main() {
                   alt=''
                 />
                 {/* 鼠标移入 */}
-                <div className='hoveImg'>全景模型</div>
+                <div className='hoveImg'>迷你模型</div>
               </div>
               <div data-original-title='俯视图' id='gui-modes-floorplan' rel='tooltip'>
                 <img
@@ -308,7 +316,10 @@ function A2main() {
       <A3hotList
         show={hotListShow}
         setShow={setHotListShow}
-        closeFu={() => setHotListShow(false)}
+        closeFu={() => {
+          setHotListShow(false)
+          hiddenMap(false)
+        }}
       />
     </div>
   )

+ 11 - 9
src/pages/A3hotList/index.module.scss

@@ -19,11 +19,10 @@
       width: 250px;
       height: 100%;
       background: url('../../assets/img/hotlist_bg.png') center center;
-      background-size: 100% 100%;
+      background-size: cover;
       color: rgba(43, 31, 23, 0.9);
       font-size: 17px;
       font-weight: 500;
-      font-family: 'fzFont';
       overflow: auto;
       padding-bottom: 40px;
       // 隐藏滚动条
@@ -31,7 +30,7 @@
         display: none;
       }
       .A3title {
-        padding: 40px 0 30px 0;
+        padding: 40px 0 10px 0;
         font-size: 24px;
         font-weight: 400;
         color: rgba(43, 31, 23, 0.9);
@@ -45,7 +44,7 @@
         padding: 4px 3px;
         cursor: pointer;
         &:hover {
-          background-color: rgba(163, 124, 79, 1);
+          background-color: rgb(182, 154, 117);
         }
       }
       .A3close {
@@ -53,7 +52,7 @@
         bottom: 0;
         width: 250px;
         height: 40px;
-        background-color: rgba(148, 113, 76, 0.9);
+        background-color: rgba(157, 135, 106, 0.9);
         border-top: 1px solid rgba(43, 31, 23, 0.1);
         cursor: pointer;
         &:hover {
@@ -79,11 +78,14 @@
     height: 50%;
     transform: translate(0, -100%);
     :global {
+      html .cad {
+        z-index: -1;
+      }
       .A3main {
         width: 100%;
         height: 100%;
-        background: url('../../assets/img/hotlist_bg.png') center center;
-        background-size: 100% 100%;
+        background: url('../../assets/img/hotlist_bg.png') no-repeat center center;
+        background-size: cover;
         padding-bottom: 20px;
         .A3title {
           padding: 20px 0 10px 0;
@@ -93,13 +95,13 @@
           font-size: 14px;
           padding: 10px 3px;
           &:touch {
-            background-color: rgba(163, 124, 79, 1);
+            background-color: rgba(163, 143, 116, 1);
           }
         }
         .A3close {
           width: 100%;
           height: 40px;
-          background-color: rgba(148, 113, 76, 0.9);
+          background-color: rgba(157, 135, 106, 0.9);
           border-top: 1px solid rgba(43, 31, 23, 0.1);
           img {
             width: 16px;

BIN
src/pages/A4base/image/bg.png


BIN
src/pages/A4base/image/button.png


BIN
src/pages/A4base/image/logo.png


BIN
src/pages/A4base/image/other.png


BIN
src/pages/A4base/image/pic_1.png


BIN
src/pages/A4base/image/pic_2.png


BIN
src/pages/A4base/image/title.png


BIN
src/pages/A4base/image/title_2.png


BIN
src/pages/A4base/image/title_3.png


+ 1 - 19
src/pages/A4base/index.tsx

@@ -5,34 +5,16 @@ function A4base({ show, setShow }: { show: boolean; setShow: (show: boolean) =>
   const history = useHistory()
   return (
     <div className={styles.A4base} style={{ display: show ? 'block' : 'none' }}>
-      <div className={'A4base-title3'}>
-        <img src={require('./image/title_3.png')} alt='' />
-      </div>
-      <div className='A4base-logo'>
-        <img src={require('./image/logo.png')} alt='' />
-      </div>
       <div className='A4base-content'>
         <div className='A4base-title1'>
           <img src={require('./image/title.png')} alt='' />
         </div>
-        <div className='A4base-title2'>
-          <img src={require('./image/title_2.png')} alt='' />
-        </div>
-        <div className='A4base-other'>
-          <img src={require('./image/other.png')} alt='' />
-        </div>
-      </div>
-      <div className='A4base-pic1'>
-        <img src={require('./image/pic_1.png')} alt='' />
-      </div>
-      <div className='A4base-pic2'>
-        <img src={require('./image/pic_2.png')} alt='' />
       </div>
       <div
         className='A4base-button'
         onClick={() => {
           setShow(false)
-          history.push('/home?m=mm-1562')
+          history.push('/home?m=SG-zeRFYMaTE9F')
           window.location.reload()
         }}
       >

BIN
src/pages/A5Mobile/image/bg.png


BIN
src/pages/A5Mobile/image/button.png


BIN
src/pages/A5Mobile/image/logo.png


BIN
src/pages/A5Mobile/image/other.png


BIN
src/pages/A5Mobile/image/pic_1.png


BIN
src/pages/A5Mobile/image/pic_2.png


BIN
src/pages/A5Mobile/image/pic_3.png


BIN
src/pages/A5Mobile/image/title.png


BIN
src/pages/A5Mobile/image/title_2.png


+ 6 - 29
src/pages/A5Mobile/index.module.scss

@@ -7,7 +7,8 @@
   width: 100%;
   height: 100%;
   transition: all 0.5s;
-  background: url('./image/bg.png') repeat center center;
+  background: url('./image/bg.png') no-repeat center center;
+  background-size: 100% 100%;
   > div {
     position: absolute;
     top: 50%;
@@ -20,37 +21,13 @@
   }
   :global {
     .title {
-      transform: translate(-100px, -340px);
-      width: 155px;
-    }
-    .title2 {
-      transform: translate(-145px, -340px);
-      width: 12px;
-    }
-    .pic1 {
-      transform: translate(70px, -228px);
-      width: 100px;
-    }
-    .pic2 {
-      transform: translate(-150px, -10px);
-      width: 65px;
-    }
-    .pic3 {
-      transform: translate(-50%, 48%);
-      width: 100%;
-    }
-    .other {
-      transform: translate(45px, -30px);
-      width: 100px;
-    }
-    .logo {
-      transform: translate(130px, -320px);
-      width: 37px;
+      transform: translate(-50%, -61%);
+      width: 200px;
     }
     .button {
       cursor: pointer;
-      transform: translate(-50%, 260px);
-      width: 100px;
+      transform: translate(-50%, 229px);
+      width: 110px;
     }
   }
 }

+ 1 - 19
src/pages/A5Mobile/index.tsx

@@ -8,29 +8,11 @@ function A5Mobile({ show, setShow }: { show: boolean; setShow: (show: boolean) =
       <div className='title'>
         <img src={require('./image/title.png')} alt='' />
       </div>
-      <div className='title2'>
-        <img src={require('./image/title_2.png')} alt='' />
-      </div>
-      <div className='pic1'>
-        <img src={require('./image/pic_1.png')} alt='' />
-      </div>
-      <div className='pic2'>
-        <img src={require('./image/pic_2.png')} alt='' />
-      </div>
-      <div className='pic3'>
-        <img src={require('./image/pic_3.png')} alt='' />
-      </div>
-      <div className='other'>
-        <img src={require('./image/other.png')} alt='' />
-      </div>
-      <div className='logo'>
-        <img src={require('./image/logo.png')} alt='' />
-      </div>
       <div
         className='button'
         onClick={() => {
           setShow(false)
-          history.push('/home?m=mm-1562')
+          history.push('/home?m=SG-zeRFYMaTE9F')
           window.location.reload()
         }}
       >