Authored by biao

购买咨询页面产看更多按钮功能更新

... ... @@ -100,7 +100,7 @@ if ($('.goods-consults .consult-item').length > 10) {
if (readmoreHammer) {
readmoreHammer.on('tap', function() {
$('.readmore').hide();
$('.goods-consults .consult-item:nth-child(n+11)').show();
$('.goods-consults .consult-item').show();
return false;
});
}
... ...
... ... @@ -74,12 +74,20 @@
.goods-consults {
margin-top: 5.25rem;
overflow: hidden;
.consult-item:nth-child(1) {
display: block;
}
.consult-item:nth-child(2) {
display: block;
}
.consult-item {
margin-top: pxToRem(30px);
padding: pxToRem(20px) pxToRem(28px);
background-color: #fff;
border-bottom: 1px solid $borderC;
border-top: 1px solid $borderC;
display:none;
.question {
font-size: pxToRem(24px);
color: $mainFontC;
... ...
... ... @@ -3,7 +3,7 @@
<div class="goto-consult tap-hightlight" id="goto-consult" data-href="{{link}}">
<i class="iconfont consult-logo">&#xe639;</i>
<span>我要咨询</span>
<a href="javascript:;" class="iconfont enter-consult-page">&#xe604;</a>
<a href="{{link}}" class="iconfont enter-consult-page">&#xe604;</a>
</div>
{{# consults}}
<div class="goods-consults" id="goods-consults">
... ... @@ -43,7 +43,9 @@
</div>
{{/ consults}}
{{#showReadMore}}
<a href="javascript:;" id="readmore" class="readmore tap-hightlight" >查看更多 <i class="iconfont">&#xe604;</i></a>
{{/showReadMore}}
{{#faq}}
<h1 class="faq-title">
... ...
... ... @@ -150,12 +150,14 @@ class DetailController extends AbstractAction
}
$this->setTitle('购买咨询');
$consults = \Product\DetailModel::getConsults($productId);
$data = array(
'goodsConsultsPage' => true,
'pageFooter' => true,
'consults' => array(
'list' => \Product\DetailModel::getConsults($productId),
'list' => $consults
),
'showReadMore' => count($consults) > 2,
'link' => Helpers::url('/product/detail/consultform', array('product_id' => $productId)),
);
... ...