luguang 2 月之前
父节点
当前提交
17dcbfd4ba
共有 1 个文件被更改,包括 16 次插入7 次删除
  1. 16 7
      src/views/index.vue

+ 16 - 7
src/views/index.vue

@@ -189,15 +189,24 @@ export default {
             spaceBetween: 5
           }
         }
-        this.dayInfoList = retObj.dayList
+        if (retObj.dayList.length > 0) {
+          this.dayInfoList = retObj.dayList
+        }
         if (this.dayInfoList.length > 1) {
-          this.$set(
-            this.swiperOptionsTop,
-            'autoplay',
-            this.defSecuritiesAutoplay
-          )
+          this.swiperOptionsTop = {
+            direction: 'vertical',
+            // 循环不间断图片连在一起
+            loop: true,
+            // 循环时间(毫秒)
+            autoplay: this.defSecuritiesAutoplay,
+            speed: 1000
+          }
         } else {
-          this.$set(this.swiperOptionsTop, 'autoplay', 0)
+          this.swiperOptionsTop = {
+            direction: 'vertical',
+            // 循环时间(毫秒)
+            autoplay: 0,
+          }
         }
         this.proportionInfo = retObj.proportionInfo
         this.planList = retObj.planList