/**
@多客服
@获取在线客服接待信息
@return kf_account 客服账号@微信别名
@return status 客服在线状态 1:pc在线,2:手机在线 若pc和手机同时在线则为 1+2=3
@return kf_id 客服工号
@return auto_accept 客服设置的最大自动接入数
@return accepted_case 客服当前正在接待的会话数
*/
function get_online_kf_list($i=0){
$url = "https://api.weixin.qq.com/cgi-bin/customservice/getonlinekflist?access_token=". $this->access_token;
$res = $this->https_request($url);
$data = json_decode($res, true);
//返回{ "errcode": -1, "errmsg": "system error" } 系统繁忙,求指点。
log_message('error', var_export($data, true), 'weixin-duokefu');
if(isset($data['errcode'])&&$data['errcode']=='40001'){
$i++;
$this->getAccessToken();
return $i<3?$this->get_online_kf_list($i):$data;
}
return $data;}
/**
@多客服
@获取在线客服接待信息
@return kf_account 客服账号@微信别名
@return status 客服在线状态 1:pc在线,2:手机在线 若pc和手机同时在线则为 1+2=3
@return kf_id 客服工号
@return auto_accept 客服设置的最大自动接入数
@return accepted_case 客服当前正在接待的会话数
*/
function get_online_kf_list($i=0){
$url = "https://api.weixin.qq.com/cgi-bin/customservice/getonlinekflist?access_token=". $this->access_token;
$res = $this->https_request($url);
$data = json_decode($res, true);
//返回{ "errcode": -1, "errmsg": "system error" } 系统繁忙,求指点。
log_message('error', var_export($data, true), 'weixin-duokefu');
if(isset($data['errcode'])&&$data['errcode']=='40001'){
$i++;
$this->getAccessToken();
return $i<3?$this->get_online_kf_list($i):$data;
}
return $data;}
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号