tremble hace 3 años
padre
commit
23401ed95c

+ 8 - 5
src/components/hotspot/image.vue

@@ -4,16 +4,17 @@
     <div class="vhotspotcon">
       <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="img-con"  :class="{ bigImg: !hotspot.imagesDesc[active] }">
           <div class="imgmain">
-            <img id="map" :key="active" :src="g_fixUrl(hotspot.images[active])" alt="" />
+            <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 {

+ 7 - 5
src/components/hotspot/index.vue

@@ -72,7 +72,8 @@ export default {
 </script>
 
 <style lang="less" scoped>
-@w: 100%;
+@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;
@@ -162,7 +165,7 @@ 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;
@@ -199,7 +202,6 @@ export default {
       font-size: 30px;
       font-weight: bold;
       width: 100%;
-      margin: 60px auto 42px;
       color: #ffffff;
     }
   }

+ 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

+ 1 - 1
src/pages/mobilescene/birdview/index.vue

@@ -29,7 +29,7 @@ export default {
     },
     onClick(data) {
       console.log(data);
-      this.$router.replace({
+      this.$router.push({
         name: "scene",
         params: { type: data.id, isjump: "yes" },
       });

+ 14 - 3
src/pages/mobilescene/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;
@@ -26,8 +28,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;

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

@@ -6,7 +6,7 @@
     </div>
 
     <div class="scene-con" :class="{ showscene: showAll }">
-      <!-- <template v-if="!showViewMode&&!tourStatus"> -->
+      <template v-if="!showViewMode&&!tourStatus">
       <vside
         @currentPano="
           (data) => {
@@ -20,7 +20,7 @@
       <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> -->
+      </template>
 
       <scene v-if="showScene" />
     </div>
@@ -277,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", {

+ 14 - 3
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;

+ 3 - 3
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);
               }
             }
           }
@@ -137,7 +137,7 @@ export default {
           z-index: 9;
           box-sizing: border-box;
           min-height: 38px;
-          color: rgba(255, 255, 255, 0.8);
+          color: rgba(255, 255, 255, 0.5);
           display: flex;
           align-items: flex-start;
           span{

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

@@ -1,5 +1,5 @@
 <template>
-  <div class="parent-body themexuting">
+  <div class="parent-body " :class="`theme${themescene}`">
     <!-- 热点 -->
     <hot />
     <!-- 热点弹出框 -->