Authored by xuqi

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop

... ... @@ -12,8 +12,9 @@ var $nav = $('.category-nav'),
$contents = $categoryContainer.children('.content'),
$subLevelItem = $('.sub-level li');
var $curContent = $contents.not('.hide'),
$curClickSubLevel;
var $curContent = $contents.not('.hide');
// $curClickSubLevel;
var navHammer, ccHammer;
... ...
var $ = require('jquery'),
Hammer = require('yoho.hammer');
var employ;
$('.employ span').each(function(index) {
employ = new Hammer($('.employ span')[index]);
employ.on('tap', function(e) {
$('.employ-list').addClass('none').eq(index).removeClass('none');
$('.employ span').removeClass('active').eq(index).addClass('active');
});
});
\ No newline at end of file
... ...
... ... @@ -5,4 +5,5 @@
*/
require('./index');
require('./order');
\ No newline at end of file
require('./order');
require('./coupons');
... ...
var $ = require('jquery');
$.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
... ...
@import "home", "vip-grade", "order", "personal-details", "yoho-coin", "recommend-for-you";
\ No newline at end of file
@import "home", "vip-grade", "order", "coupons", "personal-details", "yoho-coin", "recommend-for-you";
\ No newline at end of file
... ...
<div class="s-goods-nav goods-nav">
<ul class="swiper-wrapper clearfix">
{{# tabs}}
<li class="swiper-slide nav-item" data-sort="{{sort}}">
{{# title}}
<span>{{name}}</span>
{{/ title}}
</li>
{{/ tabs}}
</ul>
</div>
{{# goods}}
<div class="rank-main">
<ul>
{{# goods}}
<li>
<a class="clearfix" href="{{url}}">
<div class="item-img">
<img class="lazy" data-original="{{thumb}}">
</div>
<div class="item-content">
<i class="rank-icon top">{{rank}}</i>
<h2 {{# active}}class="hasActive"{{/ active}}>{{name}}</h2>
{{# active}}
<p>{{.}}</p>
{{/ active}}
<p>{{salePrice}}<span>{{price}}</span></p>
</div>
</a>
</li>
{{/ goods}}
</ul>
</div>
{{/ goods}}
\ No newline at end of file
... ...
... ... @@ -3,42 +3,7 @@
{{# headerBanner}}
{{> product/banner_swipe_and_single}}
{{/ headerBanner}}
{{# listNav}}
<div class="s-goods-nav goods-nav">
<ul class="swiper-wrapper clearfix">
{{# list}}
<li class="swiper-slide nav-item" data-sort="{{sort}}">
<span>{{textCn}}</span>
</li>
{{/ list}}
</ul>
</div>
{{/ listNav}}
{{# rankList}}
<div class="rank-main">
<ul>
{{# list}}
<li>
<a class="clearfix" href="{{url}}">
<div class="item-img">
<img class="lazy" data-original="{{img}}">
</div>
<div class="item-content">
<i class="rank-icon top">{{rank}}</i>
<h2 {{# active}}class="hasActive"{{/ active}}>{{title}}</h2>
{{# active}}
<p>{{.}}</p>
{{/ active}}
<p>{{sPrice}}<span>{{price}}</span></p>
</div>
</a>
</li>
{{/ list}}
</ul>
</div>
{{/ rankList}}
<div id="hotRank"></div>
{{#if brand}}
<input id="brand" type="hidden" value={{brand}}>
{{/if}}
... ...
{{# goods}}
{{> good}}
{{/ goods}}
\ No newline at end of file
{{/ goods}}
\ No newline at end of file
... ...
... ... @@ -212,3 +212,8 @@
seajs.use('js/me/order');
</script>
{{/if}}
{{#if couponsPage}}
<script>
seajs.use('js/me/coupons');
</script>
{{/if}}
... ...
... ... @@ -198,9 +198,10 @@ class HomeController extends AbstractAction
$uid = 967016;
$status = $this->get('status', 0);
$coupons = \Index\UserModel::getCouponData($uid, $status);
$coupons = array(
'couponsUrl' => \Index\UserModel::getCouponData($uid, $status),
'couponsPage' => true
);
$this->_view->display('coupons', $coupons);
}
... ...
... ... @@ -86,9 +86,10 @@ class NewsaleController extends AbstractAction
'headerBanner' => \Product\NewsaleModel::getNewFocus($channel),
'showDownloadApp' => true,
'pageFooter' => true,
'cartUrl' => Helpers::url('/cart/index/index', null),
'cartUrl' => Helpers::url('/product/newsale/selectHotrank', null),
);
// print_r($data);
$this->_view->display('hotrank', $data);
}
... ... @@ -114,10 +115,11 @@ class NewsaleController extends AbstractAction
$result = \Product\NewsaleModel::selectTopData($data);
}
// print_r($result);
if (empty($result)) {
echo ' ';
} else {
$this->_view->display('product', $result);
$this->_view->display('hotList', $result);
}
}
... ...