Authored by uedxwg

hotrand

@@ -13,10 +13,9 @@ var page = 1, @@ -13,10 +13,9 @@ var page = 1,
13 id = ''; 13 id = '';
14 14
15 function hotrank(page, sort, tabId, notab) { 15 function hotrank(page, sort, tabId, notab) {
16 - console.log(sort);  
17 $.ajax({ 16 $.ajax({
18 type: 'GET', 17 type: 'GET',
19 - url: '/product/newsale/selectHotrank?'+sort, 18 + url: '/product/newsale/selectHotrank?' + sort,
20 dataType: 'html', 19 dataType: 'html',
21 data: { 20 data: {
22 page: page, 21 page: page,
@@ -25,14 +24,9 @@ function hotrank(page, sort, tabId, notab) { @@ -25,14 +24,9 @@ function hotrank(page, sort, tabId, notab) {
25 }, 24 },
26 success: function(data) { 25 success: function(data) {
27 if (page === 1) { 26 if (page === 1) {
28 - $('.rank-main').html('');  
29 - }  
30 - console.log(notab);  
31 - if (notab === 1) {  
32 - $('.rank-main').append(data);  
33 - } else {  
34 - $('#hotRank').append(data); 27 + $('.rank-main').remove();
35 } 28 }
  29 + $('#hotRank').append(data);
36 lazyLoad($('img.lazy')); 30 lazyLoad($('img.lazy'));
37 $('#yoho-footer').css('position', 'static'); 31 $('#yoho-footer').css('position', 'static');
38 $('.rank-main ul li:gt(2)').find('.item-content i').removeClass('top'); 32 $('.rank-main ul li:gt(2)').find('.item-content i').removeClass('top');
@@ -48,6 +42,7 @@ function hotrank(page, sort, tabId, notab) { @@ -48,6 +42,7 @@ function hotrank(page, sort, tabId, notab) {
48 hotnav = new Hammer($('.s-goods-nav .nav-item')[index]); 42 hotnav = new Hammer($('.s-goods-nav .nav-item')[index]);
49 hotnav.on('tap', function(e) { 43 hotnav.on('tap', function(e) {
50 var navItme = $('.s-goods-nav .nav-item').eq(index); 44 var navItme = $('.s-goods-nav .nav-item').eq(index);
  45 +
51 id = navItme.data('id') ? navItme.data('id') : ''; 46 id = navItme.data('id') ? navItme.data('id') : '';
52 sort = navItme.data('sort') ? navItme.data('sort') : ''; 47 sort = navItme.data('sort') ? navItme.data('sort') : '';
53 page = 1; 48 page = 1;
@@ -46,7 +46,7 @@ @@ -46,7 +46,7 @@
46 background: url("../img/me/employ/rank-t.png") no-repeat; 46 background: url("../img/me/employ/rank-t.png") no-repeat;
47 background-position: center top; 47 background-position: center top;
48 background-size: 100%; 48 background-size: 100%;
49 - line-height: 58rem / $pxConvertRem; 49 + line-height: 54rem / $pxConvertRem;
50 } 50 }
51 } 51 }
52 52
  1 +{{#if tabs}}
1 <div class="s-goods-nav goods-nav"> 2 <div class="s-goods-nav goods-nav">
2 <ul class="swiper-wrapper clearfix"> 3 <ul class="swiper-wrapper clearfix">
3 - {{# tabs}} 4 + {{# tabs}}
4 {{# title}} 5 {{# title}}
5 <li class="swiper-slide nav-item" data-sort="{{ params}}" data-id="{{ id}}"> 6 <li class="swiper-slide nav-item" data-sort="{{ params}}" data-id="{{ id}}">
6 <span>{{ name}}</span> 7 <span>{{ name}}</span>
7 </li> 8 </li>
8 {{/ title}} 9 {{/ title}}
9 - {{/ tabs}} 10 + {{/ tabs}}
10 </ul> 11 </ul>
11 </div> 12 </div>
12 - 13 +{{/if}}
13 <div class="rank-main"> 14 <div class="rank-main">
14 <ul> 15 <ul>
15 {{# goods}} 16 {{# goods}}
@@ -175,6 +175,7 @@ class HomeController extends AbstractAction @@ -175,6 +175,7 @@ class HomeController extends AbstractAction
175 'couponsPage' => true 175 'couponsPage' => true
176 ); 176 );
177 177
  178 + print_r($coupons);
178 $this->_view->display('coupons', $coupons); 179 $this->_view->display('coupons', $coupons);
179 180
180 } 181 }