Authored by lore-w

点赞参数、刷新页面错乱

@@ -15,6 +15,7 @@ fonts_dir = "public/fonts" @@ -15,6 +15,7 @@ fonts_dir = "public/fonts"
15 15
16 # To enable relative paths to assets via compass helper functions. Uncomment: 16 # To enable relative paths to assets via compass helper functions. Uncomment:
17 relative_assets = true 17 relative_assets = true
  18 + sourcemap = true
18 19
19 # To disable debugging comments that display the original location of your selectors. Uncomment: 20 # To disable debugging comments that display the original location of your selectors. Uncomment:
20 line_comments = false 21 line_comments = false
@@ -40,7 +40,10 @@ $('.saunter-nav li').each(function() { @@ -40,7 +40,10 @@ $('.saunter-nav li').each(function() {
40 }); 40 });
41 41
42 swiper = new Swiper('.swiper-container', { 42 swiper = new Swiper('.swiper-container', {
43 - pagination: '.swiper-pagination' 43 + pagination: '.swiper-pagination',
  44 + lazyLoading: true,
  45 + lazyLoadingInPrevNext: true,
  46 + autoplayDisableOnInteraction: false
44 }); 47 });
45 48
46 lazyLoad(); 49 lazyLoad();
@@ -202,7 +205,8 @@ $('.msg-list').delegate('.like-btn', 'touchstart', function(e) { @@ -202,7 +205,8 @@ $('.msg-list').delegate('.like-btn', 'touchstart', function(e) {
202 var $cur = $(e.currentTarget), 205 var $cur = $(e.currentTarget),
203 $info = $cur.closest('.tag-content'), 206 $info = $cur.closest('.tag-content'),
204 id = $info.data('id'), 207 id = $info.data('id'),
205 - url; 208 + url,
  209 + udid = $('.client-ip').val();
206 210
207 $cur.toggleClass('like'); 211 $cur.toggleClass('like');
208 212
@@ -215,7 +219,8 @@ $('.msg-list').delegate('.like-btn', 'touchstart', function(e) { @@ -215,7 +219,8 @@ $('.msg-list').delegate('.like-btn', 'touchstart', function(e) {
215 type: 'GET', 219 type: 'GET',
216 url: url, 220 url: url,
217 data: { 221 data: {
218 - id: id 222 + id: id,
  223 + udid: udid
219 } 224 }
220 }).then(function(data) { 225 }).then(function(data) {
221 if (data.code === 200) { 226 if (data.code === 200) {
@@ -5,8 +5,9 @@ @@ -5,8 +5,9 @@
5 {{# swiper}} 5 {{# swiper}}
6 <div class="swiper-slide"> 6 <div class="swiper-slide">
7 <a href="{{url}}"> 7 <a href="{{url}}">
8 - <img src="{{img}}"> 8 + <img class="swiper-lazy" data-src="{{img}}">
9 </a> 9 </a>
  10 + <div class="swiper-lazy-preloader"></div>
10 </div> 11 </div>
11 {{/ swiper}} 12 {{/ swiper}}
12 </div> 13 </div>
@@ -27,4 +28,5 @@ @@ -27,4 +28,5 @@
27 <input id="query" type="hidden" value="{{query}}"> 28 <input id="query" type="hidden" value="{{query}}">
28 <input id="gender" type="hidden" value="{{gender}}"> 29 <input id="gender" type="hidden" value="{{gender}}">
29 <input id="client-type" type="hidden" value="{{client_type}}"> 30 <input id="client-type" type="hidden" value="{{client_type}}">
  31 + <input id="client-ip" type="hidden" value="{{udid}}">
30 {{/ data}} 32 {{/ data}}