コード例 #1
0
ファイル: reply.php プロジェクト: ldong728/ashtonmall
function normalReply($weixin, $msg)
{
    if ($msg['MsgType'] == 'voice') {
        sendKFMessage($msg['FromUserName'], '已为您接入人工客服,请稍候');
        $weixin->toKFMsg();
        updateWechatMode($msg['from'], 'kf');
    } elseif ($msg['MsgType'] == 'img') {
        //         mylog('type:'.$msg['MsgType']);
        //         $weixin->replyText('你好');
    } else {
        $content = $msg['content'];
        if (preg_match('/^dy[0-9]\\d*$/', $content)) {
            $weixin->replyText(expressQuery($msg, $content));
        }
    }
}
コード例 #2
0
ファイル: event.php プロジェクト: ldong728/ashtonmall
function kf_close_session($msg)
{
    updateWechatMode($msg['from'], 'normal');
}