ソースを参照

bug fix:
swkk不同楼层都使用了一楼的场景码;热点详情标题应该用title而非content。

任一存 2 年 前
コミット
2b579d760d
2 ファイル変更14 行追加9 行削除
  1. 8 4
      src/components/HotspotDetail.vue
  2. 6 5
      src/views/SwkkView.vue

+ 8 - 4
src/components/HotspotDetail.vue

@@ -41,7 +41,7 @@
           >
             <video
               ref="video"
-              :src="`https://4dkk.4dage.com/scene_edit_data/KJ-aigSkgvRWR/user/${item.url}`"
+              :src="`https://4dkk.4dage.com/scene_edit_data/${sceneCode}/user/${item.url}`"
               controls
               controlslist="nodownload"
               disablePictureInPicture
@@ -97,7 +97,7 @@
             ref="audio-comp"
             :key="index"
             class="audio-custom swiper-slide"
-            :audio-src="`https://4dkk.4dage.com/scene_edit_data/KJ-aigSkgvRWR/user/${item.url}`"
+            :audio-src="`https://4dkk.4dage.com/scene_edit_data/${sceneCode}/user/${item.url}`"
           />
         </div>
         <div class="swiper-pagination">
@@ -136,7 +136,7 @@
           <img
             v-for="(item, index) in typesForShow[currentTabIdx].list"
             :key="index"
-            v-lazy="`https://4dkk.4dage.com/scene_edit_data/KJ-aigSkgvRWR/user/${item.url}`"
+            v-lazy="`https://4dkk.4dage.com/scene_edit_data/${sceneCode}/user/${item.url}`"
             class="swiper-slide"
             alt=""
             draggable="false"
@@ -184,6 +184,10 @@ export default {
     hotspotList: {
       type: Array,
       required: true,
+    },
+    sceneCode: {
+      type: String,
+      required: true,
     }
   },
   data() {
@@ -265,7 +269,7 @@ export default {
         })
         for (const mediaItem of hotspot.media[hotspot.type]) {
           targetTypeItem.list.push({
-            title: hotspot.content || hotspot.title.split('&')[0],
+            title: /* hotspot.content || */hotspot.title.split('&')[0],
             url: mediaItem.src,
           })
         }

+ 6 - 5
src/views/SwkkView.vue

@@ -190,6 +190,7 @@
         zIndex: $globalConfig.zIndex.swkkHotspotDetail.self
       }"
       :hotspot-list="relatedHotspotList"
+      :scene-code="sceneCode"
       @close="isShowDetail = false"
     />
 
@@ -226,6 +227,7 @@ export default {
 
       // 楼层
       floor: 0,
+      sceneCode: '',
 
       // 自动巡游相关
       canClickAutoMoving: false,
@@ -293,14 +295,13 @@ export default {
     this.$msgCenter.publish('show-loading')
     let floor = this.$route.query.floor
     this.floor = floor
-    let sceneCode = ''
-    if (floor === "1") sceneCode = process.env.VUE_APP_SCENE_CODE_FLOOR_1
-    else if (floor === "2") sceneCode = process.env.VUE_APP_SCENE_CODE_FLOOR_2
-    console.assert(sceneCode, 'no sceneCode!')
+    if (floor === "1") this.sceneCode = process.env.VUE_APP_SCENE_CODE_FLOOR_1
+    else if (floor === "2") this.sceneCode = process.env.VUE_APP_SCENE_CODE_FLOOR_2
+    console.assert(this.sceneCode, 'no sceneCode!')
 
     let kankan = new KanKan({
       dom: ".swkk-wrap",
-      num: sceneCode,
+      num: this.sceneCode,
     })
 
     kankan.use("MinMap", {