Authored by biao

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

... ... @@ -100,9 +100,9 @@ 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;
});
}
require('./fav');
\ No newline at end of file
require('./fav');
... ...
... ... @@ -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">
... ...
... ... @@ -12,7 +12,7 @@ class DetailController extends AbstractAction
/**
* 商品详情
*
*
* @param int productId
* @param int goodsId
*/
... ... @@ -50,7 +50,7 @@ class DetailController extends AbstractAction
/**
* 商品详情 (SKN)
*
*
* @param int productSkn
*/
public function showAction()
... ... @@ -100,7 +100,7 @@ class DetailController extends AbstractAction
/**
* 购买评价列表
*
*
* @param int productId
* @param int total
*/
... ... @@ -132,7 +132,7 @@ class DetailController extends AbstractAction
/**
* 购买咨询列表
*
*
* @param int productId
* @param int total
*/
... ... @@ -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)),
);
... ... @@ -222,7 +224,7 @@ class DetailController extends AbstractAction
/**
* 添加咨询操作
*
*
* @param int product_id 商品ID
* @param string content 咨询内容
* @return json
... ... @@ -243,7 +245,7 @@ class DetailController extends AbstractAction
/**
* 为你优选
*
*
* @param int productSkn 商品SKN号
* @return json
*/
... ...