Kaynağa Gözat

Merge branch 'master' of http://192.168.0.115:3000/chenzhiguang/shuangchuangzhou_2022

xzw 3 yıl önce
ebeveyn
işleme
98c230e568
35 değiştirilmiş dosya ile 292 ekleme ve 216 silme
  1. 1 1
      public/static/js/main_2020_show.js
  2. BIN
      public/zhanxiang/images/weiting/W-01.jpg
  3. BIN
      public/zhanxiang/images/weiting/W-02.jpg
  4. BIN
      public/zhanxiang/images/weiting/W-03.jpg
  5. BIN
      public/zhanxiang/images/weiting/W-04.jpg
  6. BIN
      public/zhanxiang/images/weiting/W-05.jpg
  7. BIN
      public/zhanxiang/images/weiting/W-06.jpg
  8. BIN
      public/zhanxiang/images/xuting/X-01.jpg
  9. BIN
      public/zhanxiang/images/xuting/X-02.jpg
  10. BIN
      public/zhanxiang/images/xuting/X-03.jpg
  11. BIN
      public/zhanxiang/images/xuting/X-04.jpg
  12. BIN
      public/zhanxiang/images/xuting/X-05.jpg
  13. BIN
      public/zhanxiang/images/xuting/X-06.jpg
  14. BIN
      public/zhanxiang/images/xuting/X-07.jpg
  15. BIN
      src/assets/images/mobile/bgdownload.png
  16. 8 11
      src/clients/mobile.vue
  17. 1 1
      src/components/bird_view/build.js
  18. 24 15
      src/components/bird_view/index.vue
  19. 9 6
      src/components/hotspot/image.vue
  20. 13 4
      src/components/hotspot/index.vue
  21. 22 5
      src/components/hotspot/video.vue
  22. 1 1
      src/data/booth.js
  23. 29 29
      src/data/raw.js
  24. 33 13
      src/pages/mobilescene/birdview/index.vue
  25. 5 2
      src/pages/mobilescene/index.vue
  26. 30 11
      src/pages/mobilescene/menu/func.vue
  27. 3 44
      src/pages/mobilescene/raside/menu.vue
  28. 43 35
      src/pages/mobilescene/scene.vue
  29. 34 23
      src/pages/scene/index.vue
  30. 1 2
      src/pages/scene/menu.vue
  31. 3 1
      src/pages/scene/raside/rmenu.vue
  32. 19 4
      src/pages/scene/scene.vue
  33. 5 5
      src/pages/scene/zhanxiang/index.vue
  34. 7 2
      src/pages/scenePage/index.vue
  35. 1 1
      src/pages/scenePage/views/gui/guide.vue

+ 1 - 1
public/static/js/main_2020_show.js

