Browse Source

本地化项目的热点列表按钮修改成动态显示

aamin 2 years ago
parent
commit
af92cc4db6

+ 5 - 4
H5场景/public/static/css/oldVer/main0.css

@@ -93,17 +93,18 @@ iframe {
 }
 
 #closepop {
-	background: url('../../images/phone_step_01.png') no-repeat;
-	width: 30px;
-	height: 30px;
+	background: url(../../images/phone_step_01.png) no-repeat;
+	width: 40px;
+	height: 40px;
 	cursor: pointer;
 	position: absolute;
 	right: 20px;
-	top: 10px;
+	top: 15px;
 	text-indent: -999em;
 	background-size: 100% 100%;
 }
 
+
 .specialTitle {
 	bottom: 65%;
 	width: 100%;

+ 1 - 0
H5场景本地化/public/static/js/Hot_new.js

@@ -1761,6 +1761,7 @@ window.initHot = function(model){
         var hots = hotGroup.children.filter(hot=>hot.info.actionType.openHot);
         hots = hots.sort((a,b)=>{return a.order - b.order});
         window.myHotList = hots
+        window.hotData=true
         // console.log('12399999999999999999', window.myHotList);
         hots.forEach((hot)=>{
             var li = document.createElement('li');

+ 1 - 1
H5场景本地化/src/views/gui/compomemt/hotspot.vue

@@ -59,7 +59,7 @@ export default {
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {
-    // console.log('-------------',window.myHotList );
+    console.log('-------------',window.myHotList );
     this.data = window.myHotList || [];
   },
   //生命周期 - 挂载完成(可以访问DOM元素)

+ 25 - 8
H5场景本地化/src/views/gui/menu.vue

@@ -14,7 +14,7 @@
 
     <!-- 展开按钮 -->
     <div class="myViewShowBox" @click="viewShow = true" :class="{ myViewShowBoxAc: !viewShow }">
-      <img  :style="{ width: screenWidth > 1000 ? parseInt(screenWidth / 48) + 'px' : '30px' }"
+      <img :style="{ width: screenWidth > 1000 ? parseInt(screenWidth / 48) + 'px' : '30px' }"
         :src="require(`@/assets/img/show.png`)" />
     </div>
 
@@ -101,9 +101,9 @@
                   <!-- 热点列表 -->
                   <div class="hotListBox" @click="meanInd = true"
                     :style="{ paddingRight: screenWidth > 1000 && screenWidth < 2000 ? '' : '', paddingLeft: screenWidth > 2000 ? '' : '' }">
-                    <div class="iconTxt" :style="{ bottom: screenWidth < 1000 ? '-14px' : '-18px' }">
+                    <div class="iconTxt" v-show="showHotList" :style="{ bottom: screenWidth < 1000 ? '-14px' : '-18px' }">
                       {{ screenWidth < 1000 ? '热点列表' : '〚热点列表〛' }}</div>
-                        <div class="hotListSon">
+                        <div class="hotListSon" v-show="showHotList">
                           <img class="imgLimit"
                             :style="{ width: screenWidth > 1000 ? parseInt(screenWidth / 32) + 'px' : '40px', height: screenWidth > 1000 ? parseInt(screenWidth / 32) + 'px' : '40px' }"
                             :src="require(`@/assets/images/icon/${meanInd ? 'hotAc' : 'hot'
@@ -219,7 +219,7 @@
 import Hotspot from "./compomemt/hotspot";
 import FloorSelect from "./compomemt/floorSelect";
 export default {
-  components: { Hotspot,FloorSelect },
+  components: { Hotspot, FloorSelect },
   data() {
     return {
       // 自动导览切换
@@ -233,7 +233,8 @@ export default {
       isMusic: false,
       screenWidth: null,
       dialogWidth: 0,
-      timer: false
+      timer: false,
+      showHotList: true
     };
   },
   watch: {
@@ -277,14 +278,31 @@ export default {
       })()
     }
     if (this.screenWidth > 1000) {
-      console.log('走')
       setTimeout(() => {
         this.timer = true
       }, 3000)
       setTimeout(() => {
         this.timer = false
       }, 5200)
+
+      let timeA = -1
+
+      timeA = window.setInterval(() => {
+        if (window.hotData) {
+          clearInterval(timeA)
+        }
+        if (window.hotData && window.myHotList && window.myHotList.length) {
+          // 显示列表
+          this.showHotList = true
+        } else {
+          this.showHotList = false
+        }
+      }, 500);
     }
+
+
+
+
   },
   methods: {
     goBack() {
@@ -321,9 +339,8 @@ export default {
 </script>
 
 <style lang="less" scoped>
-
 // 隐藏原本的楼层选择
-.gui-floor{
+.gui-floor {
   display: none !important;
 }