Home > Backend Development > PHP Tutorial > 请教个问题:获取在线多客服列表。返回errorcode:-1,系统繁忙。是怎么回事?

请教个问题:获取在线多客服列表。返回errorcode:-1,系统繁忙。是怎么回事?

WBOY
Release: 2016-06-06 20:15:22
Original
1188 people have browsed it

/**

    • @多客服

    • @获取在线客服接待信息

    • @return kf_account 客服账号@微信别名

    • @return status 客服在线状态 1:pc在线,2:手机在线 若pc和手机同时在线则为 1+2=3

    • @return kf_id 客服工号

    • @return auto_accept 客服设置的最大自动接入数

    • @return accepted_case 客服当前正在接待的会话数
      */

    1. function get_online_kf_list($i=0){

      <code>   $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 $iget_online_kf_list($i):$data;
         }
         return $data;</code>
      Copy after login
      Copy after login

      }

    回复内容:

    /**

    • @多客服

    • @获取在线客服接待信息

    • @return kf_account 客服账号@微信别名

    • @return status 客服在线状态 1:pc在线,2:手机在线 若pc和手机同时在线则为 1+2=3

    • @return kf_id 客服工号

    • @return auto_accept 客服设置的最大自动接入数

    • @return accepted_case 客服当前正在接待的会话数
      */

    1. function get_online_kf_list($i=0){

      <code>   $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 $iget_online_kf_list($i):$data;
         }
         return $data;</code>
      Copy after login
      Copy after login

      }

    Related labels:
    php
    source:php.cn
    Statement of this Website
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
    Popular Tutorials
    More>
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template