Authored by uedxwg

'hotrank'

@@ -8,10 +8,11 @@ var page = 1, @@ -8,10 +8,11 @@ var page = 1,
8 hotnav, 8 hotnav,
9 listTop, 9 listTop,
10 navSwiper, 10 navSwiper,
  11 + notab,
11 sort = '', 12 sort = '',
12 id = ''; 13 id = '';
13 14
14 -function hotrank(page, sort, tabId) { 15 +function hotrank(page, sort, tabId, notab) {
15 $.ajax({ 16 $.ajax({
16 type: 'GET', 17 type: 'GET',
17 url: '/product/newsale/selectHotrank', 18 url: '/product/newsale/selectHotrank',
@@ -19,13 +20,19 @@ function hotrank(page, sort, tabId) { @@ -19,13 +20,19 @@ function hotrank(page, sort, tabId) {
19 data: { 20 data: {
20 page: page, 21 page: page,
21 sort: sort, 22 sort: sort,
22 - tab_id: tabId 23 + tab_id: tabId,
  24 + notab: notab
23 }, 25 },
24 success: function(data) { 26 success: function(data) {
25 if (page === 1) { 27 if (page === 1) {
26 - $('#hotRank').html(''); 28 + $('.rank-main').html('');
27 } 29 }
  30 + console.log(notab);
  31 + if (notab === 1) {
  32 + $('.rank-main').append(data);
  33 + } else {
28 $('#hotRank').append(data); 34 $('#hotRank').append(data);
  35 + };
29 lazyLoad($('img.lazy')); 36 lazyLoad($('img.lazy'));
30 $('#yoho-footer').css('position', 'static'); 37 $('#yoho-footer').css('position', 'static');
31 $('.rank-main ul li:gt(2)').find('.item-content i').removeClass('top'); 38 $('.rank-main ul li:gt(2)').find('.item-content i').removeClass('top');
@@ -43,9 +50,9 @@ function hotrank(page, sort, tabId) { @@ -43,9 +50,9 @@ function hotrank(page, sort, tabId) {
43 var navItme = $('.s-goods-nav .nav-item').eq(index); 50 var navItme = $('.s-goods-nav .nav-item').eq(index);
44 51
45 id = navItme.data('id') ? navItme.data('id') : ''; 52 id = navItme.data('id') ? navItme.data('id') : '';
46 - sort = navItme.data('sort') ? navItme.data('sort') : '';  
47 page = 1; 53 page = 1;
48 - hotrank(page, sort, id); 54 + notab = 1;
  55 + hotrank(page, sort, id, notab);
49 }); 56 });
50 }); 57 });
51 } 58 }
@@ -60,7 +67,8 @@ $(window).scroll(function () { @@ -60,7 +67,8 @@ $(window).scroll(function () {
60 return; 67 return;
61 } 68 }
62 page = 2; 69 page = 2;
63 - hotrank(page, sort, id); 70 + notab = 1;
  71 + hotrank(page, sort, id, notab);
64 72
65 }); 73 });
66 hotrank(page, sort, id); 74 hotrank(page, sort, id);
@@ -166,12 +166,14 @@ class HomeController extends AbstractAction @@ -166,12 +166,14 @@ class HomeController extends AbstractAction
166 $this->setTitle('优惠券'); 166 $this->setTitle('优惠券');
167 $this->setNavHeader('优惠券', true, SITE_MAIN); 167 $this->setNavHeader('优惠券', true, SITE_MAIN);
168 // $uid = $this->getUid(); 168 // $uid = $this->getUid();
169 - $uid = 967016; 169 + $uid = 8826435;
170 $status = $this->get('status', 0); 170 $status = $this->get('status', 0);
171 $coupons = array( 171 $coupons = array(
172 'couponsUrl' => \Index\UserModel::getCouponData($uid, $status), 172 'couponsUrl' => \Index\UserModel::getCouponData($uid, $status),
173 'couponsPage' => true 173 'couponsPage' => true
174 ); 174 );
  175 +
  176 + print_r($coupons);
175 $this->_view->display('coupons', $coupons); 177 $this->_view->display('coupons', $coupons);
176 178
177 } 179 }