Authored by uedxwg

'upadte'

1 var $ = require('jquery'), 1 var $ = require('jquery'),
2 - Hammer = require('yoho.hammer');  
3 -  
4 -Swiper = require('yoho.iswiper'),  
5 -lazyLoad = require('yoho.lazyload'); 2 + Hammer = require('yoho.hammer'),
  3 + Swiper = require('yoho.iswiper'),
  4 + lazyLoad = require('yoho.lazyload');
6 5
7 var page = 1, 6 var page = 1,
8 winH, 7 winH,
9 hotnav, 8 hotnav,
  9 + listTop,
  10 + navSwiper,
10 sort = '', 11 sort = '',
11 id = ''; 12 id = '';
12 13
13 -function hotrank(page, sort, tab_id) { 14 +function hotrank(page, sort, tabId) {
14 $.ajax({ 15 $.ajax({
15 type: 'GET', 16 type: 'GET',
16 url: '/product/newsale/selectHotrank', 17 url: '/product/newsale/selectHotrank',
@@ -18,7 +19,7 @@ function hotrank(page, sort, tab_id) { @@ -18,7 +19,7 @@ function hotrank(page, sort, tab_id) {
18 data: { 19 data: {
19 page: page, 20 page: page,
20 sort: sort, 21 sort: sort,
21 - tab_id: tab_id 22 + tab_id: tabId
22 }, 23 },
23 success: function(data) { 24 success: function(data) {
24 if (page === 1) { 25 if (page === 1) {
@@ -27,6 +28,7 @@ function hotrank(page, sort, tab_id) { @@ -27,6 +28,7 @@ function hotrank(page, sort, tab_id) {
27 $('#hotRank').append(data); 28 $('#hotRank').append(data);
28 lazyLoad($('img.lazy')); 29 lazyLoad($('img.lazy'));
29 $('#yoho-footer').css('position', 'static'); 30 $('#yoho-footer').css('position', 'static');
  31 + $('.rank-main ul li:gt(2)').find('.item-content i').removeClass('top');
30 navSwiper = new Swiper('.s-goods-nav', { 32 navSwiper = new Swiper('.s-goods-nav', {
31 grabCursor: true, 33 grabCursor: true,
32 slidesPerView: 'auto', 34 slidesPerView: 'auto',
@@ -38,8 +40,11 @@ function hotrank(page, sort, tab_id) { @@ -38,8 +40,11 @@ function hotrank(page, sort, tab_id) {
38 $('.s-goods-nav .nav-item').each(function(index) { 40 $('.s-goods-nav .nav-item').each(function(index) {
39 hotnav = new Hammer($('.s-goods-nav .nav-item')[index]); 41 hotnav = new Hammer($('.s-goods-nav .nav-item')[index]);
40 hotnav.on('tap', function(e) { 42 hotnav.on('tap', function(e) {
41 - id = $('.s-goods-nav .nav-item').eq(index).data('id'),  
42 - sort = parseInt($('.s-goods-nav .nav-item').eq(index).data('sort').split('=')[1]); 43 + var navItme = $('.s-goods-nav .nav-item').eq(index);
  44 +
  45 + id = navItme.data('id') ? navItme.data('id') : '';
  46 + sort = navItme.data('sort') ? navItme.data('sort') : '';
  47 + page = 1;
43 hotrank(page, sort, id); 48 hotrank(page, sort, id);
44 }); 49 });
45 }); 50 });
@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
2 width: 100%; 2 width: 100%;
3 height: auto; 3 height: auto;
4 overflow: hidden; 4 overflow: hidden;
  5 + margin-top: 20rem / $pxConvertRem;
5 background-color:#fff; 6 background-color:#fff;
6 border-bottom:1px solid #e0e0e0; 7 border-bottom:1px solid #e0e0e0;
7 ul{ 8 ul{
@@ -38,12 +38,12 @@ @@ -38,12 +38,12 @@
38 text-align: center; 38 text-align: center;
39 font-size: 22rem / $pxConvertRem; 39 font-size: 22rem / $pxConvertRem;
40 color: #fff; 40 color: #fff;
41 - // background: image-url("sale-icon/rank.png") no-repeat; 41 + background: url("../img/me/employ/rank.png") no-repeat;
42 background-position: center top; 42 background-position: center top;
43 background-size: auto 100%; 43 background-size: auto 100%;
44 44
45 &.top { 45 &.top {
46 - // background: image-url("sale-icon/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: 58rem / $pxConvertRem;
@@ -161,8 +161,10 @@ class HomeController extends AbstractAction @@ -161,8 +161,10 @@ class HomeController extends AbstractAction
161 */ 161 */
162 public function couponsAction() 162 public function couponsAction()
163 { 163 {
164 - // $uid = $this->getUid();  
165 164
  165 + $this->setTitle('优惠券');
  166 + $this->setNavHeader('优惠券', true, SITE_MAIN);
  167 + // $uid = $this->getUid();
166 $uid = 967016; 168 $uid = 967016;
167 $status = $this->get('status', 0); 169 $status = $this->get('status', 0);
168 $coupons = array( 170 $coupons = array(