Authored by ccbikai

为您优选 优化

@@ -17,7 +17,7 @@ $.get('/home/preference').then(function(html) { @@ -17,7 +17,7 @@ $.get('/home/preference').then(function(html) {
17 recommendSwiper = new Swiper('#swiper-recommend', { 17 recommendSwiper = new Swiper('#swiper-recommend', {
18 slidesPerView: 'auto', 18 slidesPerView: 'auto',
19 grabCursor: true, 19 grabCursor: true,
20 - slideElement: 'li', 20 + slideElement: 'a',
21 lazyLoading: true, 21 lazyLoading: true,
22 watchSlidesVisibility: true 22 watchSlidesVisibility: true
23 }); 23 });
@@ -58,7 +58,7 @@ @@ -58,7 +58,7 @@
58 .old-price { 58 .old-price {
59 position: absolute; 59 position: absolute;
60 top: 0; 60 top: 0;
61 - right: pxToRem(-6px); 61 + right: pxToRem(-4px);
62 color: #b0b0b0; 62 color: #b0b0b0;
63 text-decoration: line-through; 63 text-decoration: line-through;
64 } 64 }
@@ -101,8 +101,6 @@ @@ -101,8 +101,6 @@
101 </a> 101 </a>
102 </div> 102 </div>
103 103
104 - {{#isLogin}}  
105 {{> product/recommend-for-you}} 104 {{> product/recommend-for-you}}
106 - {{/isLogin}}  
107 </div> 105 </div>
108 {{> layout/footer}} 106 {{> layout/footer}}
1 <div class="title">为您优选新品</div> 1 <div class="title">为您优选新品</div>
2 <div id="swiper-recommend" class="swiper-container"> 2 <div id="swiper-recommend" class="swiper-container">
3 - <ul class="swiper-wrapper swiper-wrapper-recommend"> 3 + <div class="swiper-wrapper swiper-wrapper-recommend">
4 {{#recommendList}} 4 {{#recommendList}}
5 - <li class="swiper-slide"> 5 + <a class="swiper-slide" href="{{url}}">
6 <img class="swiper-lazy img-box" data-src="{{thumb}}"> 6 <img class="swiper-lazy img-box" data-src="{{thumb}}">
7 <div class="price"> 7 <div class="price">
8 <span class="sale-price {{^price}}no-price{{/price}}">¥{{salePrice}}</span> 8 <span class="sale-price {{^price}}no-price{{/price}}">¥{{salePrice}}</span>
9 {{#price}}<span class="old-price">¥{{.}}</span>{{/price}} 9 {{#price}}<span class="old-price">¥{{.}}</span>{{/price}}
10 </div> 10 </div>
11 <div class="swiper-lazy-preloader"></div> 11 <div class="swiper-lazy-preloader"></div>
12 - </li> 12 + </a>
13 {{/recommendList}} 13 {{/recommendList}}
14 - </ul> 14 + </div>
15 </div> 15 </div>