Browse Source

Merge remote-tracking branch 'origin/master'

wangcz 8 years ago
parent
commit
61a440e728
3 changed files with 16 additions and 2 deletions
  1. 2 0
      components/default/Header.vue
  2. 7 1
      components/home/Carousel.vue
  3. 7 1
      components/provider/Carousel.vue

+ 2 - 0
components/default/Header.vue

@@ -304,6 +304,7 @@
               font-size: 12px;
               >span:nth-child(1) {
                 cursor: default;
+                font-weight: bold;
               }
               input {
                 width: 174px;
@@ -353,6 +354,7 @@
                   color: #333;
                   max-width: 300px;
                   line-height: 30px;
+                  width: auto;
                   &:hover {
                     color: #5078cb;
                     text-decoration: none!important;

+ 7 - 1
components/home/Carousel.vue

@@ -31,6 +31,8 @@
         swiperOption: {
           autoplay: 6000,
           pagination: '.swiper-pagination',
+          // 解决点击分页器后图片就不能轮播的问题
+          autoplayDisableOnInteraction: false,
           paginationClickable: true,
           mousewheelControl: false,
           effect: 'fade',
@@ -55,7 +57,11 @@
     },
     computed: {
       banners () {
-        return this.$store.state.carousel.banners
+        let banner = this.$store.state.carousel.banners
+        banner.data.sort(function (a, b) {
+          return a.orderNumber - b.orderNumber
+        })
+        return banner
       },
       activeColor () {
         return this.banners.data.length ? this.banners.data[this.activeSlide].metadata['background-color'] : null

+ 7 - 1
components/provider/Carousel.vue

@@ -26,6 +26,8 @@
           loop: true,
           effect: 'fade',
           lazyLoading: true,
+          // 解决点击分页器后图片就不能轮播的问题
+          autoplayDisableOnInteraction: false,
           pagination: '.swiper-pagination',
           paginationClickable: true,
           paginationElement: 'li',
@@ -44,7 +46,11 @@
 //    }
     computed: {
       banners () {
-        return this.$store.state.carousel.banners.data
+        let banner = this.$store.state.carousel.banners
+        banner.data.sort(function (a, b) {
+          return a.orderNumber - b.orderNumber
+        })
+        return banner.data
       }
     }
   }