tremble vor 3 Jahren
Ursprung
Commit
fea21e866d

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

@@ -25009,7 +25009,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


+ 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);
     },
   },
 };

+ 3 - 3
src/components/hotspot/image.vue

@@ -2,11 +2,11 @@
   <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="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.content }">
           <div class="imgmain">
-            <img id="map" :src="g_fixUrl(hotspot.images[active])" alt="" />
+            <img id="map" :key="active" :src="g_fixUrl(hotspot.images[active])" alt="" />
           </div>
         </div>
         <div class="pagna" v-if="hotspot.images.length > 1">

+ 8 - 1
src/components/hotspot/index.vue

@@ -72,7 +72,7 @@ export default {
 </script>
 
 <style lang="less" scoped>
-@w: 75%;
+@w: 100%;
 .hotspotconf {
   position: fixed;
   z-index: 9999;
@@ -151,6 +151,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%;
@@ -164,6 +168,9 @@ export default {
           overflow-y: auto;
         }
       }
+      .hotconfull{
+        height: 100%;
+      }
       .fullcon {
         width: 100%;
         height: 100%;

+ 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%;

+ 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
       },
     },
   },

+ 32 - 12
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 {};
   },
@@ -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;
     }
   }

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

@@ -1,67 +1,64 @@
 <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, 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}`;
+});
 
 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 = Booth.find((item) => item.id == this.boothId);
+        let { x, y, z, w } = tt.panoQuaternion;
+        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",

+ 31 - 21
src/pages/scene/index.vue

@@ -1,25 +1,25 @@
 <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 }" />
+      <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="" />
+      <img v-if="isClear" @click.stop="clicktoClear" class="isClear" :src="require('@/assets/images/proj2022/pc/reset@2x.png')" alt="" />
       <!-- </template> -->
 
       <scene v-if="showScene" />
@@ -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) {

+ 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;
         }
       }
     },

+ 5 - 1
src/pages/scene/scene.vue

@@ -38,7 +38,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)),
         });

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

@@ -136,10 +136,10 @@ export default {
           padding: 0 4px;
           z-index: 9;
           box-sizing: border-box;
-          height: 38px;
+          min-height: 38px;
           color: rgba(255, 255, 255, 0.8);
           display: flex;
-          align-items: center;
+          align-items: flex-start;
           span{
             display: inline-block;
             text-align: justify;

+ 6 - 1
src/pages/scenePage/index.vue

@@ -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()
     },
   },
 };