luguang 1 month ago
parent
commit
87f28e64c1
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/views/index.vue

+ 3 - 3
src/views/index.vue

@@ -158,17 +158,17 @@ export default {
       const { retObj, code } = await getInfo()
       if (code === 0) {
         this.swiperList = retObj.wareList
-        if (this.swiperList.length < 5) {
+        if (this.swiperList.length > 5) {
           this.swiperOptions = {
             loop: true,
-            autoplay: 0,
+            autoplay: this.defWareAutoplay,
             slidesPerView: 5,
             spaceBetween: 5
           }
         } else {
           this.swiperOptions = {
             loop: true,
-            autoplay: this.defWareAutoplay,
+            autoplay: 0,
             slidesPerView: 5,
             spaceBetween: 5
           }