Authored by uedxwg

'upadte'

var $ = require('jquery'),
Hammer = require('yoho.hammer');
Swiper = require('yoho.iswiper'),
lazyLoad = require('yoho.lazyload');
Hammer = require('yoho.hammer'),
Swiper = require('yoho.iswiper'),
lazyLoad = require('yoho.lazyload');
var page = 1,
winH,
hotnav,
listTop,
navSwiper,
sort = '',
id = '';
function hotrank(page, sort, tab_id) {
function hotrank(page, sort, tabId) {
$.ajax({
type: 'GET',
url: '/product/newsale/selectHotrank',
... ... @@ -18,7 +19,7 @@ function hotrank(page, sort, tab_id) {
data: {
page: page,
sort: sort,
tab_id: tab_id
tab_id: tabId
},
success: function(data) {
if (page === 1) {
... ... @@ -27,6 +28,7 @@ function hotrank(page, sort, tab_id) {
$('#hotRank').append(data);
lazyLoad($('img.lazy'));
$('#yoho-footer').css('position', 'static');
$('.rank-main ul li:gt(2)').find('.item-content i').removeClass('top');
navSwiper = new Swiper('.s-goods-nav', {
grabCursor: true,
slidesPerView: 'auto',
... ... @@ -38,8 +40,11 @@ function hotrank(page, sort, tab_id) {
$('.s-goods-nav .nav-item').each(function(index) {
hotnav = new Hammer($('.s-goods-nav .nav-item')[index]);
hotnav.on('tap', function(e) {
id = $('.s-goods-nav .nav-item').eq(index).data('id'),
sort = parseInt($('.s-goods-nav .nav-item').eq(index).data('sort').split('=')[1]);
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);
});
});
... ...
... ... @@ -2,6 +2,7 @@
width: 100%;
height: auto;
overflow: hidden;
margin-top: 20rem / $pxConvertRem;
background-color:#fff;
border-bottom:1px solid #e0e0e0;
ul{
... ...
... ... @@ -38,12 +38,12 @@
text-align: center;
font-size: 22rem / $pxConvertRem;
color: #fff;
// background: image-url("sale-icon/rank.png") no-repeat;
background: url("../img/me/employ/rank.png") no-repeat;
background-position: center top;
background-size: auto 100%;
&.top {
// background: image-url("sale-icon/rank-t.png") no-repeat;
background: url("../img/me/employ/rank-t.png") no-repeat;
background-position: center top;
background-size: 100%;
line-height: 58rem / $pxConvertRem;
... ...
... ... @@ -161,8 +161,10 @@ class HomeController extends AbstractAction
*/
public function couponsAction()
{
// $uid = $this->getUid();
$this->setTitle('优惠券');
$this->setNavHeader('优惠券', true, SITE_MAIN);
// $uid = $this->getUid();
$uid = 967016;
$status = $this->get('status', 0);
$coupons = array(
... ...