Authored by Rock Zhang

Merge branch 'hotfix/apichange-bug' into develop

Code Review By Rock Zhang
... ... @@ -99,6 +99,7 @@ class NewsaleData
$param['method'] = 'app.search.newProduct';
} else {
$param['method'] = 'app.search.sales';
$param['p_d'] = '0.1,0.9';
}
$param['page'] = $page;
$param['limit'] = $limit;
... ...
... ... @@ -462,12 +462,18 @@ class HomeController extends AbstractAction
*/
public function onlineServiceDetailAction()
{
$service = array();
$service = array();
$cateId = $this->get('cateId', 0);
$cateName = $this->get('cateName', '');
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);
$questionInfo = $res['data'];
if ($questionInfo) {
if (isset($res['code']) && $res['code'] === 200) {
$questionInfo = $res['data'];
$list = array();
if ($questionInfo) {
foreach ($questionInfo as $qk => $qv) {
$list[$qk]['q'] = $qv['title'];
$list[$qk]['a'] = $qv['content'];
}
foreach ($questionInfo as $qk => $qv) {
$list[$qk]['q'] = $qv['title'];
$list[$qk]['a'] = $qv['content'];
}
//处理返回信息
$result = array(
'header' => array('title' => '在线客服'),
'list' => $list
);
!empty($list) && $result['list'] = $list;
}
return $result;
}
... ...