chenlei 10 months ago
parent
commit
3273324c62

BIN
scene/src/assets/image/icon_down.png


+ 5 - 3
scene/src/views/gui/components/guide.vue

@@ -25,7 +25,7 @@
         <div class="swiper-slide" :class="{ active: index == guidePlayIndex }" v-for="(i, index) in tourList">
           <img :src="i.heroLocations[0].thumbUrl" alt="" />
           <div class="sl-item" :data-v="JSON.stringify({ data: i.heroLocations[0], index })">
-            <span>{{ i.heroLocations[0].name }}</span>
+            <span>{{ i.name }}</span>
           </div>
         </div>
       </ul>
@@ -98,7 +98,9 @@ export default {
         on: {
           init: () => {
             // console.error("init");
-            settings.playTourNearBy ? player.director.playTourNearBy() : player.director.playTour();
+            if (this.guideIsPlay) {
+              settings.playTourNearBy ? player.director.playTourNearBy() : player.director.playTour();
+            }
           },
           slideChangeTransitionEnd: function () {
             // that.mbactive = this.realIndex;
@@ -179,7 +181,7 @@ export default {
     width: 178px;
     height: 43px;
     font-size: 20px;
-    color: #F0D99C;
+    color: #C7A770;
     transform: translateX(-50%);
     cursor: pointer;
 

+ 18 - 13
scene/src/views/gui/menu.vue

@@ -209,7 +209,7 @@
             >
               <img class="normal" :src="i.normalIcon" alt="" />
               <img class="active" :src="i.activeIcon" alt="" />
-              <div class="tip-box">{{ i.name }}</div>
+              <!-- <div class="tip-box">{{ i.name }}</div> -->
             </div>
           </div>
         </transition>
@@ -369,12 +369,12 @@ export default {
           activeName: "关闭展览路线",
           type: "route",
         },
-        {
+        /** {
           normalIcon: require("@/assets/image/icon/new-icon/icon_screen.svg"),
           activeIcon: require("@/assets/image/icon/new-icon/icon_screen_active.svg"),
           name: "全屏",
           type: "fullScreen",
-        },
+        }, */
         {
           normalIcon: require("@/assets/image/icon/new-icon/icon_mod.svg"),
           activeIcon: require("@/assets/image/icon/new-icon/icon_mod_active.svg"),
@@ -418,6 +418,10 @@ export default {
           handler: () => {
             if (!this.openType) {
               this.openType = 'immersive'
+              this.setData({ showGuide: true, guideIsPlay: false, isCollapse: true });
+              if (!this.tourList.length) {
+                this.tourList = window.player ? player?.model?.heroLocations : [];
+              }
             } else this.exitImmersive()
           }
         },
@@ -473,9 +477,6 @@ export default {
         } else {
           // 导览结束
           player.director.tourInProgress && (player.director.stopTour(), player.director.endTourProgress());
-          if (this.isCollapse) {
-            this.setData({ showGuide: false, isCollapse: false });
-          }
         }
       },
     },
@@ -594,9 +595,17 @@ export default {
         item.handler()
         return
       }
-      if (!["route", "fullScreen", "controls"].includes(type)) {
+      if (!["route", "fullScreen", "controls", "guide"].includes(type)) {
         if (this.openType != type) {
           this.openType = type;
+
+          if (type === 'immersive') {
+            this.setData({ showGuide: true, isCollapse: true });
+            if (!this.tourList.length) {
+              this.tourList = window.player ? player?.model?.heroLocations : [];
+            }
+            return
+          }
         } else {
           this.openType = null;
         }
@@ -606,11 +615,7 @@ export default {
       // }
       switch (item.type) {
         case "guide":
-          if (this.guideIsPlay) {
-            this.setData({ guideIsPlay: false });
-            return;
-          }
-          this.setData({ showGuide: true, guideIsPlay: true });
+          this.setData({ showGuide: true, guideIsPlay: !this.guideIsPlay });
           if (!this.tourList.length) {
             this.tourList = window.player ? player?.model?.heroLocations : [];
           }
@@ -1236,7 +1241,7 @@ export default {
     right: auto;
     left: 10px;
     bottom: auto;
-    top: @mobileIconSize*6.7;
+    top: calc(@mobileIconSize*3 + 0.6667rem);
     .button-item {
       width: @mobileIconSize;
       height: @mobileIconSize;