Bläddra i källkod

热点图标颜色和位置优化

任一存 3 år sedan
förälder
incheckning
cd67825626
2 ändrade filer med 11 tillägg och 7 borttagningar
  1. BIN
      src/assets/hotspot.png
  2. 11 7
      src/views/HomeView.vue

BIN
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;