点赞bug修复、收藏品牌样式问题、收藏商品icon更换
Showing
7 changed files
with
18 additions
and
19 deletions
@@ -21,7 +21,7 @@ var $navLi = $('#fav-tab > li'), | @@ -21,7 +21,7 @@ var $navLi = $('#fav-tab > li'), | ||
21 | $brandLoadMore = $('.fav-brand-load-more'), | 21 | $brandLoadMore = $('.fav-brand-load-more'), |
22 | winH = $(window).height(), | 22 | winH = $(window).height(), |
23 | $favProductList = $('.fav-product-list'), | 23 | $favProductList = $('.fav-product-list'), |
24 | - $favBrandList = $('.fav-brand-swiper'), | 24 | + $favBrandList = $('.fav-brand-swiper-wrapper'), |
25 | pageId = 1, | 25 | pageId = 1, |
26 | brandPageId = 1, //收藏品牌的当前页数 | 26 | brandPageId = 1, //收藏品牌的当前页数 |
27 | lockId = true, | 27 | lockId = true, |
@@ -121,7 +121,7 @@ $likeBtn.bind('click', function() { | @@ -121,7 +121,7 @@ $likeBtn.bind('click', function() { | ||
121 | }).then(function(data) { | 121 | }).then(function(data) { |
122 | if (data.code === 200) { | 122 | if (data.code === 200) { |
123 | $that.closest('.suggest-type').removeClass('show'); | 123 | $that.closest('.suggest-type').removeClass('show'); |
124 | - $('.suggest-good').addClass('show'); | 124 | + $that.closest('.suggest-item').find('.suggest-good').addClass('show'); |
125 | } | 125 | } |
126 | }).fail(function(data) { | 126 | }).fail(function(data) { |
127 | 127 | ||
@@ -148,7 +148,7 @@ $disLikeBtn.bind('click', function() { | @@ -148,7 +148,7 @@ $disLikeBtn.bind('click', function() { | ||
148 | }).then(function(data) { | 148 | }).then(function(data) { |
149 | if (data.code === 200) { | 149 | if (data.code === 200) { |
150 | $that.closest('.suggest-type').removeClass('show'); | 150 | $that.closest('.suggest-type').removeClass('show'); |
151 | - $('.suggest-bad').addClass('show'); | 151 | + $that.closest('.suggest-item').find('.suggest-bad').addClass('show'); |
152 | } | 152 | } |
153 | }).fail(function(data) { | 153 | }).fail(function(data) { |
154 | 154 |
@@ -171,17 +171,14 @@ | @@ -171,17 +171,14 @@ | ||
171 | } | 171 | } |
172 | 172 | ||
173 | &.del-fav { | 173 | &.del-fav { |
174 | - $width: pxToRem(image_width(sprite-file($fav, fav-del))); | ||
175 | - $height: pxToRem(image_height(sprite-file($fav, fav-del))); | ||
176 | - | ||
177 | - @include rem-sprite($fav, fav-del); | ||
178 | - width: $width; | ||
179 | - height: $height; | ||
180 | - | 174 | + width: 2rem; |
175 | + height: 1.5rem; | ||
176 | + line-height: 1.5rem; | ||
181 | position: absolute; | 177 | position: absolute; |
182 | top: 50%; | 178 | top: 50%; |
183 | - right: pxToRem(30px); | ||
184 | - margin-top: -$height / 2; | 179 | + margin-top: -0.75rem; |
180 | + right: 0; | ||
181 | + color: #666; | ||
185 | } | 182 | } |
186 | } | 183 | } |
187 | } | 184 | } |
@@ -38,14 +38,15 @@ $suggest: sprite-map("me/suggest/*.png",$spacing: 5px); | @@ -38,14 +38,15 @@ $suggest: sprite-map("me/suggest/*.png",$spacing: 5px); | ||
38 | color: #444; | 38 | color: #444; |
39 | border-top: 1px solid #e0e0e0; | 39 | border-top: 1px solid #e0e0e0; |
40 | border-bottom: pxToRem(30px) solid #f0f0f0; | 40 | border-bottom: pxToRem(30px) solid #f0f0f0; |
41 | + overflow: hidden; | ||
41 | 42 | ||
42 | .suggest-item-img { | 43 | .suggest-item-img { |
43 | width: 100%; | 44 | width: 100%; |
44 | overflow: hidden; | 45 | overflow: hidden; |
45 | > img { | 46 | > img { |
47 | + margin: 0 auto; | ||
46 | display: block; | 48 | display: block; |
47 | - overflow: hidden; | ||
48 | - width: 100%; | 49 | + max-width: 100%; |
49 | } | 50 | } |
50 | } | 51 | } |
51 | 52 | ||
@@ -180,7 +181,8 @@ $suggest: sprite-map("me/suggest/*.png",$spacing: 5px); | @@ -180,7 +181,8 @@ $suggest: sprite-map("me/suggest/*.png",$spacing: 5px); | ||
180 | 181 | ||
181 | .img-form { | 182 | .img-form { |
182 | padding: 0 pxToRem(30px); | 183 | padding: 0 pxToRem(30px); |
183 | - float: left; | 184 | + padding-top: pxToRem(40px); |
185 | + overflow: hidden; | ||
184 | 186 | ||
185 | .upload-img-list { | 187 | .upload-img-list { |
186 | float: left; | 188 | float: left; |
@@ -17,7 +17,7 @@ | @@ -17,7 +17,7 @@ | ||
17 | <div class="fav-load-more fav-load-background hide"></div> | 17 | <div class="fav-load-more fav-load-background hide"></div> |
18 | </div> | 18 | </div> |
19 | <div class="fav-type"> | 19 | <div class="fav-type"> |
20 | - <div class="fav-brand-swiper"></div> | 20 | + <div class="fav-brand-swiper-wrapper"></div> |
21 | <div class="fav-content-loading"></div> | 21 | <div class="fav-content-loading"></div> |
22 | 22 | ||
23 | <div class="fav-null-box hide"> | 23 | <div class="fav-null-box hide"> |
@@ -24,10 +24,10 @@ | @@ -24,10 +24,10 @@ | ||
24 | <li class="swiper-slide"> | 24 | <li class="swiper-slide"> |
25 | <img class="swiper-lazy" data-src="{{imgUrl}}" alt=""/> | 25 | <img class="swiper-lazy" data-src="{{imgUrl}}" alt=""/> |
26 | <div class="brand-product"> | 26 | <div class="brand-product"> |
27 | - <p class="{{# discount}}price-discount{{/ discount}}"> | 27 | + <div class="{{# discount}}price-discount{{/ discount}}"> |
28 | {{# discount}}<span>{{.}}<span>{{/ discount}} | 28 | {{# discount}}<span>{{.}}<span>{{/ discount}} |
29 | <b>{{price}}</b> | 29 | <b>{{price}}</b> |
30 | - </p> | 30 | + </div> |
31 | </div> | 31 | </div> |
32 | <div class="swiper-lazy-preloader"></div> | 32 | <div class="swiper-lazy-preloader"></div> |
33 | </li> | 33 | </li> |
@@ -24,7 +24,7 @@ | @@ -24,7 +24,7 @@ | ||
24 | {{# sellOut}} | 24 | {{# sellOut}} |
25 | <span class="sell-out">已售罄</span> | 25 | <span class="sell-out">已售罄</span> |
26 | {{/ sellOut}} | 26 | {{/ sellOut}} |
27 | - <span class="del-fav"></span> | 27 | + <span class="del-fav iconfont"></span> |
28 | </div> | 28 | </div> |
29 | {{/ savePrice}} | 29 | {{/ savePrice}} |
30 | 30 |
-
Please register or login to post a comment