Authored by lore-w

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

Conflicts:
	framework
... ... @@ -13,9 +13,9 @@ var goodsSwiper,
// winH = $(window).height(),
sizeSwiper,
refSwiper,
commentsNum,
handleHelper;
lazyLoad($('img.lazy'));
goodsSwiper = new Swiper('.banner-swiper', {
... ... @@ -28,22 +28,56 @@ goodsSwiper = new Swiper('.banner-swiper', {
prevButton: '.my-swiper-button-prev'
});
//初始化tab
(function() {
var consultsNum = $('#nav-tab .consults-num').html() - 0;
$('#nav-tab li').on('click', function() {
var index = $(this).index();
commentsNum = $('#nav-tab .comments-num').html() - 0;
if (!$(this).hasClass('focus')) {
$('#nav-tab li').each(function() {
$(this).removeClass('focus');
});
$('#feedback-content .content').each(function() {
$(this).addClass('hide');
});
if (0 !== commentsNum) {
$('#nav-tab .comment-nav').addClass('focus');
$('#feedback-content .comment-content').removeClass('hide');
} else if (0 !== consultsNum) {
$('#nav-tab .consult-nav').addClass('focus');
$('#feedback-content .consult-content').removeClass('hide');
}
})();
$('#nav-tab li').each(function() {
$(this).removeClass('focus');
});
$('#feedback-content .content').each(function() {
$(this).addClass('hide');
});
$('#nav-tab li').on('click', function() {
var index = $(this).index();
if ($(this).hasClass('comment-nav') && 0 === commentsNum) {
alert('暂无商品评价');
} else {
if (!$(this).hasClass('focus')) {
$('#nav-tab li').each(function() {
$(this).removeClass('focus');
});
$('#feedback-content .content').each(function() {
$(this).addClass('hide');
});
$(this).addClass('focus');
$('#feedback-content .content:eq(' + index + ')').removeClass('hide');
}
}
});
$(this).addClass('focus');
$('#feedback-content .content:eq(' + index + ')').removeClass('hide');
$('.goodsDiscount .dropdown').on('click', function() {
if ($('.goodsDiscount .discount-folder').is(':hidden')) {
$('.goodsDiscount .discount-folder').slideDown();
} else {
$('.goodsDiscount .discount-folder').slideUp();
}
});
... ...
... ... @@ -9,9 +9,10 @@ var Swiper = require('yoho.iswiper');
var recommendSwiper;
recommendSwiper = new Swiper('.swiper-recommend', {
// lazyLoading: true,
// lazyLoadingInPrevNext: true,
slidesPerView: 'auto'
recommendSwiper = new Swiper('#swiper-recommend', {
slidesPerView: 'auto',
grabCursor: true,
slideElement: 'li',
lazyLoading: true,
watchSlidesVisibility: true
});
\ No newline at end of file
... ...
... ... @@ -12,25 +12,28 @@
font-weight: bold;
}
.swiper-recommend {
.swiper-container {
padding: pxToRem(20px) 0;
width: 100%;
height: pxToRem(252px);
overflow: hidden;
.swiper-slider {
margin: 0 pxToRem(10px);
.swiper-slide {
padding: 0 pxToRem(10px);
float: left;
width: pxToRem(156px);
&:first-child {
margin-left: pxToRem(30px);
padding-left: pxToRem(30px);
}
&:last-child {
margin-right: pxToRem(30px);
padding-right: pxToRem(30px);
}
img {
width: pxToRem(156px);
max-width: none;
width: 100%;
height: pxToRem(208px);
}
}
}
... ... @@ -42,19 +45,21 @@
line-height: 1;
span {
display: block;
// chrome 最小支持12px, 设计图是 10px ,用CSS3变换
@include transform(scale(0.875));
}
.sale-price {
color: #d9134f;
margin-left: pxToRem(-10px);
}
.old-price {
position: absolute;
top: 0;
right: 0;
color: #ededed;
right: pxToRem(-6px);
color: #b0b0b0;
}
.no-price {
... ...
... ... @@ -95,7 +95,9 @@
<span class="iconfont num">&#xe604;</span>
</a>
</div>
{{#isLogin}}
{{> product/recommend-for-you}}
{{/isLogin}}
</div>
{{> layout/footer}}
\ No newline at end of file
... ...
... ... @@ -43,7 +43,15 @@
{{#goodsDiscount}}
<div class="goodsDiscount">
<h1>{{.}}<span class="iconfont">&#xe609;</span></h1>
{{#each list}}
{{#if @first}}
<h1>{{this}}<span class="iconfont dropdown">&#xe609;</span></h1>
<div class="discount-folder">
{{else}}
<h1 class="folder-item">{{this}}</h1>
{{/if}}
{{/list}}
</div>
</div>
{{/goodsDiscount}}
... ... @@ -57,8 +65,8 @@
{{else}}
<ul id="nav-tab" class="nav-tab clearfix">
<li class="comment-nav focus">{{commentName}}({{commentsNum}})</li>
<li class="consult-nav">{{consultName}}({{consultsNum}})</li>
<li class="comment-nav">商品评价(<span class="comments-num">{{commentsNum}}</span>)</li>
<li class="consult-nav">购买咨询(<span class="consults-num">{{consultsNum}}</span>)</li>
</ul>
<div id="feedback-content" >
... ... @@ -189,7 +197,7 @@
<div class="swiper-container detail-swiper" id="size-swiper-container">
<div class="swiper-wrapper">
{{#list}}
<div class="swiper-slide blue-slide" >
<div class="swiper-slide " >
<div class="size-name cell">{{name}}</div>
<div class="size-m cell">{{sizem}}</div>
<div class="size-xl cell">{{sizexl}}</div>
... ... @@ -303,7 +311,11 @@
<div class="cart-bar">
<span class="num-tag">{{numInCart}}</span>
<a href="" class="num-incart iconfont">&#xe62c;</a>
{{#if goodsInstore}}
<a href="" class="addto-cart ">加入购物车</a>
{{else}}
<a href="" class="sold-out">已售罄</a>
{{/if}}
<a href="" class="favorite iconfont">&#xe605;</a>
</div>
{{/cartInfo}}
... ...
... ... @@ -16,6 +16,6 @@
</div>
<!-- 如果需要导航按钮 -->
<div class="swiper-button-prev swiper-button-grey"></div>
<div class="swiper-button-next swiper-button-grey"></div>
<div class="swiper-button-prev prev-grey"></div>
<div class="swiper-button-next next-grey"></div>
</div>
\ No newline at end of file
... ...
{{# recommendForYou}}
<div class="recommend-for-you">
<div class="title">为您优选新品</div>
<div class="swiper-recommend">
<ul class="swiper-wrapper">
<div id="swiper-recommend" class="swiper-container">
<ul class="swiper-wrapper swiper-wrapper-recommend">
{{#recommendList}}
<li class="swiper-slider">
<img class="img-box" src="{{thumb}}">
<li class="swiper-slide">
<img class="swiper-lazy img-box" data-src="{{thumb}}">
<div class="price">
<span class="sale-price {{^price}}no-price{{/price}}"{{salePrice}}</span>
{{#price}}<span class="old-price"{{.}}</span>{{/price}}
</div>
<div class="swiper-lazy-preloader"></div>
</li>
{{/recommendList}}
</ul>
... ...
... ... @@ -423,13 +423,13 @@ class UserModel
// 调用接口获取地址数据
$suggest = UserData::suggestData($udid, $page, $limit);
//print_r($suggest);
// 处理意见反馈数据
if (isset($suggest['data']) && !empty($suggest['data'])) {
$one = array();
foreach ($suggest['data']['list'] as $val) {
$one = array();
$one['suggest_id'] = $val['id'];
$one['imgUrl'] = Helpers::getImageUrl($val['cover_image'], 640, 240);
$one['title'] = $val['filter_content'];
$one['content'] = $val['reply_content'];
... ...
... ... @@ -13,10 +13,6 @@ class DetailController extends AbstractAction
*/
public function indexAction()
{
$commentsNum = 0;
$consultsNum = 0;
$nodate =0;
$data = array (
'goodsDetailPage' => true,
'pageHeader' => array (
... ... @@ -68,16 +64,21 @@ SHOE BQT KEN BLOCK',
)
)
),
'goodsDiscount'=>'【summer final sale】满¥499立享6.8折',
'goodsDiscount'=>array(
'list'=>array(
'【summer final sale】满¥499立享6.8折',
'【BACK TO SCHOOL】满¥499赠送Paul
Franke帽子一个,多买多送!',
'【BACK TO SCHOOL】满¥499赠送Paul
Franke帽子一个,多买多送!'
)
),
'feedbacks'=>array(
'commentsNum'=>0,
'consultsNum'=>0,
'nodata' =>0,
'commentName'=>'商品评价',
'consultName' =>'购买咨询',
'moreComments'=>'http://www.baidu.com',
'moreConsults'=>'http://www.baidu.com',
'gotoConsults'=>'http://www.baidu.com',
'consultsNum'=>1,
// 'commentName'=>'商品评价',
// 'consultName' =>'购买咨询',
'link'=>'',
'comments'=>array(
array(
'userName'=>'Lynnic',
... ... @@ -233,7 +234,8 @@ SHOE BQT KEN BLOCK',
),
'cartInfo' =>array(
'numInCart' => 3
'numInCart' => 3,
'goodsInstore'=>0
)
);
... ... @@ -247,6 +249,7 @@ SHOE BQT KEN BLOCK',
public function commentsAction(){
$data = array(
'goodsCommentsPage' =>true,
'pageHeader' => array (
'navBack' => 'sss ',
... ...