Authored by uedxwg

'hotrank'

var $ = require('jquery');
var $ = require('jquery'),
Swiper = require('yoho.iswiper'),
lazyLoad = require('yoho.lazyload');
$.ajax({
type: 'GET',
url: '/product/newsale/selectHotrank',
dataType: 'html',
success: function(date) {
$('#hotRank').append(date);
$('#yoho-footer').css('position', 'static');
}
});
\ No newline at end of file
var navSwiper;
function hotrank(){
$.ajax({
type: 'GET',
url: '/product/newsale/selectHotrank',
dataType: 'html',
data: {
page: 1
},
success: function(data) {
$('#hotRank').append(data);
lazyLoad($('img.lazy'));
$('#yoho-footer').css('position', 'static');
navSwiper = new Swiper('.s-goods-nav', {
grabCursor: true,
slidesPerView: 'auto',
slideElement: 'li'
});
}
});
}
hotrank();
... ...
... ... @@ -10,7 +10,6 @@
</ul>
</div>
{{# goods}}
<div class="rank-main">
<ul>
{{# goods}}
... ... @@ -31,5 +30,4 @@
</li>
{{/ goods}}
</ul>
</div>
{{/ goods}}
\ No newline at end of file
</div>
\ No newline at end of file
... ...
... ... @@ -89,7 +89,6 @@ class NewsaleController extends AbstractAction
'cartUrl' => Helpers::url('/product/newsale/selectHotrank', null),
);
// print_r($data);
$this->_view->display('hotrank', $data);
}
... ... @@ -105,7 +104,7 @@ class NewsaleController extends AbstractAction
if ($this->isAjax()) {
$sort = $this->get('sort', null);
$tab_id = $this->get('tab_id', null);
$limit = $this->get('limit', 50);
$limit = $this->get('limit', 34);
$page = $this->get('page', 1);
// 获取性别
... ... @@ -115,11 +114,10 @@ class NewsaleController extends AbstractAction
$result = \Product\NewsaleModel::selectTopData($data);
}
// print_r($result);
if (empty($result)) {
echo ' ';
} else {
$this->_view->display('hotList', $result);
$this->_view->display('hotlist', $result);
}
}
... ...