瀏覽代碼

热点图标颜色和位置优化

任一存 3 年之前
父節點
當前提交
cd67825626
共有 2 個文件被更改,包括 11 次插入7 次删除
  1. 二進制
      src/assets/hotspot.png
  2. 11 7
      src/views/HomeView.vue

二進制
src/assets/hotspot.png


+ 11 - 7
src/views/HomeView.vue

@@ -96,6 +96,7 @@
         @dragstart.prevent
       >
       <HotSpot
+        v-show="[3].includes(tourState)"
         class="hot-spot"
         @click="onClickPeopleNearHotSpot"
       />
@@ -471,9 +472,11 @@ export default {
       this.treasureFadeOutTween.stop()
       clearInterval(this.treasureFrameIntervalId)
       this.treasureFrameCurNum = 0
-      this.$refs.treasure.style.left = this.treasureFadeInInitialLeft + 'px'
-      this.$refs.treasure.style.top = this.treasureFadeInInitialTop + 'px'
-      this.$refs.treasure.style.transform = `translate(-50%, -50%) scale(1)`
+      if (this.$refs.treasure) {
+        this.$refs.treasure.style.left = this.treasureFadeInInitialLeft + 'px'
+        this.$refs.treasure.style.top = this.treasureFadeInInitialTop + 'px'
+        this.$refs.treasure.style.transform = `translate(-50%, -50%) scale(1)`
+      }
     },
     onTreasureFrameLoad(idx) {
       this.treasureFrameStateList[idx] = true
@@ -545,9 +548,9 @@ export default {
     }
     > .hot-spot {
       position: absolute;
-      left: 52%;
+      left: 55%;
       transform: translateX(-50%);
-      top: 17%;
+      top: 31%;
     }
   }
   > .people-near-wrap {
@@ -559,8 +562,9 @@ export default {
     }
     > .hot-spot {
       position: absolute;
-      left: 41%;
-      top: 17%;
+      left: 43.5%;
+      top: 29.5%;
+      z-index: 3;
     }
     > .treasure {
       position: absolute;