@@ -97,10 +97,7 @@ public function getCustomServiceOnlineKFlist() {
9797 * @return bool|array
9898 */
9999 public function createKFSession ($ openid , $ kf_account , $ text = '' ) {
100- $ data = array (
101- "openid " => $ openid ,
102- "kf_account " => $ kf_account
103- );
100+ $ data = array ("openid " => $ openid , "kf_account " => $ kf_account );
104101 if ($ text ) {
105102 $ data ["text " ] = $ text ;
106103 }
@@ -133,10 +130,7 @@ public function createKFSession($openid, $kf_account, $text = '') {
133130 * }
134131 */
135132 public function closeKFSession ($ openid , $ kf_account , $ text = '' ) {
136- $ data = array (
137- "openid " => $ openid ,
138- "kf_account " => $ kf_account
139- );
133+ $ data = array ("openid " => $ openid , "kf_account " => $ kf_account );
140134 if ($ text ) {
141135 $ data ["text " ] = $ text ;
142136 }
@@ -220,23 +214,7 @@ public function getKFSessionlist($kf_account) {
220214
221215 /**
222216 * 获取未接入会话列表
223- * @param string $openid //用户openid
224- * @return bool | array //成功返回json数组
225- * array (
226- * 'count' => 150 , //未接入会话数量
227- * 'waitcaselist' => array (
228- * array (
229- * 'openid'=>'OPENID', //客户 openid
230- * 'kf_account ' =>'', //指定接待的客服,为空则未指定
231- * 'createtime'=>123456789, //会话创建时间,UNIX 时间戳
232- * ),
233- * array (
234- * 'openid'=>'OPENID', //客户 openid
235- * 'kf_account ' =>'', //指定接待的客服,为空则未指定
236- * 'createtime'=>123456789, //会话创建时间,UNIX 时间戳
237- * )
238- * )
239- * )
217+ * @return bool|array
240218 */
241219 public function getKFSessionWait () {
242220 if (!$ this ->access_token && !$ this ->getAccessToken ()) {
@@ -258,22 +236,13 @@ public function getKFSessionWait() {
258236 /**
259237 * 添加客服账号
260238 *
261- * @param string $account // 完整客服账号,格式为: 账号前缀@公众号微信号,账号前缀最多10个字符,必须是英文或者数字字符
262- * @param string $nickname // 客服昵称,最长6个汉字或12个英文字符
263- * @param string $password // 客服账号明文登录密码,会自动加密
239+ * @param string $account 完整客服账号( 账号前缀@公众号微信号,账号前缀最多10个字符)
240+ * @param string $nickname 客服昵称,最长6个汉字或12个英文字符
241+ * @param string $password 客服账号明文登录密码,会自动加密
264242 * @return bool|array
265- * 成功返回结果
266- * {
267- * "errcode": 0,
268- * "errmsg": "ok",
269- * }
270243 */
271244 public function addKFAccount ($ account , $ nickname , $ password ) {
272- $ data = array (
273- "kf_account " => $ account ,
274- "nickname " => $ nickname ,
275- "password " => md5 ($ password )
276- );
245+ $ data = array ("kf_account " => $ account , "nickname " => $ nickname , "password " => md5 ($ password ));
277246 if (!$ this ->access_token && !$ this ->getAccessToken ()) {
278247 return false ;
279248 }
@@ -304,11 +273,7 @@ public function addKFAccount($account, $nickname, $password) {
304273 * }
305274 */
306275 public function updateKFAccount ($ account , $ nickname , $ password ) {
307- $ data = array (
308- "kf_account " => $ account ,
309- "nickname " => $ nickname ,
310- "password " => md5 ($ password )
311- );
276+ $ data = array ("kf_account " => $ account , "nickname " => $ nickname , "password " => md5 ($ password ));
312277 if (!$ this ->access_token && !$ this ->getAccessToken ()) {
313278 return false ;
314279 }
@@ -327,14 +292,8 @@ public function updateKFAccount($account, $nickname, $password) {
327292
328293 /**
329294 * 删除客服账号
330- *
331- * @param string $account //完整客服账号,格式为:账号前缀@公众号微信号,账号前缀最多10个字符,必须是英文或者数字字符
295+ * @param string $account 完整客服账号(账号前缀@公众号微信号,账号前缀最多10个字符)
332296 * @return bool|array
333- * 成功返回结果
334- * {
335- * "errcode": 0,
336- * "errmsg": "ok",
337- * }
338297 */
339298 public function deleteKFAccount ($ account ) {
340299 if (!$ this ->access_token && !$ this ->getAccessToken ()) {
@@ -355,15 +314,9 @@ public function deleteKFAccount($account) {
355314
356315 /**
357316 * 上传客服头像
358- *
359- * @param string $account //完整客服账号,格式为:账号前缀@公众号微信号,账号前缀最多10个字符,必须是英文或者数字字符
360- * @param string $imgfile //头像文件完整路径,如:'D:\user.jpg'。头像文件必须JPG格式,像素建议640*640
317+ * @param string $account 完整客服账号(账号前缀@公众号微信号,账号前缀最多10个字符)
318+ * @param string $imgfile 头像文件完整路径,如:'D:\user.jpg'。头像文件必须JPG格式,像素建议640*640
361319 * @return bool|array
362- * 成功返回结果
363- * {
364- * "errcode": 0,
365- * "errmsg": "ok",
366- * }
367320 */
368321 public function setKFHeadImg ($ account , $ imgfile ) {
369322 if (!$ this ->access_token && !$ this ->getAccessToken ()) {
0 commit comments