Authored by uedxwg

'hotrank'

... ... @@ -8,10 +8,11 @@ var page = 1,
hotnav,
listTop,
navSwiper,
notab,
sort = '',
id = '';
function hotrank(page, sort, tabId) {
function hotrank(page, sort, tabId, notab) {
$.ajax({
type: 'GET',
url: '/product/newsale/selectHotrank',
... ... @@ -19,13 +20,19 @@ function hotrank(page, sort, tabId) {
data: {
page: page,
sort: sort,
tab_id: tabId
tab_id: tabId,
notab: notab
},
success: function(data) {
if (page === 1) {
$('#hotRank').html('');
$('.rank-main').html('');
}
console.log(notab);
if (notab === 1) {
$('.rank-main').append(data);
} else {
$('#hotRank').append(data);
};
lazyLoad($('img.lazy'));
$('#yoho-footer').css('position', 'static');
$('.rank-main ul li:gt(2)').find('.item-content i').removeClass('top');
... ... @@ -43,9 +50,9 @@ function hotrank(page, sort, tabId) {
var navItme = $('.s-goods-nav .nav-item').eq(index);
id = navItme.data('id') ? navItme.data('id') : '';
sort = navItme.data('sort') ? navItme.data('sort') : '';
page = 1;
hotrank(page, sort, id);
notab = 1;
hotrank(page, sort, id, notab);
});
});
}
... ... @@ -60,7 +67,8 @@ $(window).scroll(function () {
return;
}
page = 2;
hotrank(page, sort, id);
notab = 1;
hotrank(page, sort, id, notab);
});
hotrank(page, sort, id);
... ...
... ... @@ -166,12 +166,14 @@ class HomeController extends AbstractAction
$this->setTitle('优惠券');
$this->setNavHeader('优惠券', true, SITE_MAIN);
// $uid = $this->getUid();
$uid = 967016;
$uid = 8826435;
$status = $this->get('status', 0);
$coupons = array(
'couponsUrl' => \Index\UserModel::getCouponData($uid, $status),
'couponsPage' => true
);
print_r($coupons);
$this->_view->display('coupons', $coupons);
}
... ...