Authored by xiaowei

重构-在线客服

@@ -261,10 +261,13 @@ class HomeController extends AbstractAction @@ -261,10 +261,13 @@ class HomeController extends AbstractAction
261 { 261 {
262 $service = array(); 262 $service = array();
263 $cateId = $this->get('cateId', 0); 263 $cateId = $this->get('cateId', 0);
  264 + $cateName = $this->get('cateName', '');
264 if ($cateId > 0) 265 if ($cateId > 0)
265 { 266 {
266 $service = home\OnlineModel::getOnlineServiceDetail($cateId); 267 $service = home\OnlineModel::getOnlineServiceDetail($cateId);
267 } 268 }
  269 + $this->setTitle('在线客服');
  270 + $this->setNavHeader($cateName, true, '');
268 $this->_view->display('online_service_detail', $service); 271 $this->_view->display('online_service_detail', $service);
269 } 272 }
270 273
@@ -42,7 +42,7 @@ class OnlineModel @@ -42,7 +42,7 @@ class OnlineModel
42 foreach ($sub as $sk => $sv) 42 foreach ($sub as $sk => $sv)
43 { 43 {
44 $qTmp[$sk]['title'] = $sv['category_name']; 44 $qTmp[$sk]['title'] = $sv['category_name'];
45 - $qTmp[$sk]['link'] = '/home/onlineservicedetail?cateId=' . $sv['id']; 45 + $qTmp[$sk]['link'] = '/home/onlineservicedetail?cateId=' . $sv['id'].'&cateName='.$sv['category_name'];
46 } 46 }
47 } 47 }
48 $question[$key]['list'] = $qTmp; 48 $question[$key]['list'] = $qTmp;