chenlei пре 10 месеци
родитељ
комит
a685457862

+ 2 - 1
hot/package.json

@@ -8,11 +8,12 @@
     "lint": "vue-cli-service lint"
   },
   "dependencies": {
-    "lib-flexible": "^0.3.2",
     "axios": "^0.20.0",
     "core-js": "^3.6.5",
+    "lib-flexible": "^0.3.2",
     "swiper": "^5.4.5",
     "v-viewer": "^1.5.1",
+    "viewerjs": "^1.11.7",
     "vue": "^2.6.11",
     "vue-awesome-swiper": "^4.1.1",
     "vue-lazyload": "^1.3.3",

Разлика између датотеке није приказан због своје велике величине
+ 11241 - 0
hot/pnpm-lock.yaml


BIN
scene/src/assets/image/hot-tab.png


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


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


BIN
scene/src/assets/image/icon_down@2x.png


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


+ 79 - 25
scene/src/views/gui/components/guide.vue

@@ -1,7 +1,14 @@
 <!--  -->
 <template>
   <div class="guide-list" :class="{ isMobile, collapse: isCollapse }" v-click-outside="handleClickOutside">
-    <div class="guide-controls">
+    <div class="guide-list-close"
+      :class="{unCollapse: isCollapse}"
+      @click="closeGuide()"
+      >
+      <p>讲解点位</p>
+    </div>
+    
+    <!-- <div class="guide-controls">
       <div class="item" @click="handleTour">
         <img v-if="guideIsPlay" class="normal" :src="require(`@/assets/image/icon/new-icon/icon_pause.svg`)" alt="" />
         <img v-else class="normal" :src="require(`@/assets/image/icon/new-icon/icon_resume.svg`)" alt="" />
@@ -11,7 +18,7 @@
         <img class="normal" :src="require('@/assets/image/icon/new-icon/icon_down.svg')" alt="" />
         <div class="tip-box">关闭</div>
       </div>
-    </div>
+    </div> -->
     <!-- <div class="swcon" v-swiper:mySwiper="swiperOption"  ref="floor1Swiper"> -->
     <div class="swcon" ref="mySwiper">
       <ul class="swiper-wrapper swiper-wrapper-n">
@@ -67,18 +74,14 @@ export default {
     handleTour() {
       if (this.isCollapse) {
         if (this.guideIsPlay) {
-          this.setData({ guideIsPlay: !this.guideIsPlay, showGuide: false, isCollapse: false });
+          this.setData({ guideIsPlay: !this.guideIsPlay, isCollapse: false });
         }
       } else {
         this.setData({ guideIsPlay: !this.guideIsPlay });
       }
     },
     closeGuide() {
-      if (this.guideIsPlay) {
-        this.setData({ isCollapse: !this.isCollapse });
-        return;
-      }
-      this.setData({ showGuide: false });
+      this.setData({ isCollapse: !this.isCollapse });
     },
 
     initSwiper() {
@@ -142,27 +145,62 @@ export default {
 </script>
 <style lang="less" scoped>
 //@import url(); 引入公共css类
-
+.swiper-container-initialized {
+  overflow: hidden;
+}
 .guide-list {
-  width: 100%;
-
-  // height: 153px;
-  background: rgba(55, 54, 53, 0.6);
   position: absolute;
-  bottom: 0;
-  left: 0%;
+  left: 25px;
+  right: 25px;
+  bottom: 13px;
+  height: 196px;
   z-index: 10001;
-  padding: 12px 20px 8px 4px;
+  border-radius: 5px;
+  padding: 55px 15px 12px;
   transition: all 0.3s;
+  background: url('../../../assets/image/hot-tab.png') no-repeat center / cover;
   &.collapse {
-    bottom: -150px;
+    bottom: -153px;
     .rotate-btn {
       img {
         transform: rotate(180deg);
       }
     }
   }
+  &-close {
+    position: absolute;
+    top: 0;
+    left: 50%;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    gap: 8px;
+    padding-top: 5px;
+    width: 178px;
+    height: 43px;
+    font-size: 20px;
+    color: #F0D99C;
+    transform: translateX(-50%);
+    cursor: pointer;
 
+    &.unCollapse {
+      &::after {
+        transform: rotate(180deg);
+      }
+    }
+    &::after {
+      content: '';
+      display: block;
+      width: 18px;
+      height: 18px;
+      background: url('../../../assets/image/icon_down.png') no-repeat center / contain;
+    }
+    p {
+      font-family: OpenSans;
+      font-weight: 400;
+      line-height: 1;
+    }
+  }
   .guide-controls {
     display: flex;
     align-items: center;
@@ -221,7 +259,6 @@ export default {
   }
   .progress-box {
     margin-top: 7px;
-    padding: 0 0 0 20px;
     display: flex;
     align-items: center;
     justify-content: flex-start;
@@ -272,9 +309,12 @@ export default {
       cursor: pointer;
       overflow: hidden;
       position: relative;
-      margin-left: 16px;
+      margin-left: 15px;
       pointer-events: auto;
       border-radius: 8px;
+      &:first-child {
+        margin-left: 0;
+      }
       &.active {
         border: 2px solid rgba(199, 167, 112, 1);
       }
@@ -303,13 +343,13 @@ export default {
   }
   &.isMobile {
     // height: 2.6667rem;
-    padding: 0.2667rem;
-    bottom: 0;
+    padding: 34px 0.2667rem 0;
     left: 0;
-    margin-left: 0;
-    width: 100%;
+    right: 0;
+    bottom: 0;
+    height: 116px;
     &.collapse {
-      bottom: -3.2rem;
+      bottom: -93px;
       .rotate-btn {
         img {
           transform: rotate(180deg);
@@ -319,6 +359,16 @@ export default {
         bottom: 4rem;
       }
     }
+    .guide-list-close {
+      padding-top: 6px;
+      font-size: 12px;
+      height: 23px;
+
+      &::after {
+        width: 10px;
+        height: 10px;
+      }
+    }
     .guide-controls {
       left: 0.2667rem;
       bottom: 3.6rem;
@@ -348,6 +398,7 @@ export default {
       }
     }
     .progress-box {
+      display: none;
       padding: 0 0.2667rem;
       .bar-box {
         height: 0.08rem;
@@ -377,9 +428,12 @@ export default {
     .swiper-wrapper {
       .swiper-slide {
         width: 2.68rem;
-        height: 1.8933rem;
+        height: 75px;
         width: 31%;
         margin-left: 0.2667rem;
+        &:first-child {
+          margin: 0;
+        }
         .sl-item {
           font-size: 0.32rem;
         }

+ 39 - 39
scene/src/views/gui/components/hotList.vue

@@ -7,8 +7,6 @@
       <!-- <div class="titleRR" @click="$emit('close')">
         <img src="../../../assets/img/close.png" alt="" />
       </div> -->
-      <div class="pic-one"></div>
-      <div class="pic-two"></div>
       <div class="search-box">
         <input @input="handlerSearch" v-model="searchKey" type="text" placeholder="请输入关键词..." />
         <div class="search-icon"></div>
@@ -86,25 +84,32 @@ export default {
   right: 0;
   width: 434px;
   height: 100vh;
-  background: url(../../../assets/image/list-bg.png) no-repeat;
-  background-size: 100% 100%;
+  background: linear-gradient( 131deg, #17140F 0%, #352A1B 100%);
   z-index: 100;
+  &::after {
+    content: '';
+    position: absolute;
+    top: -12px;
+    right: -9px;
+    width: 459px;
+    height: 100vh;
+    border: 1px solid #D6BC8E;
+  }
   .close-btn {
-    width: 36px;
-    height: 36px;
-    top: 50%;
-    left: 0;
-    transform: translateY(-50%);
-    background: url(../../../assets/image/icon/new-icon/icon_right.png) no-repeat;
-    background-size: 100% 100%;
     position: absolute;
-    z-index: 100;
+    top: 38px;
+    right: 30px;
+    width: 54px;
+    height: 54px;
     cursor: pointer;
+    background: url('../../../assets/image/icon_close.png') no-repeat center / contain;
+    z-index: 2;
   }
   .title {
-    height: 318px;
+    height: 160px;
     width: 100%;
     position: relative;
+    z-index: 1;
     .pic-one {
       width: 331px;
       height: 220px;
@@ -127,11 +132,12 @@ export default {
   .search-box {
     position: absolute;
     bottom: 0;
-    right: 60px;
-    width: 244px;
+    right: 45px;
+    width: 343px;
     border-bottom: 1px solid #bbab92;
     display: flex;
     align-items: center;
+    font-size: 16px;
     .search-icon {
       width: 21px;
       height: 21px;
@@ -154,12 +160,14 @@ export default {
   .main {
     // margin-top: 20px;
     width: 100%;
-    padding: 10px 60px 0 78px;
-    height: calc(100% - 318px);
+    margin-bottom: 20px;
+    padding: 10px 45px 0;
+    height: calc(100% - 200px);
     overflow-y: auto;
     position: absolute;
     bottom: 0;
     right: 0;
+    z-index: 1;
     .txtNone {
       height: 100%;
       color: rgba(255, 224, 168, 1);
@@ -213,31 +221,22 @@ export default {
     top: auto;
     // width: 434px;
     // height: 100vh;
+    border-top-left-radius: 20px;
+    border-top-right-radius: 20px;
+    z-index: 100;
+    &::after {
+      display: none;
+    }
     .close-btn {
-      width: 100%;
-      height: 30px;
-      background: none;
-      left: auto;
-      right: 0;
-      top: 0;
-      transform: translate(0, 0);
-      position: relative;
-      &::after {
-        content: "";
-        width: 0.28rem;
-        height: 0.1733rem;
-        background: url(../../../assets/image/icon/new-icon/icon_down-2.png) no-repeat;
-        background-size: 100%;
-        position: absolute;
-        right: 5px;
-        top: 50%;
-        transform: translateY(-50%);
-      }
+      top: 28px;
+      right: 32px;
+      width: 10px;
+      height: 7px;
+      background-image: url('../../../assets/image/icon_down@2x.png');
     }
-    z-index: 100;
     .title {
       // height: 236px;
-      height: 30px;
+      height: 80px;
       width: 100%;
       .pic-one {
         width: 202px;
@@ -276,7 +275,7 @@ export default {
     .main {
       margin-top: 10px;
       // padding: 10px 15px 0 33px;
-      height: calc(100% - 40px);
+      height: calc(100% - 90px);
       padding: 0;
       position: relative;
       .txtNone {
@@ -286,6 +285,7 @@ export default {
         font-size: 14px;
         text-align: left;
         width: 100%;
+        color: rgba(255, 255, 255, 0.5);
         & > span {
           font-size: 14px;
           &:hover {

+ 57 - 25
scene/src/views/gui/menu.vue

@@ -178,24 +178,28 @@
 
       <!-- 沉浸模式-工具栏 -->
       <transition name="fade" enter-active-class="animate__animated animate__fadeInUp animate__faster" leave-active-class="animate__animated animate__fadeOutDown animate__faster">
-        <div v-show="openType === 'immersive'" class="left-btn">
-          <div class="button-item" :class="getActive(i.type)" v-for="(i, index) in immersiveButtons" @click.stop="hanlderButtons(i, i.type)">
+        <div v-show="kanzhanBtnVisible" class="left-btn" :class="{['show-guide']: showGuide && !isCollapse}">
+          <div class="button-item"
+            :class="getActive(i.type)"
+            v-for="(i, index) in immersiveButtons"
+            @click="exitImmersive"
+            >
             <img class="normal" :src="i.normalIcon" alt="" />
             <img class="active" :src="i.activeIcon" alt="" />
             <div class="tip-box">{{ i.name }}</div>
           </div>
         </div>
       </transition>
-      <!-- 沉浸式看展按钮 -->
 
-      <div class="kanzhan-btns">
+      <!-- 沉浸式看展按钮 -->
+      <div class="kanzhan-btns" :class="{['show-guide']: showGuide && !isCollapse}">
         <transition name="preScene">
-          <div v-show="openType == 'immersive'" @click="goScene('prev')" class="button-item">
+          <div v-show="kanzhanBtnVisible" @click="goScene('prev')" class="button-item">
             <img class="normal" :src="require('@/assets/image/icon/new-icon/icon_pre.svg')" alt="" />
           </div>
         </transition>
         <transition name="activeScene">
-          <div v-if="openType == 'immersive'" class="">
+          <div v-if="kanzhanBtnVisible" class="">
             <div
               v-for="(i, index) in playButtons"
               :key="index"
@@ -210,7 +214,7 @@
           </div>
         </transition>
         <transition name="nextScene">
-          <div v-show="openType == 'immersive'" class="button-item" @click="goScene('next')">
+          <div v-show="kanzhanBtnVisible" class="button-item" @click="goScene('next')">
             <img class="normal" :src="require('@/assets/image/icon/new-icon/icon_next.svg')" alt="" />
           </div>
         </transition>
@@ -218,7 +222,7 @@
     </template>
 
     <template v-else>
-      <div class="mobile-top-button" v-if="!showGuide">
+      <div class="mobile-top-button">
         <div
           class="button-item"
           :class="getActive(i.type)"
@@ -230,14 +234,14 @@
           <img class="active" :src="i.activeIcon" alt="" />
         </div>
       </div>
-      <div class="mobile-bottom-button" :class="{ center: openType == 'immersive' }" v-if="!showGuide">
+      <div class="mobile-bottom-button" :class="{ center: openType == 'immersive', ['show-guide']: showGuide && !isCollapse }">
         <div
           class="button-item"
-          :class="getBottomActive(i.type)"
+          :class="`${getBottomActive(i.type)} ${i.action === 'play' && guideIsPlay && 'active'}`"
           :style="`display:${i.type == 'hots' && openType == 'immersive' ? 'none' : 'block'};`"
           @click.stop="hanlderButtons(i, i.type)"
           v-for="(i, index) in mobileBottomBtns"
-          v-if="(i.type == 'controls' && openType == 'immersive') || i.type == 'hots' || (openType != 'immersive' && i.type != 'controls')"
+          v-if="kanzhanBtnVisible ? i.type == 'controls' : i.type !== 'controls'"
           v-show="i.type == 'model' || i.type == 'music' || mode == 'panorama'"
         >
           <img class="normal" :src="i.normalIcon" alt="" />
@@ -247,7 +251,9 @@
     </template>
     <!-- 音乐按钮 -->
     <transition name="fade" enter-active-class="animate__animated animate__fadeInUp animate__faster" leave-active-class="animate__animated animate__fadeOutDown animate__faster">
-      <div v-show="!showGuide && !guideIsPlay" class="right-btn" :class="{ mobile: isMobile }">
+      <div class="right-btn"
+        :class="{ mobile: isMobile, ['show-guide']: showGuide && !isCollapse}"
+      >
         <div id="bgm" class="button-item" :class="getActive(i.type)" v-for="(i, index) in rightButtons">
           <img class="normal" id="openMusic" :src="i.normalIcon" alt="" @click="switchBGM(false)" />
           <img class="active" id="closeMusic" :src="i.activeIcon" alt="" @click="switchBGM(true)" />
@@ -299,8 +305,8 @@ export default {
       isFullscreen: false,
       playButtons: [
         {
-          normalIcon: require("@/assets/image/icon/new-icon/icon_play.svg"),
-          activeIcon: require("@/assets/image/icon/new-icon/icon_play.svg"),
+          normalIcon: require("@/assets/image/icon_play.png"),
+          activeIcon: require("@/assets/image/icon_play.png"),
           name: "自动导览",
           action: "play",
           type: "guide",
@@ -409,6 +415,11 @@ export default {
           activeIcon: require("@/assets/image/icon/new-icon/icon_mod_active.svg"),
           name: "沉浸看展",
           type: "immersive",
+          handler: () => {
+            if (!this.openType) {
+              this.openType = 'immersive'
+            } else this.exitImmersive()
+          }
         },
       ],
       mobileBottomBtns: [
@@ -437,8 +448,8 @@ export default {
           type: "controls",
         },
         {
-          normalIcon: require("@/assets/image/icon/new-icon/icon_play.svg"),
-          activeIcon: require("@/assets/image/icon/new-icon/icon_play.svg"),
+          normalIcon: require("@/assets/image/icon_play.png"),
+          activeIcon: require("@/assets/image/icon/new-icon/icon_pause_n.svg"),
           name: "自动导览",
           action: "play",
           type: "controls",
@@ -493,6 +504,7 @@ export default {
       isCollapse: "isCollapse",
       guidePlayIndex: "guidePlayIndex",
     }),
+    kanzhanBtnVisible: (v) => v.openType === 'immersive' || v.showGuide
   },
   mounted() {
     let events = ["fullscreenchange", "webkitfullscreenchange", "mozfullscreenchange", "MSFullscreenChange"];
@@ -567,13 +579,21 @@ export default {
       }
     },
     goScene(type) {
-      player.guider2.go(type);
+      window.tourPlayCtl.go(type === 'prev' ? -1 : 1)
     },
     toggleMiniMap() {
       this.miniMapStatus = !this.miniMapStatus;
     },
 
+    exitImmersive() {
+      this.openType = null
+      this.setData({ showGuide: false, guideIsPlay: false });
+    },
     hanlderButtons(item, type) {
+      if (item.handler) {
+        item.handler()
+        return
+      }
       if (!["route", "fullScreen", "controls"].includes(type)) {
         if (this.openType != type) {
           this.openType = type;
@@ -590,7 +610,7 @@ export default {
             this.setData({ guideIsPlay: false });
             return;
           }
-          this.setData({ showGuide: true });
+          this.setData({ showGuide: true, guideIsPlay: true });
           if (!this.tourList.length) {
             this.tourList = window.player ? player?.model?.heroLocations : [];
           }
@@ -626,7 +646,10 @@ export default {
           break;
         case "controls":
           if (item.name == '自动导览') {
-            this.hanlderButtons(this.playButtons[0], this.playButtons[0].type);
+            this.setData({ showGuide: true, guideIsPlay: !this.guideIsPlay });
+            if (!this.tourList.length) {
+              this.tourList = window.player ? player?.model?.heroLocations : [];
+            }
           } else if (item.name == "前进") {
             window.tourPlayCtl.go(1);
           } else {
@@ -663,7 +686,7 @@ export default {
             return "active";
           }
         case "immersive":
-          if (this.openType == "immersive") {
+          if (this.openType == "immersive" || this.kanzhanBtnVisible) {
             return "active";
           }
         case "fullScreen":
@@ -941,7 +964,7 @@ export default {
   height: 12px;
   background: rgba(55, 54, 53, 0.6);
   border-radius: 5px 5px 5px 5px;
-  display: flex;
+  display: none;
   align-items: center;
   justify-content: flex-start;
   padding: 0 20px;
@@ -1042,11 +1065,15 @@ export default {
   position: fixed;
   left: 50%;
   transform: translateX(-50%);
-  bottom: 20px;
+  bottom: 30px;
   display: flex;
   align-items: center;
   flex-direction: row;
   gap: 0.6667rem;
+  transition: bottom linear .2s;
+  &.show-guide {
+    bottom: 145px !important;
+  }
   &.center {
     justify-content: center;
   }
@@ -1143,6 +1170,7 @@ export default {
   position: absolute;
   right: 44px;
   bottom: 40px;
+  transition: bottom 0.3s;
   &.hide {
     display: none;
   }
@@ -1220,14 +1248,18 @@ export default {
     }
   }
 }
+.show-guide:not(.mobile) {
+  bottom: 192px;
+}
 .kanzhan-btns {
   display: flex;
   align-items: center;
   justify-content: flex-start;
   position: absolute;
-  left: 50%;
+  left: 23%;
   bottom: 40px;
-  transform: translateX(-50%);
+  transition: bottom linear 0.2s;
+
   .button-item {
     width: @iconW;
     height: @iconW;
@@ -1238,7 +1270,7 @@ export default {
     cursor: pointer;
     position: relative;
 
-    &:last-child {
+    &:last-child:not(.button-item2) {
       margin: 0;
     }
   }