Authored by xuqi

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

... ... @@ -7,3 +7,5 @@ compile/
assets/
script/nginx/logs
npm-debug.log
composer.lock
vendor/
... ...
... ... @@ -11,7 +11,7 @@
{
"name": "fei.hong",
"email": "fei.hong@yoho.cn",
"homepage": "www.yoho.cn"
"homepage": "http://www.yoho.cn"
}
],
"require": {
... ...
framework @ 75bbc3b0
Subproject commit 119c247f5cf929aa1e059e40609bb16dd6b58f05
Subproject commit 75bbc3b075de19f239532f60c5995d06c5f814e2
... ...
... ... @@ -56,10 +56,12 @@ var $listNav = $('#list-nav'),
$pre, //纪录进入筛选前的active项
searching;
swiper = new Swiper('.swiper-container', {
if ($('.swiper-container .swiper-slide').length > 1) {
swiper = new Swiper('.swiper-container', {
lazyLoading: true,
pagination: '.swiper-pagination'
});
});
}
/**
* 筛选注册的回调,筛选子项点击后逻辑
... ... @@ -132,7 +134,7 @@ function search(opt) {
}
//导航类别
if ($pre === undefined || $pre.hasClass('new')) {
if ($pre.hasClass('new')) {
navType = 'newest';
} else if ($pre.hasClass('price')) {
navType = 'price';
... ... @@ -308,6 +310,8 @@ $(window).scroll(function() {
//当scroll到1/4$goodsContainer高度后继续请求下一页数据
if ($(window).scrollTop() + winH >
$(document).height() - 0.25 * $goodsContainer.height()) {
if ($pre !== undefined) {
search();
}
}
});
\ No newline at end of file
... ...
... ... @@ -59,10 +59,12 @@ var $listNav = $('#list-nav'),
$pgc.addClass('hide');
$dgc.addClass('hide');
swiper = new Swiper('.swiper-container', {
if ($('.swiper-container .swiper-slide').length > 1) {
swiper = new Swiper('.swiper-container', {
lazyLoading: true,
pagination: '.swiper-pagination'
});
});
}
/**
* 筛选注册的回调,筛选子项点击后逻辑
... ... @@ -151,7 +153,7 @@ function search(opt) {
}
//导航类别
if ($pre === undefined || $pre.hasClass('today')) {
if ($pre.hasClass('today')) {
navType = 'today';
dayLimit = 1;
} else if ($pre.hasClass('week')) {
... ... @@ -270,7 +272,8 @@ $listNav.delegate('li', 'touchstart', function() {
nav = navInfo[navType];
if ($this.hasClass('hide')) {
if (!($this.hasClass('active'))) {
$active = $this.siblings('.active');
$pre = $this; //$pre为除筛选导航的其他导航项,若当前active的为筛选,则把$pre置为当前点击项
... ... @@ -314,6 +317,8 @@ $(window).scroll(function() {
//当scroll到1/4$goodsContainer高度后继续请求下一页数据
if ($(window).scrollTop() + winH >
$(document).height() - 0.25 * $goodsContainer.height()) {
if ($pre !== undefined) {
search();
}
}
});
\ No newline at end of file
... ...
... ... @@ -2,31 +2,32 @@
.newbrand-search {
width: 93.75%;
height: 30px;
padding: 7px 3.125%;
height: 60rem / $pxConvertRem;
padding: 14rem / $pxConvertRem 3.125%;
background-color: #f8f8f8;
left: 0;
top: 44px;
top: 88rem / $pxConvertRem;
position: fixed;
z-index: 2;
.search-box {
position: relative;
height: 30px;
height: 60rem / $pxConvertRem;
background-color: #FFF;
border-radius: 15px;
padding: 0 16px 0 26px;
border-radius: 30rem / $pxConvertRem;
padding: 0 32rem / $pxConvertRem 0 52rem / $pxConvertRem;
.search-input {
width: 100%;
height: 30px;
height: 60rem / $pxConvertRem;
border: 0;
}
.search-icon {
position: absolute;
font-size: 12px;
top: 16px;
left: 24px;
font-size: 24rem / $pxConvertRem;
top: 20rem / $pxConvertRem;
left: 24rem / $pxConvertRem;
color: #bdbdbd;
}
}
... ... @@ -62,12 +63,12 @@
color: #999999;
font-weight: bold;
position: relative;
h2 {
width: 100%;
height: 25px;
line-height: 25px;
font-size: 17px;
// width: 100%;
padding: 0 20rem / $pxConvertRem;
height: 50rem / $pxConvertRem;
line-height: 50rem / $pxConvertRem;
font-size: 34rem / $pxConvertRem;
border-top: 1px solid #e6e6e6;
background-color: #f4f4f4;
}
... ... @@ -75,18 +76,21 @@
p {
cursor: pointer;
height: 25px;
padding-right: 10px;
// height: 50rem / $pxConvertRem;
padding: 0 20rem / $pxConvertRem;
a {
display: block;
font-size: 17px;
padding-top: 10rem / $pxConvertRem;
height: 76rem / $pxConvertRem;
line-height: 76rem / $pxConvertRem;
font-size: 34rem / $pxConvertRem;
border-bottom: 1px solid #f3f3f3;
border-top: 1px solid #f9f9f9;
i {
position: relative;
top: 1px;
color: #ff0000;
padding-left: 16px;
padding-left: 32rem / $pxConvertRem;
}
}
}
... ... @@ -94,18 +98,18 @@
.right-bar {
width: 30px;
top: 120px !important;
width: 60rem / $pxConvertRem;
top: 240rem / $pxConvertRem !important;
overflow: hidden;
position: fixed;
right: 1px;
border-radius: 6px;
right: 2rem / $pxConvertRem;
border-radius: 12rem / $pxConvertRem;
background: rgba(0,0,0,.8);
z-index: 2;
b {
height: 16px;
height: 32rem / $pxConvertRem;
line-height: 14px;
line-height: 28rem / $pxConvertRem;
text-align: center;
display: block;
color: #999999;
... ... @@ -114,6 +118,6 @@
}
.con {
padding-top: 5px;
padding-top: 10rem / $pxConvertRem;
}
}
\ No newline at end of file
... ...
... ... @@ -16,12 +16,13 @@
opacity: 0.5;
margin: 0 (9rem / $pxConvertRem);
border-radius: 50%;
}
span.swiper-active-switch {
&.swiper-pagination-bullet-active {
background: #fff;
opacity: 1;
}
}
}
}
}
.banner-swiper {
... ...
... ... @@ -17,14 +17,15 @@
overflow: hidden;
.brand-logo {
width: 100%;
display: table-cell;
width: 3.95rem;
height: 128rem / $pxConvertRem;
line-height: 128rem / $pxConvertRem;
text-align: center;
font-size: 0;
vertical-align: middle;
img {
vertical-align: middle;
max-width: 100%;
max-height: 100%;
}
... ... @@ -68,13 +69,13 @@
.brands-swiper {
background: #fff;
width: 100%;
height: 140rem / $pxConvertRem;
height: 180rem / $pxConvertRem;
margin-bottom: 28rem / $pxConvertRem;
overflow: hidden;
.brands-list {
position: relative;
height: 140rem / $pxConvertRem;
height: 180rem / $pxConvertRem;
li {
float: left;
... ... @@ -85,11 +86,12 @@
a {
position: relative;
display: block;
display: table-cell;
width: 100%;
height: 100%;
height: 140rem / $pxConvertRem;
line-height: 140rem / $pxConvertRem;
font-size: 0;
vertical-align: middle;
}
img {
... ... @@ -102,7 +104,8 @@
position: absolute;
left: 8rem / $pxConvertRem;
right: 8rem / $pxConvertRem;
bottom: 8rem / $pxConvertRem;
bottom: -32rem / $pxConvertRem;
width: 100%;
height: 28rem / $pxConvertRem;
line-height: 28rem / $pxConvertRem;
text-align: center;
... ...
... ... @@ -23,7 +23,7 @@
{{# content}}
{{#if text}}
<div class="post-block text-block">
{{text}}
{{{text}}}
</div>
{{/if}}
... ...
... ... @@ -108,14 +108,14 @@
{{/if}}
{{!-- 新品到着 --}}
{{#if newArrival}}
{{#if newArrivalPage}}
<script>
seajs.use('js/product/newsale/newarrival');
</script>
{{/if}}
{{!-- 折扣专区 --}}
{{#if discount}}
{{#if discountPage}}
<script>
seajs.use('js/product/newsale/discount');
</script>
... ...
... ... @@ -140,6 +140,7 @@ class DetailController extends AbstractAction
if (!empty($detail['getOtherArticle'])) {
foreach ($detail['getOtherArticle'] as $value) {
$value['url'] = '/guang/detail/index?id=' . $value['id'];
$value['thumb'] = Helpers::getImageUrl($value['thumb'], 279, 175);
$data['relatedInfo'][] = $value;
}
}
... ...
... ... @@ -79,7 +79,7 @@ class PlusstarController extends AbstractAction
$data['ps']['likeUrl'] = false; //"http://guang.m.yohobuy.com/plustar/brandinfo?id=285&amp;openby:yohobuy={&quot;action&quot;:&quot;go.weblogin&quot;,&quot;params&quot;:{&quot;jumpurl&quot;:{&quot;url&quot;:&quot;http:\/\/guang.m.yohobuy.com\/plustar\/brandinfo&quot;,&quot;param&quot;:{&quot;id&quot;:285}},&quot;requesturl&quot;:{&quot;url&quot;:&quot;\/guang\/api\/v1\/favorite\/togglebrand&quot;,&quot;param&quot;:{&quot;brand_id&quot;:&quot;701&quot;}},&quot;priority&quot;:&quot;Y&quot;}}";
$data['ps']['intro'] = empty($brandInfo['getBrandInfo']['data']['brand_intro']) ? '' : strtr(strip_tags($brandInfo['getBrandInfo']['data']['brand_intro']), array('&nbsp;' => ' '));
$data['ps']['newArrival'] = array();
$data['ps']['newArrival']['moreUrl'] = ''; // @todo 品牌列表页面
$data['ps']['newArrival']['moreUrl'] = '/product/list/brand?brand='.$id; // @todo 品牌列表页面
$data['ps']['newArrival']['naList'] = $brandInfo['getNewProduct'];
$data['ps']['infos'] = array();
... ...
... ... @@ -24,7 +24,7 @@ class NewsaleController extends AbstractAction
$this->channelTrans($channel);
$data = array();
$data['newArrival'] = true;
$data['newArrivalPage'] = true;
$data['headerBanner'] = \Product\NewsaleModel::getNewFocus($channel);
$goodsList = \Product\NewsaleModel::getNewProducts($channel, 60);
if (!empty($goodsList)) {
... ... @@ -58,7 +58,7 @@ class NewsaleController extends AbstractAction
$this->channelTrans($channel);
$data = array();
$data['discount'] = true;
$data['discountPage'] = true;
$data['headerBanner'] = \Product\NewsaleModel::getNewFocus($channel);
$goodsList = \Product\NewsaleModel::getSaleProducts($channel, 60);
if (!empty($goodsList)) {
... ... @@ -132,7 +132,7 @@ class NewsaleController extends AbstractAction
$data = NewsaleData::selectNewSaleProducts(
$gender, $brand, $sort, $color,
$size, $price, $p_d, $channel, $dayLimit, $limit, $page
$size, $price, $p_d, $channel, $dayLimit, $limit, $page, $order
);
$result = \Product\NewsaleModel::selectData($data);
... ...