Showing
3 changed files
with
6 additions
and
12 deletions
@@ -243,8 +243,7 @@ | @@ -243,8 +243,7 @@ | ||
243 | publishTime: '', | 243 | publishTime: '', |
244 | pageView: '', | 244 | pageView: '', |
245 | like: { | 245 | like: { |
246 | - isLiked: true, | ||
247 | - count: 1 | 246 | + isLiked: true |
248 | }, | 247 | }, |
249 | share: false, | 248 | share: false, |
250 | isFashionMan: true, //标签分类:isTip、isCollocation、isFashionMan、isFashionGood、isTopic | 249 | isFashionMan: true, //标签分类:isTip、isCollocation、isFashionMan、isFashionGood、isTopic |
@@ -18,7 +18,7 @@ var $infoList = $('#info-list'), | @@ -18,7 +18,7 @@ var $infoList = $('#info-list'), | ||
18 | $infos = $infoList.children('.info-list'), | 18 | $infos = $infoList.children('.info-list'), |
19 | $nav = $('#guang-nav'), | 19 | $nav = $('#guang-nav'), |
20 | $curNav = $nav.children('.focus'), | 20 | $curNav = $nav.children('.focus'), |
21 | - curIndex = $curNav.index(); | 21 | + curType = $curNav.data('type'); |
22 | 22 | ||
23 | var state = {}; | 23 | var state = {}; |
24 | 24 | ||
@@ -67,15 +67,11 @@ $nav.delegate('.guang-nav-item', 'touchstart', function() { | @@ -67,15 +67,11 @@ $nav.delegate('.guang-nav-item', 'touchstart', function() { | ||
67 | setLazyLoadAndMellipsis($content.children('.guang-info')); | 67 | setLazyLoadAndMellipsis($content.children('.guang-info')); |
68 | 68 | ||
69 | $curNav = $this; | 69 | $curNav = $this; |
70 | - curIndex = index; | 70 | + curType = $this.data('type'); |
71 | }); | 71 | }); |
72 | 72 | ||
73 | $(document).scroll(function() { | 73 | $(document).scroll(function() { |
74 | - if (state[curIndex].end) { | ||
75 | - return; | ||
76 | - } | ||
77 | - | ||
78 | - if ($(window).scrollTop() + winH >= $(document).height() - loadMoreH) { | ||
79 | - loadMore($infos, state[curIndex]); | 74 | + if ($(window).scrollTop() + winH >= $(document).height() - loadMoreH && !state[curType].end) { |
75 | + loadMore($infos, state[curType]); | ||
80 | } | 76 | } |
81 | }); | 77 | }); |
@@ -5,8 +5,7 @@ | @@ -5,8 +5,7 @@ | ||
5 | <span class="page-view">{{pageView}}</span> | 5 | <span class="page-view">{{pageView}}</span> |
6 | <div class="like-share-container"> | 6 | <div class="like-share-container"> |
7 | {{# like}} | 7 | {{# like}} |
8 | - <a href="javascript:;" class="iconfont like-btn{{#isLiked}} like{{/isLiked}}"></a> | ||
9 | - <span class="like-count">{{count}}</span> | 8 | + <a href="javascript:;" class="iconfont like-btn{{#isLiked}} like{{/isLiked}}"></a> |
10 | {{/ like}} | 9 | {{/ like}} |
11 | {{# share}} | 10 | {{# share}} |
12 | <a href="{{.}}" class="iconfont share-btn"></a> | 11 | <a href="{{.}}" class="iconfont share-btn"></a> |
-
Please register or login to post a comment