Kaynağa Gözat

还是把热点的背景音频当正式信息展示吧。

任一存 2 yıl önce
ebeveyn
işleme
9a9996bd05
1 değiştirilmiş dosya ile 7 ekleme ve 8 silme
  1. 7 8
      src/views/HomeWeb.vue

+ 7 - 8
src/views/HomeWeb.vue

@@ -140,7 +140,7 @@
         </div>
       </div> -->
 
-      <!-- <div
+      <div
         v-if="isShowAudios"
         v-show="!isShowShare"
         class="swiper-wrapper-mine audio-wrap"
@@ -165,12 +165,11 @@
               />
             </div>
           </div>
-          <div class="swiper-pagination">
-          </div>
+          <div class="swiper-pagination" />
           <div class="swiper-button-prev" />
           <div class="swiper-button-next" />
         </div>
-      </div> -->
+      </div>
 
       <div
         v-if="isShowImages"
@@ -357,15 +356,15 @@ export default {
       }
       console.log('热点数据:', this.hotspotData)
 
-      this.bgAudioUrl = this.hotspotData.backgroundMusic
+      // this.bgAudioUrl = this.hotspotData.backgroundMusic
 
       if (this.hotspotData.images && this.hotspotData.images.length) {
         this.isShowImages = true
       } else if (this.hotspotData.video && this.hotspotData.video.length) {
         this.isShowVideos = true
-      // } else if (false) {
-      //   this.isShowAudios = true
-      //   this.hotspotData.audio = ...
+      } else if (this.hotspotData.backgroundMusic) {
+        this.isShowAudios = true
+        this.hotspotData.audio = [{ url: this.hotspotData.backgroundMusic }]
       }
     },
     onClickClose() {