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}}
... ...
... ... @@ -7,7 +7,7 @@ use Plugin\Helpers;
/**
* 商品详情页模板相关的数据模型
*
*
* @name DetailModel
* @package Product
* @copyright yoho.inc
... ... @@ -19,7 +19,7 @@ class DetailModel
/**
* 商品基本信息
*
*
* @param int $productId 商品ID SKN 和 ID 只需要传一个
* @param int $goodsId 某个颜色的商品
* @param int $uid 当前登录用户ID, 未登录为0
... ... @@ -309,7 +309,7 @@ class DetailModel
/**
* 商品尺码信息
*
*
* @param int $productSkn
* @return array
*/
... ... @@ -520,7 +520,7 @@ class DetailModel
/**
* 获取评价列表
*
*
* @param int $productId 产品ID
* @param int $pageNum 页码数
* @param int $pageSize 每页显示个数
... ... @@ -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;
}
}
... ... @@ -667,7 +667,7 @@ class DetailModel
/**
* 获取为你优选的商品
*
*
* @param int $productSkn 商品SKN
* @return array
*/
... ...
... ... @@ -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);
}
}
/*
* 咨询点赞
... ...