فهرست منبع

swkk热点bug修复

任一存 2 سال پیش
والد
کامیت
d993cf6589
1فایلهای تغییر یافته به همراه19 افزوده شده و 19 حذف شده
  1. 19 19
      src/components/HotspotDetail.vue

+ 19 - 19
src/components/HotspotDetail.vue

@@ -25,7 +25,7 @@
     </button>
 
     <div
-      v-if="typesToShow[currentTabIdx].name === '视频'"
+      v-if="typesForShow[currentTabIdx].name === '视频'"
       class="swiper-wrapper-mine video-wrap"
     >
       <div
@@ -35,7 +35,7 @@
           class="swiper-wrapper"
         >
           <div
-            v-for="(item, index) in typesToShow[currentTabIdx].list"
+            v-for="(item, index) in typesForShow[currentTabIdx].list"
             :key="index"
             class="swiper-slide"
           >
@@ -49,7 +49,7 @@
           </div>
         </div>
         <div class="swiper-pagination">
-          <span class="cur">{{ currentSlideIdx + 1 }}</span> / <span>{{ typesToShow[currentTabIdx].list.length }}</span>
+          <span class="cur">{{ currentSlideIdx + 1 }}</span> / <span>{{ typesForShow[currentTabIdx].list.length }}</span>
         </div>
         <div class="swiper-button-prev" />
         <div class="swiper-button-next" />
@@ -57,7 +57,7 @@
     </div>
 
     <div
-      v-if="typesToShow[currentTabIdx].name === '模型'"
+      v-if="typesForShow[currentTabIdx].name === '模型'"
       class="swiper-wrapper-mine model-wrap"
     >
       <div
@@ -67,7 +67,7 @@
           class="swiper-wrapper"
         >
           <iframe
-            v-for="(item, index) in typesToShow[currentTabIdx].list"
+            v-for="(item, index) in typesForShow[currentTabIdx].list"
             :key="index"
             :src="item.url"
             frameborder="0"
@@ -75,7 +75,7 @@
           />
         </div>
         <div class="swiper-pagination">
-          <span class="cur">{{ currentSlideIdx + 1 }}</span> / <span>{{ typesToShow[currentTabIdx].list.length }}</span>
+          <span class="cur">{{ currentSlideIdx + 1 }}</span> / <span>{{ typesForShow[currentTabIdx].list.length }}</span>
         </div>
         <div class="swiper-button-prev" />
         <div class="swiper-button-next" />
@@ -83,7 +83,7 @@
     </div>
 
     <div
-      v-show="typesToShow[currentTabIdx] && typesToShow[currentTabIdx].name === '音频'"
+      v-show="typesForShow[currentTabIdx] && typesForShow[currentTabIdx].name === '音频'"
       class="swiper-wrapper-mine audio-wrap"
     >
       <div
@@ -93,7 +93,7 @@
           class="swiper-wrapper"
         >
           <Audio
-            v-for="(item, index) in typesToShow[currentTabIdx].list"
+            v-for="(item, index) in typesForShow[currentTabIdx].list"
             ref="audio-comp"
             :key="index"
             class="audio-custom swiper-slide"
@@ -101,7 +101,7 @@
           />
         </div>
         <div class="swiper-pagination">
-          <span class="cur">{{ currentSlideIdx + 1 }}</span> / <span>{{ typesToShow[currentTabIdx].list.length }}</span>
+          <span class="cur">{{ currentSlideIdx + 1 }}</span> / <span>{{ typesForShow[currentTabIdx].list.length }}</span>
         </div>
         <div class="swiper-button-prev" />
         <div class="swiper-button-next" />
@@ -109,7 +109,7 @@
     </div>
 
     <div
-      v-show="typesToShow[currentTabIdx] && typesToShow[currentTabIdx].name === '图片'"
+      v-show="typesForShow[currentTabIdx] && typesForShow[currentTabIdx].name === '图片'"
       class="swiper-wrapper-mine image-wrap"
     >
       <div
@@ -134,7 +134,7 @@
           class="swiper-wrapper"
         >
           <img
-            v-for="(item, index) in typesToShow[currentTabIdx].list"
+            v-for="(item, index) in typesForShow[currentTabIdx].list"
             :key="index"
             v-lazy="`https://4dkk.4dage.com/scene_edit_data/KJ-aigSkgvRWR/user/${item.url}`"
             class="swiper-slide"
@@ -143,7 +143,7 @@
           >
         </div>
         <div class="swiper-pagination">
-          <span class="cur">{{ currentSlideIdx + 1 }}</span> / <span>{{ typesToShow[currentTabIdx].list.length }}</span>
+          <span class="cur">{{ currentSlideIdx + 1 }}</span> / <span>{{ typesForShow[currentTabIdx].list.length }}</span>
         </div>
         <div class="swiper-button-prev" />
         <div class="swiper-button-next" />
@@ -152,7 +152,7 @@
 
     <div class="type-tabbar">
       <button
-        v-for="(typeItem, index) in typesToShow"
+        v-for="(typeItem, index) in typesForShow"
         :key="typeItem.name"
         class="tab"
         :class="{
@@ -274,12 +274,12 @@ export default {
     },
     titleForShow() {
       try {
-        return this.typesToShow[this.currentTabIdx].list[this.currentSlideIdx].title
+        return this.typesForShow[this.currentTabIdx].list[this.currentSlideIdx].title
       } catch (error) {
         return ''
       }
     },
-    typesToShow() {
+    typesForShow() {
       return this.types.filter((item) => {
         return item.list.length
       })
@@ -305,16 +305,16 @@ export default {
 
             on: {
               afterInit: function (e) {
-                if (that.types[vNew].key === 'video') {
+                if (that.typesForShow[vNew].key === 'video') {
                   that.$refs.video[0].play()
                 }
-                if (that.types[vNew].key === 'audio') {
+                if (that.typesForShow[vNew].key === 'audio') {
                   that.$refs['audio-comp'][0].play()
                 }
               },
               slideChange: function(e) {
                 that.currentSlideIdx = e.activeIndex
-                if (that.types[vNew].key === 'video') {
+                if (that.typesForShow[vNew].key === 'video') {
                   for (let index = 0; index < that.$refs.video.length; index++) {
                     if (index !== that.currentSlideIdx) {
                       that.$refs.video[index].pause()
@@ -323,7 +323,7 @@ export default {
                     }
                   }
                 }
-                if (that.types[vNew].key === 'audio') {
+                if (that.typesForShow[vNew].key === 'audio') {
                   for (let index = 0; index < that.$refs['audio-comp'].length; index++) {
                     if (index !== that.currentSlideIdx) {
                       that.$refs['audio-comp'][index].pause()