一、效果图

 

 

 二、代码

require_once \'../../../common.inc.php\';
require_once \'./wechat.class.php\'; //微信接口封装
$options = include_once "./config.php"; //app、secret等配置
$wx = new Wechat($options);

$wx->getRev();
$wx->KFservice()->reply();
    /**
     * 消息转发到客服
     * $obj->KFservice()->reply();
     * @return $this
     */
    public function KFservice()
    {
        $msg = array(
            \'ToUserName\' => $this->getRevFrom(),
            \'FromUserName\' => $this->getRevTo(),
            \'MsgType\' => \'transfer_customer_service\',
            \'CreateTime\' => time()
        );
        $this->Message($msg);
        return $this;
    }

 

版权声明:本文为yang-2018原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/yang-2018/p/14277154.html