Authored by Rock Zhang

修复在线咨询页面显示为空白的bug

... ... @@ -468,6 +468,12 @@ class HomeController extends AbstractAction
if ($cateId > 0) {
$service = Home\OnlineModel::getOnlineServiceDetail($cateId);
}
$service = array(
'header' => array('title' => '在线客服'),
'service' => $service
);
$this->setTitle('在线客服');
$this->setNavHeader($cateName, true, '');
$this->_view->display('online-service-detail', $service);
... ...
... ... @@ -70,21 +70,17 @@ class OnlineModel
return $result;
}
$res = OnlineData::getOnlineServiceDetail($cateId, $clinetType);
if (isset($res['code']) && $res['code'] === 200) {
$questionInfo = $res['data'];
if ($questionInfo) {
$list = array();
if ($questionInfo) {
foreach ($questionInfo as $qk => $qv) {
$list[$qk]['q'] = $qv['title'];
$list[$qk]['a'] = $qv['content'];
}
!empty($list) && $result['list'] = $list;
}
//处理返回信息
$result = array(
'header' => array('title' => '在线客服'),
'list' => $list
);
}
return $result;
}
... ...