Authored by Lynnic

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

... ... @@ -369,7 +369,7 @@ class AbstractAction extends Controller_Abstract
* @param string $homeUrl 返回首页的链接
* @return void
*/
protected function setNavHeader($title = '', $backUrl = true, $homeUrl = '/')
protected function setNavHeader($title = '', $backUrl = true, $homeUrl = '/', $navBtn = false)
{
$header = array();
... ... @@ -387,6 +387,9 @@ class AbstractAction extends Controller_Abstract
if (!empty($homeUrl)) {
$header['navHome'] = $homeUrl . '?go=1&t=' . time();
}
if ($navBtn) {
$header['navBtn'] = true;
}
$controller = $this->getRequest()->getControllerName();
if ($controller !== 'Home') {
... ...
... ... @@ -301,7 +301,7 @@ class FloorProcess
// 区别多张图与一张图
if (count($data['big_image']) > 1) {
$result['big_image']['list'] = $data['big_image'];
$result['big_image']['big_list'] = $data['big_image'];
unset($data['big_image']);
}
... ...
... ... @@ -131,6 +131,7 @@ $addressListPage.find('.address').each(function(i, elem) {
$this.siblings().hide();
$this.children('ul').show().children('li').show();
$(this).removeClass('highlight');
e.srcEvent.preventDefault();
e.srcEvent.stopPropagation();
});
... ...
... ... @@ -137,6 +137,7 @@ favTabHammer.on('tap', function(e) {
index = $cur.index();
if (index === 0) {
brandTab = false;
if ($favProductList.find('li').length === 0 &&
$favProductList.closest('.fav-type').find('.fav-null-box').hasClass('hide')) {
loadData($favProductList, 'favProduct', 1);
... ... @@ -202,6 +203,11 @@ favContentHammer.on('tap', function(e) {
}).fail(function() {
//TODO
diaLog.showDialog({
autoHide: true,
dialogText: '网络错误~'
});
});
});
});
... ...
... ... @@ -129,7 +129,7 @@ orderHammer.on('tap', function(e) {
if (data.code === 200) {
//删除订单页面刷新
location.href = location.href;
history.go(0);
}
}
});
... ... @@ -154,7 +154,7 @@ orderHammer.on('tap', function(e) {
if (data.code === 200) {
//取消订单页面刷新
location.href = location.href;
history.go(0);
}
}
});
... ...
... ... @@ -126,6 +126,11 @@ $likeBtn.bind('click', function() {
}).fail(function(data) {
//TODO
diaLog.showDialog({
autoHide: true,
dialogText: '网络错误~'
});
});
});
... ... @@ -148,5 +153,10 @@ $disLikeBtn.bind('click', function() {
}).fail(function(data) {
//TODO
diaLog.showDialog({
autoHide: true,
dialogText: '网络错误~'
});
});
});
\ No newline at end of file
... ...
... ... @@ -126,6 +126,7 @@
.price-underline {
text-decoration: line-through;
margin-left: pxToRem(15px);
}
}
... ... @@ -188,6 +189,11 @@
}
//品牌收藏
.fav-brand-swiper {
border-bottom: 1px solid #ccc;
&.none-border-bottom {
border-bottom: none;
}
.swiper-header {
height: pxToRem(100px);
... ... @@ -239,6 +245,13 @@
}
}
.fav-more {
width: 2.5rem;
height: 2.5rem;
position: absolute;
top: 0;
right: 0;
&:after {
$width: pxToRem(image_width(sprite-file($fav, fav-more)));
$height: pxToRem(image_height(sprite-file($fav, fav-more)));
... ... @@ -250,6 +263,8 @@
top: 50%;
right: pxToRem(30px);
margin-top: -$height / 2;
content: '';
}
}
}
.swiper-container {
... ...
... ... @@ -39,11 +39,15 @@ $suggest: sprite-map("me/suggest/*.png",$spacing: 5px);
border-top: 1px solid #e0e0e0;
border-bottom: pxToRem(30px) solid #f0f0f0;
.suggest-item-img {
width: 100%;
overflow: hidden;
> img {
display: block;
overflow: hidden;
width: 100%;
}
}
> h2 {
font-size: pxToRem(38px);
... ...
... ... @@ -10,18 +10,20 @@
{{# suggestContent}}
<div class="suggest-item" data-id="{{suggest_id}}">
{{#if imgUrl}}
<div class="suggest-item-img">
<img class="lazy" data-original="{{imgUrl}}" alt=""/>
</div>
{{/if}}
<h2>{{title}}</h2>
<p>{{content}}</p>
<div class="suggest-type suggest-good">
<div class="suggest-type suggest-good {{#good}}show{{/good}}">
<div class="active">
<span class="iconfont">&#xe601;</span>
<span>靠谱,谢谢您的反馈</span>
</div>
</div>
<div class="suggest-type suggest-bad">
<div class="suggest-type suggest-bad {{# bad}}show{{/ bad}}">
<div class="active">
<span class="iconfont">&#xe601;</span>
<span>不靠谱,谢谢您的反馈</span>
... ...
{{# hasFavBrand}}
<div class="fav-brand-swiper">
<div class="fav-brand-swiper {{#if productList}}none-border-bottom{{/if}}">
<div class="swiper-header">
<div class="swiper-logo">
<img src="{{brandImg}}" alt=""/>
... ... @@ -17,6 +17,7 @@
</div>
<a class="fav-more" href="{{link}}"></a>
</div>
{{#if productList}}
<div id="swiper-container-{{id}}" class="swiper-container" data-id="{{id}}">
<ul class="swiper-wrapper swiper-wrapper-{{id}}">
{{# productList}}
... ... @@ -33,5 +34,6 @@
{{/ productList}}
</ul>
</div>
{{/if}}
</div>
{{/ hasFavBrand}}
\ No newline at end of file
... ...
{{> home/floor_header_more}}
<div class="goods-category">
{{# big_image}}
{{#if list}}
{{#if big_list}}
<div class="category-swiper">
<ul class="swiper-wrapper">
{{# list}}
{{# big_list}}
<li class="swiper-slide">
<a href="{{url}}">
<img class="lazy" data-original="{{img}}" alt="{{title}}">
</a>
</li>
{{/ list}}
{{/ big_list}}
</ul>
<div class="swiper-pagination">
<div class="pagination-inner clearfix">
... ...
... ... @@ -52,7 +52,7 @@ class BrandModel
$brand = BrandData::package(self::CODE_TOPPOS_LIFESTYLE, 4);
break;
}
var_dump($brand); exit;
// 模板中的使用JS标识
$result['brandPage'] = true;
// 是否显示app下载浮层标识
... ...
... ... @@ -41,7 +41,6 @@ class BrandController extends AbstractAction
}
// 渲染模板
print_r(Category\BrandModel::getBrandByChannel($channel));
$this->_view->display('index', Category\BrandModel::getBrandByChannel($channel));
}
... ...