Authored by 王水玲

首页新人专享修改

@@ -149,9 +149,13 @@ if ($('.trend-topic-swiper').find('li').size() > 1) { @@ -149,9 +149,13 @@ if ($('.trend-topic-swiper').find('li').size() > 1) {
149 // 新人专享轮播 149 // 新人专享轮播
150 if ($('.fresh-list-swiper').find('li').size() > 1) { 150 if ($('.fresh-list-swiper').find('li').size() > 1) {
151 freshSwiper = new Swiper('.fresh-list-swiper', { 151 freshSwiper = new Swiper('.fresh-list-swiper', {
  152 + lazyLoading: true,
  153 + lazyLoadingInPrevNext: true,
152 grabCursor: true, 154 grabCursor: true,
153 slidesPerView: 'auto', 155 slidesPerView: 'auto',
154 - slideElement: 'li' 156 + slideElement: 'li',
  157 + watchSlidesProgress : true,
  158 + watchSlidesVisibility : true,
155 }); 159 });
156 } 160 }
157 161
1 .fresh-swiper { 1 .fresh-swiper {
2 position: relative; 2 position: relative;
3 - height: 200rem / $pxConvertRem; 3 + height: 200px;
4 overflow: hidden; 4 overflow: hidden;
5 ul { 5 ul {
6 li { 6 li {
@@ -17,17 +17,17 @@ @@ -17,17 +17,17 @@
17 position: absolute; 17 position: absolute;
18 left: 0; 18 left: 0;
19 right: 0; 19 right: 0;
20 - bottom: 20rem / $pxConvertRem; 20 + bottom: 20px;
21 text-align: center; 21 text-align: center;
22 .pagination-inner { 22 .pagination-inner {
23 display: inline-block; 23 display: inline-block;
24 span { 24 span {
25 display: inline-block; 25 display: inline-block;
26 - width: 14rem / $pxConvertRem;  
27 - height: 14rem / $pxConvertRem; 26 + width: 14px;
  27 + height: 14px;
28 background: #fff; 28 background: #fff;
29 opacity: 0.5; 29 opacity: 0.5;
30 - margin: 0 (9rem / $pxConvertRem); 30 + margin: 0 9px;
31 border-radius: 50%; 31 border-radius: 50%;
32 } 32 }
33 span.swiper-active-switch { 33 span.swiper-active-switch {
@@ -46,21 +46,22 @@ @@ -46,21 +46,22 @@
46 46
47 li { 47 li {
48 float:left; 48 float:left;
49 - width:240rem / $pxConvertRem;  
50 - margin: (20rem / $pxConvertRem) (10rem / $pxConvertRem) 0 (10rem / $pxConvertRem); 49 + width:240px;
  50 + margin: 20px 10px 0 10px;
51 51
52 &:first-child { 52 &:first-child {
53 - margin-left: 20rem / $pxConvertRem; 53 + margin-left: 20px;
54 } 54 }
55 55
56 &:last-child { 56 &:last-child {
57 - margin-right: 20rem / $pxConvertRem; 57 + margin-right: 20px;
58 } 58 }
59 59
60 .img-box { 60 .img-box {
61 height: 100%; 61 height: 100%;
62 - height:320rem / $pxConvertRem; 62 + height:320px;
63 text-align: center; 63 text-align: center;
  64 + position: relative;
64 img { 65 img {
65 width: 100%; 66 width: 100%;
66 height: 100%; 67 height: 100%;
@@ -69,8 +70,6 @@ @@ -69,8 +70,6 @@
69 } 70 }
70 71
71 .fresh-info { 72 .fresh-info {
72 - font-size: 22px / $pxConvertRem;  
73 -  
74 .fresh-name a{ 73 .fresh-name a{
75 display:block; 74 display:block;
76 overflow: hidden; 75 overflow: hidden;
@@ -78,30 +77,34 @@ @@ -78,30 +77,34 @@
78 width: 100%; 77 width: 100%;
79 white-space: nowrap; 78 white-space: nowrap;
80 color: #444; 79 color: #444;
81 - line-height: 48rem / $pxConvertRem; 80 + line-height: 48px;
  81 + font-size: 22px;
82 82
83 } 83 }
84 84
85 .cur-price { 85 .cur-price {
86 color: #d62927; 86 color: #d62927;
  87 + font-size: 22px;
87 } 88 }
88 89
89 .old-price { 90 .old-price {
90 - margin: 0 0 0 (10rem / $pxConvertRem); 91 + margin: 0 0 0 10px;
91 color: #b0b0b0; 92 color: #b0b0b0;
92 text-decoration: line-through; 93 text-decoration: line-through;
  94 + font-size: 22px;
93 } 95 }
94 96
95 .fresh-icon { 97 .fresh-icon {
96 background: #d62927; 98 background: #d62927;
97 - width: 100rem / $pxConvertRem;  
98 - height: 33 / $pxConvertRem; 99 + width: 100px;
  100 + height: 33px;
99 display: block; 101 display: block;
100 - margin: (8rem / $pxConvertRem) auto 0 auto; 102 + margin: 8px auto 0 auto;
101 color: #fff; 103 color: #fff;
102 text-align: center; 104 text-align: center;
103 - border-radius: 40rem / $pxConvertRem;  
104 - line-height: 37rem / $pxConvertRem; 105 + border-radius: 40px;
  106 + line-height: 37px;
  107 + font-size:12px;
105 } 108 }
106 } 109 }
107 } 110 }
@@ -17,6 +17,7 @@ @@ -17,6 +17,7 @@
17 @import "hot-category"; 17 @import "hot-category";
18 @import "home-header"; 18 @import "home-header";
19 @import "thumb-row"; 19 @import "thumb-row";
  20 +@import "fresh-only";
20 21
21 .mobile-container{ 22 .mobile-container{
22 width: 100%; 23 width: 100%;
@@ -13,8 +13,9 @@ @@ -13,8 +13,9 @@
13 <li class="swiper-slide"> 13 <li class="swiper-slide">
14 <div class="img-box"> 14 <div class="img-box">
15 <a href="{{url}}"> 15 <a href="{{url}}">
16 - <img class="lazy" data-original="{{img}}" alt=""> 16 + <img class="swiper-lazy" data-src="{{img}}" alt="">
17 </a> 17 </a>
  18 + <div class="swiper-lazy-preloader"></div>
18 </div> 19 </div>
19 <div class="fresh-info"> 20 <div class="fresh-info">
20 <p class="fresh-name"><a href="{{url}}">{{title}}</a></p> 21 <p class="fresh-name"><a href="{{url}}">{{title}}</a></p>
@@ -25,5 +26,4 @@ @@ -25,5 +26,4 @@
25 {{/ list}} 26 {{/ list}}
26 </ul> 27 </ul>
27 </div> 28 </div>
28 -  
29 </div> 29 </div>