@@ -25294,7 +25294,7 @@ window.Modernizr = function(n, e, t) {
             }
             ,
             parent !== window && window.addEventListener("message", function(a) {
-                var b = JSON.parse(a.data)
+                var b = typeof a.data == 'string'? JSON.parse(a.data) : a.data
                   , c = -1 !== window.navigator.userAgent.indexOf("KIW-TL00H");
                 b && b.alpha && b.beta && b.gamma && function(a) {
                     var c = r.Math.degToRad(b.alpha)

BIN
public/zhanxiang/images/weiting/W-01.jpg


BIN
public/zhanxiang/images/weiting/W-02.jpg


BIN
public/zhanxiang/images/weiting/W-03.jpg


BIN
public/zhanxiang/images/weiting/W-04.jpg


BIN
public/zhanxiang/images/weiting/W-05.jpg


BIN
public/zhanxiang/images/weiting/W-06.jpg


BIN
public/zhanxiang/images/xuting/X-01.jpg


BIN
public/zhanxiang/images/xuting/X-02.jpg


BIN
public/zhanxiang/images/xuting/X-03.jpg


BIN
public/zhanxiang/images/xuting/X-04.jpg


BIN
public/zhanxiang/images/xuting/X-05.jpg


BIN
public/zhanxiang/images/xuting/X-06.jpg


BIN
public/zhanxiang/images/xuting/X-07.jpg


BIN
src/assets/images/mobile/bgdownload.png


+ 8 - 11
src/clients/mobile.vue

@@ -1,12 +1,6 @@
 <template>
   <div class="bbbb">
     <router-view />
-    <audio
-      ref="vgbgm"
-      class="noshow"
-      loop
-      :src="require(`@/assets/audio/bgm.mp3`)"
-    ></audio>
     <div class="orientation-tip">
       <div>
         <img :src="require('@/assets/images/project/landtip.png')" alt="" />
@@ -100,7 +94,10 @@ export default {
   },
   watch:{
     '$route.name':function (newVal) {
-      newVal !='scene' ? this.$refs.vgbgm.pause() : this.$refs.vgbgm.play();
+      console.log(newVal == 'scene');
+      console.log(newVal,'newValnewValnewValnewVal');
+      this.$bus.$emit("toggleBGM",newVal =='scene')
+      // newVal !='scene' ? this.$refs.vgbgm.pause() : this.$refs.vgbgm.play();
     }
   },
   mounted() {
@@ -115,12 +112,12 @@ export default {
 
     this.$nextTick(()=>{
       document.addEventListener('WeixinJSBridgeReady', ()=>{
-        this.$refs.vgbgm.load()
       }, false);
 
-      this.$bus.$on('toggleHomeBgm',newVal=>{
-        !newVal ? this.$refs.vgbgm.pause() : this.$refs.vgbgm.play();
-      })
+      // this.$bus.$on('toggleHomeBgm',newVal=>{
+      //   console.log(newVal);
+      //   !newVal ? this.$refs.vgbgm.pause() : this.$refs.vgbgm.play();
+      // })
     })
 
 

+ 1 - 1
src/components/bird_view/build.js

@@ -30,7 +30,7 @@ export function $hideBirdView() {
   if (birdviewInstance) {
     document.body.removeChild(birdviewInstance.$el);
     birdviewInstance = "";
-    if (window.player.mode == "panorama") {
+    if ( window.player &&(window.player.mode == "panorama")) {
       window.parent.postMessage(
         {
           source: "mode.changed",

+ 24 - 15
src/components/bird_view/index.vue

@@ -9,6 +9,7 @@
 
 <script>
 import { region } from "@/data/raw.js";
+import router from "@/router";
 
 export default {
   data() {
@@ -23,27 +24,35 @@ export default {
       this.$hideBirdView();
     },
     onClick(data) {
+      let player = window.player;
+      if (!player) {
+        router.push({
+          name: "scene",
+          params: { type: data.id, isjump: "yes" },
+        });
+        setTimeout(() => {
+          this.close();
+        }, 300);
+        return;
+      }
+
       let fn = () => {
         let currentRegion = region.find((item) => item.id == data.id);
         let { x, y, z, w } = currentRegion.firstView.panoQuaternion;
-        window.player.blackToPano({
-          pano: window.player.model.panos.index[currentRegion.firstView.panoId],
+        let fnname = "flyToPano";
+        if (player.mode == "panorama") {
+          fnname = "blackToPano";
+        }
+        player[fnname]({
+          pano: player.model.panos.index[currentRegion.firstView.panoId],
           quaternion: new window.THREE.Quaternion(x, y, z, w),
         });
       };
-      if (window.player.mode != "panorama") {
-        window.player.director.changeMode("panorama").then(()=>{
-          fn();
-          setTimeout(() => {
-            this.close();
-          }, 300);
-        });
-      } else {
-        setTimeout(() => {
-          fn();
-          this.close();
-        }, 300);
-      }
+
+      setTimeout(() => {
+        fn();
+        this.close();
+      }, 300);
     },
   },
 };

+ 9 - 6
src/components/hotspot/image.vue

@@ -2,18 +2,19 @@
   <div class="hotspot" v-if="!isMobile">
     <img class="aa" v-if="hotspot.images.length > 1" :src="require('@/assets/images/proj2022/pc/left_1.png')" alt="" @click="handlePage('prev')" />
     <div class="vhotspotcon">
-      <div class="vtitle" v-html="hotspot.title"></div>
-      <div class="hotspotcon">
-        <div class="img-con"  :class="{ bigImg: !hotspot.content }">
+      <div class="vtitle" v-if="hotspot.title" v-html="hotspot.title"></div>
+      <div class="hotspotcon" :class="{hotconfull:!hotspot.title&&!(hotspot.title||hotspot.imagesDesc[active])}">
+        <div class="img-con"  :class="{ bigImg: !hotspot.imagesDesc[active] }">
           <div class="imgmain">
             <img id="map" :src="g_fixUrl(hotspot.images[active])" alt="" />
           </div>
-        </div>
-        <div class="pagna" v-if="hotspot.images.length > 1">
+          <div class="pagna" v-if="hotspot.images.length > 1">
           <span>{{ active + 1 }}</span>
           /
           <span>{{ hotspot.images.length }}</span>
         </div>
+        </div>
+        
         <div class="desc" v-html="handleContent(hotspot.imagesDesc[active])"></div>
       </div>
     </div>
@@ -140,7 +141,9 @@ export default {
 @w: 75%;
 @fixw: 8px;
 .hotspot {
-
+ 
+ .vhotspotcon{
+ }
 }
 
 .mbhotspot {

+ 13 - 4
src/components/hotspot/index.vue

@@ -73,6 +73,7 @@ export default {
 
 <style lang="less" scoped>
 @w: 75%;
+@titleH:100px;
 .hotspotconf {
   position: fixed;
   z-index: 9999;
@@ -99,13 +100,15 @@ export default {
         font-size: 30px;
         font-weight: bold;
         width: 100%;
-        margin: 60px auto 42px;
+        height: @titleH;
+        display: flex;
+        align-items: center;
         color: #ffffff;
       }
 
       .hotspotcon {
         width: 100%;
-        height: calc(100% - 242px);
+        height: calc(100% - @titleH - 30px);
         .img-con {
           display: flex;
           align-items: center;
@@ -151,6 +154,10 @@ export default {
           font-size: 18px;
           margin-top: 10px;
           color: rgba(255, 255, 255, 0.8);
+          position: absolute;
+          bottom: 0px;
+          left: 50%;
+          transform: translate(-50%);
         }
         .desc {
           width: 90%;
@@ -158,12 +165,15 @@ export default {
           font-size: 20px;
           text-align: justify;
           line-height: 1.8;
-          max-height: 120px;
+          // max-height: 120px;
           margin: 10px auto 0;
           padding-right: 14px;
           overflow-y: auto;
         }
       }
+      .hotconfull{
+        height: 100%;
+      }
       .fullcon {
         width: 100%;
         height: 100%;
@@ -192,7 +202,6 @@ export default {
       font-size: 30px;
       font-weight: bold;
       width: 100%;
-      margin: 60px auto 42px;
       color: #ffffff;
     }
   }

+ 22 - 5
src/components/hotspot/video.vue

@@ -2,8 +2,8 @@
   <div class="hotspot" v-if="!isMobile">
     <img class="aa" v-if="hotspot.video.length > 1" @click="active -= 1" :src="require('@/assets/images/proj2022/pc/left_1.png')" alt="" />
     <div class="vhotspotcon">
-      <div class="vtitle" v-html="hotspot.title"></div>
-      <div class="hotspotcon">
+      <div class="vtitle" v-if="hotspot.title" v-html="hotspot.title"></div>
+      <div class="hotspotcon"  :class="{hotconfull:!hotspot.title&&!(hotspot.title||hotspot.imagesDesc[active])}">
         <div class="img-con">
           <div class="imgmain">
             <video
@@ -11,6 +11,7 @@
               disablePictureInPicture
               controls
               autoplay
+              :key="active"
               v-show="isvideoshow"
               @canplaythrough="isvideoshow = true"
               @canplay="isvideoshow = true"
@@ -28,7 +29,7 @@
         <!-- <div class="desc" v-html="hotspot.content"></div> -->
       </div>
     </div>
-    <img class="aa" v-if="hotspot.video.length > 1" @click="active += 1" :src="require('@/assets/images/proj2022/pc/left_1.png')" alt="" />
+    <img class="aa" v-if="hotspot.video.length > 1" @click="active += 1" :src="require('@/assets/images/proj2022/pc/right_1.png')" alt="" />
   </div>
 
   <div v-else class="mbhotspot">
@@ -77,6 +78,19 @@ export default {
     };
   },
   watch: {
+     active() {
+      setTimeout(() => {
+        this.$showLoading();
+      });
+
+      if (this.to) {
+        clearTimeout(this.to);
+        this.to = null;
+      }
+      this.to = setTimeout(() => {
+        this.$hideLoading();
+      }, 1500);
+    },
     isvideoshow: {
       handler: function(newVal) {
         if (newVal) {
@@ -121,8 +135,11 @@ export default {
 </script>
 
 <style lang="less" scoped>
-
-
+.hotconfull{
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
 .mbhotspot {
   width: 100%;
   height: 100%;

+ 1 - 1
src/data/booth.js

@@ -1098,7 +1098,7 @@ let Booth = [
       },
       {
         name: "鱼菜共生循环农业供港澳蔬菜基地",
-        img: "E-=10.jpg", //封面
+        img: "E-10.jpg", //封面
         id: "five_10", //標識符
         firstView: "&firstView=pano:188,qua:0.04633300664543924,-0.3333998405861691,0.01640718115821446,0.9415033693987681", //初始視角
         panoId: "188", //对应点位id

+ 29 - 29
src/data/raw.js

@@ -20,10 +20,10 @@ let region = [
     firstView: {
       panoId: "0",
       panoQuaternion: {
-        w: 0.004201298516425423,
-        x: 0.6983405631424313,
-        y: -0.004099157345704842,
-        z: 0.7157415805989583,
+        x: 0.004201298516425423,
+        y: 0.6983405631424313,
+        z: -0.004099157345704842,
+        w: 0.7157415805989583
       },
     },
   },
@@ -68,10 +68,10 @@ let region = [
     firstView: {
       panoId: "4",
       panoQuaternion: {
-        w: -0.016484962519480128,
-        x: 0.7083437993857234,
-        y: 0.016551859736091593,
-        z: 0.7054809155529423,
+        x: -0.016484962519480128,
+        y:0.7083437993857234,
+        z: 0.016551859736091593,
+        w: 0.7054809155529423
       },
     },
   },
@@ -112,10 +112,10 @@ let region = [
     firstView: {
       panoId: "28",
       panoQuaternion: {
-        w: -0.0025227562096617204,
-        x:0.7274944951689518,
-        y: 0.0026749474742033,
-        z: 0.6861036680499847,
+        x:-0.0025227562096617204,
+        y:0.7274944951689518,
+        z: 0.0026749474742033,
+        w:0.6861036680499847
       },
     },
   },
@@ -155,12 +155,12 @@ let region = [
     ], //展区三展位ID
     spread: calcuSpread(98, 133),
     firstView: {
-      panoId: "57",
+      panoId: "54",
       panoQuaternion: {
-        w: 0.7025372977959743,
-        x: 0.03404281418995961,
-        y: -0.7099991350228166,
-        z: 0.034404392458114295,
+        x: 0.001379024148335344,
+        y: 0.7366686163278059,
+        z: -0.0015022291805256197,
+        w: 0.676250845860994
       },
     },
   },
@@ -207,10 +207,10 @@ let region = [
     firstView: {
       panoId: "133",
       panoQuaternion: {
-        w: -0.3600515275002373,
-        x: 0.0035370686330483685,
-        y: 0.9328807039103099,
-        z: 0.00916441916471697,
+        x: 0.00008715349787287117,
+        y: 0.9997454110555601,
+        z: -0.022219891745382258,
+        w: 0.003921320376087155
       },
     },
   },
@@ -259,10 +259,10 @@ let region = [
     firstView: {
       panoId: "180",
       panoQuaternion: {
-        w: 0.3502011027682601,
-        x: 0.0028560994705540276,
-        y: 0.9366390248430625,
-        z: -0.007638851405218204,
+        x: 0.0012278773790903405,
+        y: -0.7063726737557519,
+        z: 0.0012253354908840718,
+        w: 0.7078380020572562,
       },
     },
   },
@@ -282,10 +282,10 @@ let region = [
     firstView: {
       panoId: "232",
       panoQuaternion: {
-        w: 0.3502011027682601,
-        x: 0.0028560994705540276,
-        y: 0.9366390248430625,
-        z: -0.007638851405218204,
+        x: 0.005304150371975262,
+        y:-0.672455648730051,
+        z:0.004819339119823067,
+        w:0.7401027159751582
       },
     },
   },

+ 33 - 13
src/pages/mobilescene/birdview/index.vue

@@ -3,15 +3,9 @@
     <ViewOperation>
       <div class="birdcon">
         <img class="bd_bg" :src="require(`@/assets/images/proj2022/pc/birdviewbg.jpg`)" alt="" />
-        <img
-          class="tag"
-          @click="onClick(item)"
-          v-for="(item, i) in themes"
-          :key="i"
-          :class="item.id"
-          :src="require(`@/assets/images/proj2022/bird_view/${item.id}.png`)"
-          alt=""
-        />
+        <div class="tag" v-for="(item, i) in themes" :key="i" :class="item.id">
+          <img @click="onClick(item)" :src="require(`@/assets/images/proj2022/bird_view/${item.id}.png`)" alt="" />
+        </div>
       </div>
     </ViewOperation>
     <img v-if="!hideClose" class="close" @click="close" :src="require('@/assets/images/proj2022/pc/cancel.png')" alt="" />
@@ -22,7 +16,7 @@
 import ViewOperation from "./ViewOperation";
 
 export default {
-  props:['hideClose'],
+  props: ["hideClose"],
   data() {
     return {};
   },
@@ -35,7 +29,7 @@ export default {
     },
     onClick(data) {
       console.log(data);
-      this.$router.replace({
+      this.$router.push({
         name: "scene",
         params: { type: data.id, isjump: "yes" },
       });
@@ -74,8 +68,24 @@ export default {
 
     .tag {
       position: absolute;
-      max-width: 9%;
-      touch-action:none;
+      max-width: 10%;
+      cursor: pointer;
+      display: inline-block;
+      &::after {
+        pointer-events: none;
+        animation: highlight-move 3s infinite;
+        background: linear-gradient(90deg, hsla(0, 0%, 100%, 0) 0, hsla(0, 0%, 100%, 0.3) 50%, hsla(0, 0%, 100%, 0));
+        content: "";
+        height: 88%;
+        left: 0%;
+        position: absolute;
+        top: 0;
+        transform: skewX(-45deg);
+        width: 40%;
+      }
+      > img {
+        width: 100%;
+      }
     }
     .one {
       top: 49%;
@@ -107,4 +117,14 @@ export default {
     }
   }
 }
+
+@keyframes highlight-move {
+  0% {
+    left: 0%;
+  }
+
+  100% {
+    left: 70%;
+  }
+}
 </style>

+ 5 - 2
src/pages/mobilescene/index.vue

@@ -45,8 +45,8 @@
     </vpopup>
 
     <div class="logincon" v-if="loginUrl">
-      <img class="close" @click="loginUrl = ''" :src="require('@/assets/images/mobile/icon/close_b.png')" alt="" />
       <iframe :src="loginUrl" frameborder="0"></iframe>
+      <img class="close" @click="loginUrl = ''" :src="require('@/assets/images/mobile/icon/close_b.png')" alt="" />
     </div>
   </div>
 </template>
@@ -349,7 +349,7 @@ export default {
   }
   .logincon {
     position: fixed;
-    z-index: 999999;
+    z-index: 99999;
     width: 100%;
     height: 100%;
     top: 0;
@@ -357,12 +357,15 @@ export default {
     > iframe {
       width: 100%;
       height: 100%;
+      position: relative;
+      z-index: 999900;
     }
     .close {
       display: inline-block;
       position: absolute;
       right: 16px;
       top: 16px;
+      z-index: 999999;
       width: 16px;
     }
   }

+ 30 - 11
src/pages/mobilescene/menu/func.vue

@@ -43,11 +43,16 @@ let menu = [
 export default {
   props: ["tourStatus"],
   data() {
+    let bgmAudio = new Audio();
+    bgmAudio.src = require(`@/assets/audio/bgm.mp3`);
+    bgmAudio.loop = true;
+
     return {
       menu,
       goodNum: 1099,
       isShowGood: false,
       isBgm: false,
+      bgmAudio,
       isShowHuDong: false,
     };
   },
@@ -55,8 +60,7 @@ export default {
     isBgm: {
       immediate: true,
       handler: function(newVal) {
-        this.$bus.$emit("toggleHomeBgm", newVal);
-        // !newVal ? this.$refs.vbgm.pause() : this.$refs.vbgm.play();
+        !newVal ? this.bgmAudio.pause() : this.bgmAudio.play();
       },
     },
     isShowHuDong(newVal){
@@ -64,15 +68,22 @@ export default {
     },
     tourStatus(newVal) {
       if (newVal) {
-        this.isBgm = false;
+          this.isBgm = true;
       } else {
         let status = localStorage.getItem("g_bgmstatus");
         if (status === "open") {
           this.isBgm = true;
+        }else{
+        this.isBgm = false;
+
         }
       }
     },
   },
+  beforeDestroy() {
+    this.bgmAudio.pause() 
+    this.bgmAudio = null
+  },
   methods: {
     onClick(item) {
 
@@ -119,18 +130,26 @@ export default {
     },
   },
   mounted() {
-    this.isBgm = true;
+     this.isBgm = true;
     localStorage.setItem("g_bgmstatus", this.isBgm ? "open" : "close");
+
     this.$nextTick(() => {
-      this.$bus.$on("toggleBGM", (data) => {
-        if (!data) {
-          this.isBgm = data;
-        } else {
-          let status = localStorage.getItem("g_bgmstatus");
-          if (status === "open") {
+      setTimeout(() => {
+        if (this.bgmAudio.paused) {
+          this.isBgm = false;
+          localStorage.setItem("g_bgmstatus", this.isBgm ? "open" : "close");
+        }
+        this.$bus.$on("toggleBGM", (data) => {
+          console.log(data,'datadatadatadatadatadatadatadata');
+          if (!data) {
             this.isBgm = data;
+          } else {
+            let status = localStorage.getItem("g_bgmstatus");
+            if (status === "open") {
+              this.isBgm = data;
+            }
           }
-        }
+        });
       });
     });
   },

+ 3 - 44
src/pages/mobilescene/raside/menu.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="rmenu">
     <ul v-if="menuType == 'func' && isShowfunc">
-      <li :class="{ rmactive: isBgm && item.id == 'music' }" v-for="(item, i) in menu" :key="i">
+      <li  v-for="(item, i) in menu" :key="i">
         <img @click="onClick(item)" :title="item.name" :src="require(`@/assets/images/proj2022/mobile/menu/${item.img}.png`)" alt="" />
       </li>
     </ul>
@@ -88,14 +88,8 @@ export default {
     },
   },
   data() {
-    let bgmAudio = new Audio();
-    bgmAudio.src = require(`@/assets/audio/bgm.mp3`);
-    bgmAudio.loop = true;
-
     return {
       current: "play",
-      bgmAudio,
-      isBgm: false,
       menu: [
         {
           id: "daka",
@@ -124,45 +118,10 @@ export default {
     };
   },
   watch: {
-    isBgm: {
-      immediate: true,
-      handler: function(newVal) {
-        !newVal ? this.bgmAudio.pause() : this.bgmAudio.play();
-      },
-    },
-    tourStatus(newVal) {
-      if (newVal) {
-        this.isBgm = false;
-      } else {
-        let status = localStorage.getItem("g_bgmstatus");
-        if (status === "open") {
-          this.isBgm = true;
-        }
-      }
-    },
+  
   },
   mounted() {
-    this.isBgm = true;
-    localStorage.setItem("g_bgmstatus", this.isBgm ? "open" : "close");
-
-    this.$nextTick(() => {
-      setTimeout(() => {
-        if (this.bgmAudio.paused) {
-          this.isBgm = false;
-          localStorage.setItem("g_bgmstatus", this.isBgm ? "open" : "close");
-        }
-        this.$bus.$on("toggleBGM", (data) => {
-          if (!data) {
-            this.isBgm = data;
-          } else {
-            let status = localStorage.getItem("g_bgmstatus");
-            if (status === "open") {
-              this.isBgm = data;
-            }
-          }
-        });
-      });
-    });
+   
   },
   methods: {
     onClickNavigate(type) {

+ 43 - 35
src/pages/mobilescene/scene.vue

@@ -1,67 +1,75 @@
 <template>
   <div class="scene-body">
-    <iframe
-      ref="ifr"
-      id="ifr"
-      :key="viewId"
-      :src="`scene.html?m=1204${boothItem||firstView[viewId]}`"
-      allowfullscreen="true"
-      frameborder="0"
-    ></iframe>
+    <iframe ref="ifr" id="ifr" :key="viewId" :src="`scene.html?m=1204${boothItem || firstView[viewId]}`" allowfullscreen="true" frameborder="0"></iframe>
   </div>
 </template>
 
 <script>
-import {region,Booth} from "@/data/raw.js";
-let firstView =  {}
-region.forEach(item=>{
-  let {x,y,z,w} = item.firstView.panoQuaternion
-  firstView[item.id] = `&firstView=pano:${item.firstView.panoId},qua:${x+', '+y+', '+z+', '+w}`
-})
+import { region } from "@/data/raw.js";
+import { Booth } from "@/data/booth.js";
+
+let firstView = {};
+region.forEach((item) => {
+  let { x, y, z, w } = item.firstView.panoQuaternion;
+  firstView[item.id] = `&firstView=pano:${item.firstView.panoId},qua:${x + ", " + y + ", " + z + ", " + w}`;
+});
 
 export default {
   props: ["tourStatus"],
-  data(){
+  data() {
     return {
       firstView,
-      viewId:this.$route.params.type,
-      boothId:this.$route.query.boothId,
-    }
+      viewId: this.$route.params.type,
+      boothId: this.$route.query.boothId,
+    };
   },
 
-  computed:{
-    boothItem:function () {
-      let tmp = ''
+  computed: {
+    boothItem: function() {
+      let tmp = "";
       if (this.boothId) {
-        let tt = Booth.find(item=>item.id == this.boothId)
-        let {x,y,z,w} = tt.panoQuaternion
-        tmp = `&firstView=pano:${tt.panoId},qua:${x+', '+y+', '+z+', '+w}`
+        let tt = ''
+        for (let index = 0; index < Booth.length; index++) {
+          const item = Booth[index];
+          tt = item.company.find(sub=>sub.panoId==this.boothId)
+          if (tt) {
+            break
+          }
+        }
+
+        let panoQuat = tt.firstView.split("qua:")[1];
+        let [x, y, z, w] = panoQuat.split(",");
+        tmp = `&firstView=pano:${tt.panoId},qua:${x + ", " + y + ", " + z + ", " + w}`;
       }
-      return tmp
-    }
+      return tmp;
+    },
   },
   mounted() {
-    let ifrWindow = this.$refs.ifr.contentWindow
-    this.$bus.$on('ifrMessage',(data)=>{
+    let ifrWindow = this.$refs.ifr.contentWindow;
+    this.$bus.$on("ifrMessage", (data) => {
       if (data.events == "flyToPano") {
         let panoQuat = data.data.firstView.split("qua:")[1];
         let [x, y, z, w] = panoQuat.split(",");
-        ifrWindow.player.blackToPano({
+        let fnname = "flyToPano";
+        if (ifrWindow.player.mode == "panorama") {
+          fnname = "blackToPano";
+        }
+        ifrWindow.player[fnname]({
           pano: ifrWindow.player.model.panos.index[data.data.panoId],
           quaternion: new ifrWindow.THREE.Quaternion(Number(x), Number(y), Number(z), Number(w)),
         });
       }
 
-      if (data.events=='toggleTour') {
-        ifrWindow[data.data]()
+      if (data.events == "toggleTour") {
+        ifrWindow[data.data]();
       }
-    })
+    });
   },
   watch: {
     theme(newVal) {
-      let currentRegion = region.find(item=>item.id==newVal)
-      window.g_lock = true
-      if (this.$route.params.isjump=='yes') {
+      let currentRegion = region.find((item) => item.id == newVal);
+      window.g_lock = true;
+      if (this.$route.params.isjump == "yes") {
         this.$refs.ifr.contentWindow.postMessage(
           {
             source: "changeExhition",

+ 34 - 23
src/pages/scene/index.vue

@@ -1,26 +1,26 @@
 <template>
   <div :class="`theme${theme}`" class="scene-body">
-    <div class="logo" @click="$router.push({path:'/'})">
+    <div class="logo" @click="$router.push({ path: '/' })">
       <img :src="require(`@/assets/images/proj2022/pc/logo.png`)" alt="" />
       <span>大众创业万众创新</span>
     </div>
 
     <div class="scene-con" :class="{ showscene: showAll }">
-      <!-- <template v-if="!showViewMode&&!tourStatus"> -->
-        <vside
-          @currentPano="
-            (data) => {
-              currentPano = data;
-            }
-          "
-          v-show="!tourStatus && !isClear"
-          :currentPanoid="currentPanoid"
-        />
-        <vmenu :currentPanoid="currentPanoid" v-show="!tourStatus && !isClear" :tourStatus="tourStatus" @opencp="handlecp" />
-        <zhanxiang :currentPanoid="currentPanoid" v-show="!tourStatus && !isClear" :zxdata="zhanxiangData" :class="{ zxshow: isShowZX }" />
+      <template v-if="!showViewMode&&!tourStatus">
+      <vside
+        @currentPano="
+          (data) => {
+            currentPano = data;
+          }
+        "
+        v-show="!tourStatus && !isClear"
+        :currentPanoid="currentPanoid"
+      />
+      <vmenu :currentPanoid="currentPanoid" v-show="!tourStatus && !isClear" :tourStatus="tourStatus" @opencp="handlecp" />
+      <zhanxiang :currentPanoid="currentPanoid" v-show="!tourStatus && !isClear" :zxdata="zhanxiangData" :class="{ zxshow: isShowZX }" />
 
-        <img v-if="isClear" @click.stop="clicktoClear" class="isClear" :src="require('@/assets/images/proj2022/pc/reset@2x.png')" alt="" />
-      <!-- </template> -->
+      <img v-if="isClear" @click.stop="clicktoClear" class="isClear" :src="require('@/assets/images/proj2022/pc/reset@2x.png')" alt="" />
+      </template>
 
       <scene v-if="showScene" />
     </div>
@@ -130,6 +130,15 @@ export default {
         this.$bus.$emit("toggleShowZX", false);
       }
     },
+    isClear(newVal) {
+      document.querySelector("#ifr").contentWindow.postMessage(
+        {
+          source: "toggleClear",
+          data: newVal,
+        },
+        "*"
+      );
+    },
   },
 
   mounted() {
@@ -160,7 +169,7 @@ export default {
 
           if (res.data.source === "mode.changed") {
             console.log("mode.changed", data);
-            if (data == "floorplan" || data == "birdview"|| data == "dollhouse") {
+            if (data == "floorplan" || data == "birdview" || data == "dollhouse") {
               this.showViewMode = true;
             } else if (data == "panorama") {
               this.showViewMode = false;
@@ -172,6 +181,13 @@ export default {
           if (res.data.source === "onplayStatus") {
             console.log("onplayStatus");
             this.tourStatus = data.tourIsPlaying;
+            document.querySelector("#ifr").contentWindow.postMessage(
+              {
+                source: "toggleClear",
+                data: this.tourStatus,
+              },
+              "*"
+            );
           }
 
           if (res.data.source === "pano.chosen") {
@@ -224,16 +240,10 @@ export default {
   beforeDestroy() {
     $(document).on("fullscreenchange webkitfullscreenchange mozfullscreenchange MSFullscreenChange");
   },
+
   methods: {
     clicktoClear() {
       this.isClear = false;
-      document.querySelector("#ifr").contentWindow.postMessage(
-        {
-          source: "toggleClear",
-          data: false,
-        },
-        "*"
-      );
     },
     handleFull() {
       if (this.isFull) {
@@ -267,6 +277,7 @@ export default {
     z-index: 999;
     display: flex;
     align-items: center;
+    cursor: pointer;
     > img {
       width: 66px;
       margin-right: 10px;

+ 1 - 2
src/pages/scene/menu.vue

@@ -131,7 +131,7 @@ export default {
       if (currentIdx > -1) {
         if (currentIdx == 0) {
           zhanqu = findPrevItem(Booth, zhanqu);
-          prevPanoItem = zhanqu.company[0];
+          prevPanoItem = zhanqu.company[zhanqu.company.length-1];
         } else {
           currentIdx -= 1;
           prevPanoItem = zhanqu.company[currentIdx];
@@ -160,7 +160,6 @@ export default {
       this.currentActive = item;
     },
     onClickNavigate(type) {
-      console.log(this.prevZhanXiang);
       
       if (type == "up") {
         this.$bus.$emit("ifrMessage", {

+ 3 - 1
src/pages/scene/raside/rmenu.vue

@@ -55,11 +55,13 @@ export default {
     },
     tourStatus(newVal) {
       if (newVal) {
-        this.isBgm = false;
+        this.isBgm = true;
       } else {
         let status = localStorage.getItem("g_bgmstatus");
         if (status === "open") {
           this.isBgm = true;
+        } else{
+          this.isBgm = false;
         }
       }
     },

+ 19 - 4
src/pages/scene/scene.vue

@@ -5,7 +5,9 @@
 </template>
 
 <script>
-import { region, Booth } from "@/data/raw.js";
+import { region } from "@/data/raw.js";
+import { Booth } from "@/data/booth.js";
+
 let firstView = {};
 region.forEach((item) => {
   let { x, y, z, w } = item.firstView.panoQuaternion;
@@ -25,8 +27,17 @@ export default {
     boothItem: function() {
       let tmp = "";
       if (this.boothId) {
-        let tt = Booth.find((item) => item.id == this.boothId);
-        let { x, y, z, w } = tt.panoQuaternion;
+        let tt = ''
+        for (let index = 0; index < Booth.length; index++) {
+          const item = Booth[index];
+          tt = item.company.find(sub=>sub.panoId==this.boothId)
+          if (tt) {
+            break
+          }
+        }
+
+        let panoQuat = tt.firstView.split("qua:")[1];
+        let [x, y, z, w] = panoQuat.split(",");
         tmp = `&firstView=pano:${tt.panoId},qua:${x + ", " + y + ", " + z + ", " + w}`;
       }
       return tmp;
@@ -38,7 +49,11 @@ export default {
       if (data.events == "flyToPano") {
         let panoQuat = data.data.firstView.split("qua:")[1];
         let [x, y, z, w] = panoQuat.split(",");
-        ifrWindow.player.blackToPano({
+        let fnname = 'flyToPano'
+        if (ifrWindow.player.mode == 'panorama') {
+          fnname = 'blackToPano'
+        }
+        ifrWindow.player[fnname]({
           pano: ifrWindow.player.model.panos.index[data.data.panoId],
           quaternion: new ifrWindow.THREE.Quaternion(Number(x), Number(y), Number(z), Number(w)),
         });

+ 5 - 5
src/pages/scene/zhanxiang/index.vue

@@ -113,7 +113,7 @@ export default {
           left: 0;
           top: 0;
           pointer-events: none;
-          background: linear-gradient(0, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.5) 100%);
+          background: linear-gradient(0, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 100%);
         }
         &.biankuang {
           &.active,
@@ -123,7 +123,7 @@ export default {
             }
             .name{
               span{
-                color: rgba(255, 255, 255, 0.8);
+                color: rgba(255, 255, 255, 1);
               }
             }
           }
@@ -136,10 +136,10 @@ export default {
           padding: 0 4px;
           z-index: 9;
           box-sizing: border-box;
-          height: 38px;
-          color: rgba(255, 255, 255, 0.8);
+          min-height: 38px;
+          color: rgba(255, 255, 255, 0.5);
           display: flex;
-          align-items: center;
+          align-items: flex-start;
           span{
             display: inline-block;
             text-align: justify;

+ 7 - 2
src/pages/scenePage/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="parent-body themexuting">
+  <div class="parent-body " :class="`theme${themescene}`">
     <!-- 热点 -->
     <hot />
     <!-- 热点弹出框 -->
@@ -271,7 +271,12 @@ export default {
           }
           if (res.data.source === "changeExhition") {
             let { x, y, z, w } = data.quat;
-            window.player.blackToPano({
+            let fnname = "flyToPano";
+            if (window.player.mode == "panorama") {
+              fnname = "blackToPano";
+            }
+
+            window.player[fnname]({
               pano: window.player.model.panos.index[data.index],
               quaternion: new window.THREE.Quaternion(x, y, z, w),
             });

+ 1 - 1
src/pages/scenePage/views/gui/guide.vue

@@ -27,7 +27,7 @@
 export default {
   methods: {
     stop() {
-      window.stopTour()
+      window.player.director.stopTour()
     },
   },
 };