tremble il y a 2 ans
Parent
commit
f4a64e7461

Fichier diff supprimé car celui-ci est trop grand
+ 1 - 0
public/images/close.svg


+ 1 - 1
public/package/js/label.js

@@ -14,7 +14,7 @@ class Label2D extends THREE.EventDispatcher {
         ${o.labeltype ? `<div class="picdetail">
         <div class="header">
           <span>${o.title}</span>
-          <img src="images/video.png" alt="">
+          <img data-type="close" src="images/close.svg" alt="">
         </div>
         <div class="pinfo">
           <img src="images/image_${o.imgsrc}.jpg" alt="">

+ 17 - 10
src/App.vue

@@ -5,20 +5,27 @@
 
 <script>
 import Home_pc from "@/views/Home_pc.vue";
-// import Home_pc from "@/views/Home.vue";
 
 export default {
   components: { Home_pc },
-  watch: {
-    g_isLandscape: {
-      immediate: true,
-      handler: function(newVal) {
-        if (this.isMobile) {
-        !newVal ? this.$showOrientationtip({ isLandscape: false }) : this.$hideOrientationtip();
-        }
-      },
-    },
+  mounted() {
+    if (this.isMobile) {
+      this.$showOrientationtip()
+    }
+    else{
+      this.$hideOrientationtip()
+    }
   },
+  // watch: {
+  //   g_isLandscape: {
+  //     immediate: true,
+  //     handler: function(newVal) {
+  //       if (this.isMobile) {
+  //       !newVal ? this.$showOrientationtip({ isLandscape: false }) : this.$hideOrientationtip();
+  //       }
+  //     },
+  //   },
+  // },
 
 };
 </script>

Fichier diff supprimé car celui-ci est trop grand
+ 10 - 0
src/assets/images/diwen.svg


+ 15 - 0
src/assets/images/frame.svg

@@ -0,0 +1,15 @@
+<svg width="424" height="152" viewBox="0 0 424 152" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g id="frame">
+<path id="Rectangle 47" d="M413 8V144H57.5612M11 144V8H363.16" stroke="#D6C8AD" stroke-width="0.504644"/>
+<circle id="Ellipse 34" cx="24.4103" cy="143.875" r="0.756966" fill="#D6C8AD"/>
+<circle id="Ellipse 35" cx="32.9891" cy="143.875" r="0.756966" fill="#D6C8AD"/>
+<circle id="Ellipse 36" cx="41.568" cy="143.875" r="0.756966" fill="#D6C8AD"/>
+<g id="Group 18">
+<circle id="Ellipse 37" cx="379.927" cy="8.12537" r="0.756966" fill="#D6C8AD"/>
+<circle id="Ellipse 38" cx="388.506" cy="8.12537" r="0.756966" fill="#D6C8AD"/>
+<circle id="Ellipse 39" cx="397.085" cy="8.12537" r="0.756966" fill="#D6C8AD"/>
+</g>
+<rect id="Rectangle 45" width="424" height="3" fill="#D1C09D"/>
+<rect id="Rectangle 46" y="149" width="424" height="3" fill="#D1C09D"/>
+</g>
+</svg>

+ 4 - 0
src/components/menu.vue

@@ -41,6 +41,10 @@ export default {
       if (this.currentid == item.id) {
         return 
       }
+      if (item.id == 'history' || item.id == 'collection') {
+        this.$emit("notFinish");
+        return
+      }
       this.$emit("clickItem", item);
       this.currentid = item.id;
     },

+ 6 - 7
src/components/verticaltip/index.vue

@@ -1,8 +1,7 @@
 <template>
   <div class="orientation-tip" >
     <div>
-      <img :src="require('@/assets/images/fanzhuan.png')" alt="">
-      <p>请将手机旋转为横屏观看</p>
+      <p>请前往电脑端浏览</p>
     </div>
   </div>
 </template>
@@ -35,8 +34,8 @@ export default {
   position: fixed;
   top: 0;
   left: 0;
-  backdrop-filter: blur(5px);
-  background-color: #70474D;
+  backdrop-filter: blur(20px);
+  background-color: rgba(112, 71, 77,0.1);
   background-repeat: no-repeat;
   background-size: cover;
   > div {
@@ -50,9 +49,9 @@ export default {
       width: 100%;
     }
     >p{
-      font-size: 16px;
-      color: #ac5b5b;
-      margin-top: 20px;
+      font-size: 22px;
+      color: #fff;
+      font-family: kaiti;
     }
   }
 }

+ 126 - 53
src/views/Home_pc.vue

@@ -3,13 +3,20 @@
     <img class="logo" :src="require(`@/assets/images/logo.png`)" alt="" />
     <Loading :barWidth="loadprogress" v-if="!hadLoaded" />
     <transition appear name="dm">
-      <vmenu @clickItem="handleItem" />
+      <vmenu @clickItem="handleItem" @notFinish="handleNotFinish" />
     </transition>
 
     <transition appear name="dm">
       <vintroduce v-if="currentItem == 'info'" />
     </transition>
 
+    <transition appear name="dm">
+      <div class="qidaitips" v-if="isshowqidaitips">
+        <img :src="require('@/assets/images/diwen.svg')" alt="">
+        <span>敬请期待</span>
+      </div>
+    </transition>
+
 
     <div class="infobg">
       <img :src="require('@/assets/images/info_bg.png')" alt="">
@@ -38,37 +45,46 @@ import vintroduce from "@/components/introduce";
 
 const transitionTime = 2000
 
-let labelClick = (e) => {
+let labelClick = (e, event) => {
+  
   if (e.centerCamePosi) {
+    if (event.target.dataset.type == 'close') {
+      e.elem.siblings().removeClass('hideAllSon')
+      e.elem.removeClass('detailShow')
+      window.showWenli = false
+      return
+    }
 
-    console.log(e);
+    if (window.limitDistMax) {
+      return
+    }
     let { x, y, z } = e.centerCamePosi
-    window.transitions.start(
-      window.lerp.vector(window.viewer.camera.position,
-        new window.THREE.Vector3(x, y, z)),
-      transitionTime,
-      () => {
-        e.elem[0].style.display == 'block' && e.elem.addClass('detailShow')
+    
+    let fn = ()=>{
+      e.elem[0].style.display == 'block' && e.elem.addClass('detailShow')
         e.elem.siblings().removeClass('detailShow')
-        e.elem.siblings().css({
-          "opacity": 0,
-          "pointer-events": "none"
-        })
-        console.log(e.elem.siblings());
+        e.elem.siblings().addClass('hideAllSon')
+
         let wlmesh = window.viewer.model.getObjectByName("WL48_ping")
         wlmesh.material.emissiveMap = e.emissiveTexture;
         wlmesh.material.dispose();
         window.showWenli = true
+    }
+
+    if (window.viewer.camera.position.x==x
+    &&window.viewer.camera.position.y==y
+    &&window.viewer.camera.position.z==z) {
+      fn()
+      return
+    }
 
-        // window.viewer.labels.forEach(item => {
 
-        //     if (centerLabel.title == item.title) {
-        //       this.centerLabel = centerLabel
-        //     }
-        //     else {
-        //       item.elem.removeClass('detailShow')
-        //     }
-        //   })
+    window.transitions.start(
+      window.lerp.vector(window.viewer.camera.position,
+        new window.THREE.Vector3(x, y, z)),
+      transitionTime,
+      () => {
+        fn()
       },
       0/* Delay */,
       window.easing.easeInOutQuad,
@@ -182,11 +198,19 @@ export default {
       meshGroup: null,
       currentItem: 'info',
       centerLabel: null,
-      fgtimer: null
+      fgtimer: null,
+      isshowqidaitips: false
     };
   },
   methods: {
 
+    handleNotFinish(){
+      this.isshowqidaitips = true
+      setTimeout(() => {
+        this.isshowqidaitips = false
+      }, 3000);
+    },
+
     handleItem(data) {
       this.currentItem = data.id
       switch (data.id) {
@@ -315,9 +339,13 @@ export default {
   watch: {
     centerLabel(newVal) {
       if (newVal) {
-        newVal.elem[0].style.display == 'block' && newVal.elem.addClass('detailShow')
+        if (newVal.elem[0].style.display == 'block') {
+          newVal.elem.addClass('detailShow')
+          newVal.elem.removeClass('hideAllSon')
+        }
         let wlmesh = window.viewer.model.getObjectByName("WL48_ping")
         wlmesh.material.emissiveMap = this.centerLabel.emissiveTexture;
+        window.showWenli = true
         wlmesh.material.dispose();
       }
     },
@@ -355,21 +383,38 @@ export default {
     })
 
     window.viewer.addEventListener("delayUpdate", (e) => {
-      // setTimeout(() => {
-      // if (this.currentItem == 'pic') {
-      //   let centerLabel = window.viewer.getCLabel()
-      //   if (centerLabel) {
-      //     window.viewer.labels.forEach(item => {
-      //       if (centerLabel.title == item.title) {
-      //         this.centerLabel = centerLabel
-      //       }
-      //       else {
-      //         item.elem.removeClass('detailShow')
-      //       }
-      //     })
-      //   }
-      // }
-      // });
+      let dist = window.viewer.control.object.position.distanceTo(window.viewer.control.target)
+      if (dist < 0.35) {
+        setTimeout(() => {
+          if (this.currentItem == 'pic') {
+            //limitDistMax判断是否在放大的界定范围内
+            window.limitDistMax = true
+            let centerLabel = window.viewer.getCLabel()
+            if (centerLabel) {
+              window.viewer.labels.forEach(item => {
+                if (centerLabel.title == item.title) {
+                  this.centerLabel = centerLabel
+
+                }
+                else {
+                  item.elem.removeClass('detailShow')
+                }
+              })
+            }
+          }
+        });
+      } else {
+        if (this.currentItem == 'pic' && window.limitDistMax) {
+          window.limitDistMax = false
+          window.showWenli = false
+          this.centerLabel = null
+          window.viewer.labels.forEach(item => {
+            item.elem.removeClass('hideAllSon')
+            item.elem.removeClass('detailShow')
+          })
+        }
+    
+      }
     })
 
   },
@@ -396,6 +441,32 @@ export default {
     z-index: 9999;
   }
 
+  .qidaitips{
+    position: absolute;
+    top: 50%;
+    left: 50%;
+    transform: translate(-50%,-50%);
+    background-image: url('~@/assets/images/frame.svg');
+    backdrop-filter: blur(30px);
+    background-color: rgba(255, 255, 255, 0.4);
+    z-index: 99;
+    width: 424px;
+    height: 150px;
+    >span{
+      position: absolute;
+      top: 50%;
+      left: 50%;
+      transform: translate(-50%,-50%);
+      text-align: center;
+      font-size: 30px;
+      font-size: 40px;
+      color: #70474D;
+      font-family: kaiti;
+      letter-spacing: 10px;
+      width: 100%;
+    }
+  }
+
   .infobg {
     position: absolute;
     bottom: 0;
@@ -446,7 +517,7 @@ export default {
 
 .dm-enter-active,
 .dm-leave-active {
-  transition: all 2.8s ease;
+  transition: all 1.8s ease;
 }
 </style>
 
@@ -732,6 +803,16 @@ export default {
         }
       }
     }
+
+    &.hideAllSon {
+
+      *,
+      &::before,
+      &::after {
+        opacity: 0;
+        pointer-events: none;
+      }
+    }
   }
 
 
@@ -769,6 +850,11 @@ export default {
     display: flex;
     justify-content: space-between;
     align-items: center;
+
+    >img {
+      width: 14px;
+
+    }
   }
 
   .pinfo {
@@ -790,19 +876,6 @@ export default {
 }
 
 
-
-@-webkit-keyframes room-label {
-  0% {
-    opacity: 0;
-    margin-top: 8.75px;
-  }
-
-  to {
-    opacity: 1;
-    margin-top: 0;
-  }
-}
-
 @keyframes room-label {
   0% {
     opacity: 0;