Authored by Rock Zhang

Merge branch 'hotfix/apichange-bug' into develop

Code Review By Rock Zhang
@@ -99,6 +99,7 @@ class NewsaleData @@ -99,6 +99,7 @@ class NewsaleData
99 $param['method'] = 'app.search.newProduct'; 99 $param['method'] = 'app.search.newProduct';
100 } else { 100 } else {
101 $param['method'] = 'app.search.sales'; 101 $param['method'] = 'app.search.sales';
  102 + $param['p_d'] = '0.1,0.9';
102 } 103 }
103 $param['page'] = $page; 104 $param['page'] = $page;
104 $param['limit'] = $limit; 105 $param['limit'] = $limit;
@@ -468,6 +468,12 @@ class HomeController extends AbstractAction @@ -468,6 +468,12 @@ class HomeController extends AbstractAction
468 if ($cateId > 0) { 468 if ($cateId > 0) {
469 $service = Home\OnlineModel::getOnlineServiceDetail($cateId); 469 $service = Home\OnlineModel::getOnlineServiceDetail($cateId);
470 } 470 }
  471 +
  472 + $service = array(
  473 + 'header' => array('title' => '在线客服'),
  474 + 'service' => $service
  475 + );
  476 +
471 $this->setTitle('在线客服'); 477 $this->setTitle('在线客服');
472 $this->setNavHeader($cateName, true, ''); 478 $this->setNavHeader($cateName, true, '');
473 $this->_view->display('online-service-detail', $service); 479 $this->_view->display('online-service-detail', $service);
@@ -70,21 +70,17 @@ class OnlineModel @@ -70,21 +70,17 @@ class OnlineModel
70 return $result; 70 return $result;
71 } 71 }
72 $res = OnlineData::getOnlineServiceDetail($cateId, $clinetType); 72 $res = OnlineData::getOnlineServiceDetail($cateId, $clinetType);
  73 + if (isset($res['code']) && $res['code'] === 200) {
73 $questionInfo = $res['data']; 74 $questionInfo = $res['data'];
74 - if ($questionInfo) {  
75 $list = array(); 75 $list = array();
76 - if ($questionInfo) {  
77 foreach ($questionInfo as $qk => $qv) { 76 foreach ($questionInfo as $qk => $qv) {
78 $list[$qk]['q'] = $qv['title']; 77 $list[$qk]['q'] = $qv['title'];
79 $list[$qk]['a'] = $qv['content']; 78 $list[$qk]['a'] = $qv['content'];
80 } 79 }
  80 +
  81 + !empty($list) && $result['list'] = $list;
81 } 82 }
82 - //处理返回信息  
83 - $result = array(  
84 - 'header' => array('title' => '在线客服'),  
85 - 'list' => $list  
86 - );  
87 - } 83 +
88 return $result; 84 return $result;
89 } 85 }
90 86