Merge branch 'feature/xingchao' of http://git.dev.yoho.cn/web/yohobuy into feature/xingchao
Showing
7 changed files
with
20 additions
and
13 deletions
@@ -21,9 +21,11 @@ function massageAJAX(page) { | @@ -21,9 +21,11 @@ function massageAJAX(page) { | ||
21 | }, | 21 | }, |
22 | dataType: 'html', | 22 | dataType: 'html', |
23 | success: function(data) { | 23 | success: function(data) { |
24 | + stopLoading = false; | ||
25 | + | ||
24 | if (data === '') { | 26 | if (data === '') { |
25 | stopLoading = true; | 27 | stopLoading = true; |
26 | - tip.show('没有更多了'); | 28 | + tip.show('没有更多内容了'); |
27 | } | 29 | } |
28 | 30 | ||
29 | $('.collocation-list').append(data); | 31 | $('.collocation-list').append(data); |
@@ -37,6 +39,7 @@ function massageAJAX(page) { | @@ -37,6 +39,7 @@ function massageAJAX(page) { | ||
37 | 39 | ||
38 | function scrollHandler() { | 40 | function scrollHandler() { |
39 | if (!stopLoading && ($(window).scrollTop() + $(window).height() > $('body').height() - 100)) { | 41 | if (!stopLoading && ($(window).scrollTop() + $(window).height() > $('body').height() - 100)) { |
42 | + stopLoading = true; | ||
40 | page++; | 43 | page++; |
41 | massageAJAX(page); | 44 | massageAJAX(page); |
42 | } | 45 | } |
@@ -2,6 +2,7 @@ body { | @@ -2,6 +2,7 @@ body { | ||
2 | width: 100%; | 2 | width: 100%; |
3 | background: #333; | 3 | background: #333; |
4 | font: 12px/1.5 Arial,'黑体'; | 4 | font: 12px/1.5 Arial,'黑体'; |
5 | + float: left | ||
5 | } | 6 | } |
6 | 7 | ||
7 | .star-classroom { | 8 | .star-classroom { |
@@ -694,6 +695,7 @@ body { | @@ -694,6 +695,7 @@ body { | ||
694 | 695 | ||
695 | .collocation-list { | 696 | .collocation-list { |
696 | width: 100%; | 697 | width: 100%; |
698 | + float: left; | ||
697 | 699 | ||
698 | li { | 700 | li { |
699 | float: left; | 701 | float: left; |
1 | {{# trendClassCheckIn}} | 1 | {{# trendClassCheckIn}} |
2 | {{> layout/header}} | 2 | {{> layout/header}} |
3 | - <div class="star-classroom"> | 3 | + <div class="star-classroom yoho-page"> |
4 | <div class="check-in"> | 4 | <div class="check-in"> |
5 | <div class="check-in-header"> | 5 | <div class="check-in-header"> |
6 | <div class="head-cont"> | 6 | <div class="head-cont"> |
1 | {{# trendClassCollocation}} | 1 | {{# trendClassCollocation}} |
2 | {{> layout/header}} | 2 | {{> layout/header}} |
3 | - <div class="star-classroom"> | 3 | + <div class="star-classroom yoho-page"> |
4 | {{> guang/head-tab}} | 4 | {{> guang/head-tab}} |
5 | <ul class="collocation-list"> | 5 | <ul class="collocation-list"> |
6 | {{#each collocationList}} | 6 | {{#each collocationList}} |
1 | {{# trendClassSubject}} | 1 | {{# trendClassSubject}} |
2 | {{> layout/header}} | 2 | {{> layout/header}} |
3 | - <div class="star-classroom"> | 3 | + <div class="star-classroom yoho-page"> |
4 | {{> guang/head-tab}} | 4 | {{> guang/head-tab}} |
5 | <ul class="subject-list"> | 5 | <ul class="subject-list"> |
6 | - {{#each subjectList}} | ||
7 | - <li> | ||
8 | - <a href="{{url}}"> | ||
9 | - <img src="{{img}}" /> | ||
10 | - <p>{{title}}</p> | ||
11 | - </a> | ||
12 | - </li> | 6 | + {{#each resources}} |
7 | + {{#if subject}} | ||
8 | + <li> | ||
9 | + <a href="{{url}}"> | ||
10 | + <img src="{{img}}" /> | ||
11 | + <p>{{title}}</p> | ||
12 | + </a> | ||
13 | + </li> | ||
14 | + {{/if}} | ||
13 | {{/each}} | 15 | {{/each}} |
14 | </ul> | 16 | </ul> |
15 | </div> | 17 | </div> |
-
Please register or login to post a comment