Authored by xuqi

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

... ... @@ -10,4 +10,8 @@ npm-debug.log
composer.lock
vendor/
.jscsrc
.jshintrc
\ No newline at end of file
.jshintrc
.tags
.tags_sorted_by_file
yohobuyP.sublime-project
yohobuyP.sublime-workspace
... ...
... ... @@ -63,13 +63,13 @@ function hideSideBar() {
}
}
$('.overlay').on('touchend', function(e) {
$('.overlay').on('touchstart', function(e) {
hideSideBar();
return false;
});
//点击一级导航,弹出二级导航
$sideNav.on('touchend', 'li', function (e) {
$sideNav.on('touchstart', 'li', function (e) {
if ($(this).find('.sub-nav').size() > 0) {
$('.sub-nav').removeClass('show');
$(this).find('.sub-nav').addClass('show');
... ... @@ -83,12 +83,12 @@ $sideNav.on('touchend', 'li', function (e) {
//返回一级导航,收起二级导航
$subNav.each(function () {
$(this).find('li').eq(0).on('touchend', function (e) {
$(this).find('li').eq(0).on('touchstart', function (e) {
$('.sub-nav').removeClass('show');
e.stopPropagation();
return false;
});
}).on('touchend', function(e) {
}).on('touchstart', function(e) {
if (e.currentTarget !== e.target) {
$subNav.find('li').removeClass('current');
}
... ...
... ... @@ -21,7 +21,7 @@
"yoho.iswiper": "3.0.1",
"iscroll": "5.1.2",
"import-style": "1.0.0",
"yoho.lazyload": "1.1.0",
"yoho.lazyload": "1.1.2",
"yoho.handlebars": "3.0.3",
"yoho.hammer": "2.0.4"
},
... ...
.brand-page {
.newbrand-search {
width: 93.75%;
height: 60rem / $pxConvertRem;
... ...
.yoho-footer {
font-size: 12px;
background-color: #fff;
margin-bottom: 2.5rem;
.op-row {
position: relative;
... ...
{{> layout/header}}
<div class="discount-page yoho-page">
{{# headerBanner}}
{{> product/banner_swipe_and_single}}
{{/ headerBanner}}
<ul id="list-nav" class="list-nav clearfix">
<li class="new active">
<a href="javascript:void(0);">
<span class="spanTest">最新</span>
<span class="iconfont cur">&#xe616;</span>
</a>
</li>
<li class="price">
<a href="javascript:void(0);">
<span class="spanTest">价格</span>
<span class="icon">
<i class="iconfont up">&#xe615;</i>
<i class="iconfont down cur">&#xe616;</i>
</span>
</a>
</li>
<li class="discount">
<a href="javascript:void(0);">
<span class="spanTest">折扣</span>
<span class="icon">
<i class="iconfont up">&#xe615;</i>
<i class="iconfont down cur">&#xe616;</i>
</span>
</a>
</li>
<li class="filter">
<a href="javascript:void(0);">
<span class="spanTest">筛选</span>
<span class="iconfont">&#xe613;</span>
</a>
</li>
</ul>
<div id="goods-container" class="goods-container">
<div class="new-goods container clearfix">
{{# goods}}
{{> good}}
{{/ goods}}
</div>
<div class="price-goods container hide clearfix"></div>
<div class="discount-goods container hide clearfix"></div>
{{> filter}}
</div>
{{#if brand}}
<input id="brand" type="hidden" value={{brand}}>
{{/if}}
{{#if gender}}
<input id="gender" type="hidden" value={{gender}}>
{{/if}}
{{#if sort}}
<input id="sort" type="hidden" value={{sort}}>
{{/if}}
{{#if msort}}
<input id="msort" type="hidden" value={{msort}}>
{{/if}}
{{#if misort}}
<input id="misort" type="hidden" value={{misort}}>
{{/if}}
{{#if color}}
<input id="color" type="hidden" value={{color}}>
{{/if}}
{{#if size}}
<input id="size" type="hidden" value={{size}}>
{{/if}}
{{#if price}}
<input id="price" type="hidden" value={{price}}>
{{/if}}
{{#if p_d}}
<input id="p_d" type="hidden" value={{p_d}}>
{{/if}}
{{#if channel}}
<input id="channel" type="hidden" value={{channel}}>
{{/if}}
{{#if limit}}
<input id="limit" type="hidden" value={{limit}}>
{{/if}}
{{#if page}}
<input id="page" type="hidden" value={{page}}>
{{/if}}
{{#if discount}}
<input id="discount" type="hidden" value={{discount}}>
{{/if}}
{{> product/suspend-cart}}
</div>
{{> layout/footer}}
\ No newline at end of file
... ...
... ... @@ -70,6 +70,33 @@ class NewsaleController extends AbstractAction
}
/**
* 热销排行榜
*
* @param int channel 1:男生,2:女生,3:潮童,4:创意生活
*/
public function hotrankAction()
{
$this->setTitle('热销排行榜');
$this->setNavHeader('热销排行榜');
// 设置一些默认参数
$data = array(
'discountPage' => true,
'showDownloadApp' => true,
'pageFooter' => true,
'brand' => '0',
'sort' => '0',
'gender' => Helpers::getGenderByCookie(),
'price' => '0',
'size' => '0',
'discount' => '0.1,0.9',
'cartUrl' => Helpers::url('/cart/index/index', null),
);
$this->_view->display('hotrank', $data);
}
/**
* Ajax方式筛选新品到着、折扣专区商品
*
* @return array 根据指定条件筛选之后的商品
... ...
... ... @@ -89,6 +89,13 @@ routes.productsale.route.module = Product
routes.productsale.route.controller = Newsale
routes.productsale.route.action = Discount
; 热销排行榜
routes.productsale.type = "rewrite"
routes.productsale.match = "/hotrank"
routes.productsale.route.module = Product
routes.productsale.route.controller = Newsale
routes.productsale.route.action = Hotrank
; 女生首页
routes.girls.type = "rewrite"
routes.girls.match = "/girl$"
... ...