|
@@ -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
|
|