Ver código fonte

增加第一次进入提示

shaogen1995 10 meses atrás
pai
commit
5e3f4d5847

+ 1 - 1
scene/public/index.html

@@ -66,7 +66,7 @@
     <script src="<%= VUE_APP_STATIC_DIR %>/js/main_2020_show.js" defer></script>
     <script src="<%= VUE_APP_STATIC_DIR %>/js/lib/OBJLoader.js"></script>
     <!-- <script src="<%= VUE_APP_STATIC_DIR %>/js/CAD/bundle.js"></script> -->
-    <script src="<%= VUE_APP_STATIC_DIR %>/js/loadCAD.js"></script>
+    <script src="<%= VUE_APP_STATIC_DIR %>/js/loadCAD.js" defer></script>
 
 </body>
 

+ 3 - 1
scene/public/static/js/loadCAD.js

@@ -134,9 +134,11 @@ window.grendCAD = (function grendCAD() {
       
       
       
-      if(_settings.angleShift2d){
+     setTimeout(()=>{
+      if(_settings&&_settings.angleShift2d){
         $layer.querySelector('svg').style.transform = 'rotate(-'+ _settings.angleShift2d +'deg)'//xzw 校准模型旋转
       }
+     },300)
       
       
     })

+ 15 - 15
scene/public/static/js/main_2020_show.js

@@ -3423,7 +3423,7 @@ window.Modernizr = function(n, e, t) {
                 }
             }
               
-            if(_settings.angleShift2d){
+            if(_settings&&_settings.angleShift2d){
                 i += THREE.Math.degToRad(_settings.angleShift2d)
             }
             this.rotateLeft(i);
@@ -6658,20 +6658,20 @@ window.Modernizr = function(n, e, t) {
                 }),
 
                 // 手动触发 导览列表点击
-                $("#myClickBox #go").on('click',function(){
-                    const imgActIndex = $(".thumbImg.active").data('index')
-                    const curIndex = typeof imgActIndex === 'number' ? imgActIndex : -1;
-                    const nextIndex = Number(curIndex) + 1;
-                    if (nextIndex >= Fe) return
-                    t.goToHighlight([nextIndex,0])
-                })
-                $("#myClickBox #back").on('click',function(){
-                    const imgActIndex = $(".thumbImg.active").data('index')
-                    const curIndex = typeof imgActIndex === 'number' ? imgActIndex : -1;
-                    const nextIndex = Number(curIndex) - 1;
-                    if (nextIndex < 0) return
-                    t.goToHighlight([nextIndex,0])
-                })
+                // $("#myClickBox #go").on('click',function(){
+                //     const imgActIndex = $(".thumbImg.active").data('index')
+                //     const curIndex = typeof imgActIndex === 'number' ? imgActIndex : -1;
+                //     const nextIndex = Number(curIndex) + 1;
+                //     if (nextIndex >= Fe) return
+                //     t.goToHighlight([nextIndex,0])
+                // })
+                // $("#myClickBox #back").on('click',function(){
+                //     const imgActIndex = $(".thumbImg.active").data('index')
+                //     const curIndex = typeof imgActIndex === 'number' ? imgActIndex : -1;
+                //     const nextIndex = Number(curIndex) - 1;
+                //     if (nextIndex < 0) return
+                //     t.goToHighlight([nextIndex,0])
+                // })
 
                 $(".previous").find("a").on("click", function(e) {
                     l(e),

BIN
scene/src/assets/img/111.jpg


BIN
scene/src/assets/img/222.jpg


+ 61 - 0
scene/src/pages/Home.vue

@@ -1,5 +1,14 @@
 <template>
   <div class="parent-body">
+
+
+    <!-- 操作提示 -->
+     <div class="fisitTitBox" v-if="isShowTit">
+      <img src="../assets/img/222.jpg" alt="" v-if="isMobile">
+      <img src="../assets/img/111.jpg" alt="" v-else>
+      <div class="fisitTitBoxTtx" @click="isShowTitFu">我知道了</div>
+     </div>
+
     <!-- 热点 -->
     <!-- <hot/> -->
     <!-- 热点弹出框 -->
@@ -126,10 +135,22 @@ export default {
       loading: true,
       /** 隐藏热点和右侧工具栏 */
       hideTools: false,
+
+
+      // 第一次进来有提示
+      isShowTit:true
     };
   },
 
   methods: {
+
+    // 第一次进来有提示
+    isShowTitFu(){
+      this.isShowTit=false
+      localStorage.setItem('YUE_YUN_TIT','1')
+    },
+
+
     hideWelcome() {
       this.showWelcome = false;
       window.manage.switchBgmState(true);
@@ -173,6 +194,12 @@ export default {
     });
   },
   async created() {
+
+    // 第一次进来有提示
+    if(localStorage.getItem('YUE_YUN_TIT')){
+      this.isShowTit=false
+    }
+
     // 雷锋故居场景需求,会携带 hideCover=1
     this.hideTools = Boolean(Number(this.$route.query.hideCover));
     this.showWelcome = !this.hideTools;
@@ -211,5 +238,39 @@ export default {
   top: 30px;
   left: 30px;
 }
+.fisitTitBox{
+  position: absolute;
+  top: 0;
+  left: 0;
+  z-index: 11000;
+  width: 100%;
+  height: 100%;
+  img{
+    width: 100%;
+    height: 100%;
+  }
+  .fisitTitBoxTtx{
+    cursor: pointer;
+    position: absolute;
+    bottom: 40px;
+    left: 50%;
+    transform: translate(-50%,-50%);
+    color: #bea567;
+    border-radius: 20px;
+    border: 2px solid #bea567;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    font-size: 22px;
+    padding: 10px 20px;
+  }
+    // // 移动端
+    @media screen and (max-width: 1000px) {
+    .fisitTitBoxTtx {
+      font-size: 16px;
+      bottom: 20px;
+    }
+  }
+}
 
 </style>

+ 2 - 2
scene/src/views/gui/menu.vue

@@ -4,10 +4,10 @@
       <div id="view-controllers"></div>
     </div>
     <div class="pinBottom left">
-      <div v-if="isMobile" id='myClickBox' style="">
+      <!-- <div v-if="isMobile" id='myClickBox' style="">
         <div id="go" />
         <div id="back" />
-      </div>
+      </div> -->
 
       <div>
         <div class="viewContainer">