Authored by biao

1修复频道一览页面banner被遮挡问题, 2购买咨询页面加入常见问题

... ... @@ -135,7 +135,7 @@
}
.banner-top {
padding-top: 178rem / $pxConvertRem;
padding-top: 258rem / $pxConvertRem;
background-color:#f8f8f8;
}
... ...
... ... @@ -71,23 +71,26 @@
color: $subFontC;
}
}
.goods-consults {
margin-top: 5.25rem;
overflow: hidden;
.goods-consults.customer-consults {
.consult-item:nth-child(1) {
display: block;
}
.consult-item:nth-child(2) {
display: block;
}
.consult-item {
display: none;
}
}
.goods-consults {
margin-top: 5.25rem;
overflow: hidden;
.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;
... ...
... ... @@ -6,7 +6,7 @@
<a href="{{link}}" class="iconfont enter-consult-page">&#xe604;</a>
</div>
{{# consults}}
<div class="goods-consults" id="goods-consults">
<div class="goods-consults customer-consults" id="goods-consults">
{{#list}}
<div class="consult-item" data-id="{{id}}">
<div class="question">
... ... @@ -55,7 +55,7 @@
{{#faq}}
<div class="goods-consults" style="margin-top:0">
{{#list}}
{{#commonConsults}}
<div class="faq-item">
<div class="question">
<span class="iconfont">&#xe639;</span>
... ... @@ -69,7 +69,7 @@
<p>{{answer}}</p>
</div>
</div>
{{/list}}
{{/commonConsults}}
</div>
{{/faq}}
... ...
... ... @@ -571,9 +571,9 @@ class DetailModel
$build['answer'] = $value['answer'];
$build['id'] = $value['id'];
$build['isLike'] = $value['is_like'] === 'Y';
$build['like'] = $value['like'];
$build['like'] = intval($value['like']);
$build['isUseful'] = $value['is_useful'] === 'Y';
$build['useful'] = $value['useful'];
$build['useful'] = intval($value['useful']);
$result[] = $build;
}
}
... ...
... ... @@ -158,6 +158,7 @@ class DetailController extends AbstractAction
'consults' => array(
'list' => $consults
),
'faq' => \Product\DetailModel::getCommonConsults(),
'showReadMore' => count($consults) > 2,
'link' => Helpers::url('/product/detail/consultform', array('product_id' => $productId)),
);
... ... @@ -166,24 +167,6 @@ class DetailController extends AbstractAction
$this->_view->display('consults', $data);
}
/*
* 异步获取咨询常见问题
*/
public function commonconsultsAction()
{
$result = array();
if ($this->isAjax()) {
$result = \Product\DetailModel::getCommonConsults();
}
if (empty($result)) {
echo ' ';
} else {
print_r($result);
$this->_view->display('common-consults', $result);
}
}
/*
* 咨询点赞
... ...