微擎模块订阅带参数二维码

作者: admin 日期: 2017-12-09 21:11:20 人气: - 评论: 0

看了微擎的文档也不知道带参数二维码到底属于哪一类消息,直接把文档里面支持的消息类型全部写上


<subscribes>
<message type="text" />
<message type="image" />
<message type="voice" />
<message type="video" />
<message type="shortvideo" />
<message type="location" />
<message type="link" />
<message type="subscribe" />
<message type="unsubscribe" />
<message type="qr" />
<message type="trace" />
<message type="click" />
<message type="view" />
<message type="merchant_order" />
<message type="user_get_card" />
<message type="user_del_card" />
<message type="user_consume_card" />
</subscribes>


receiver.php 文件


public function receive() {
$type = $this->message['type'];
   //载入日志函数
   if($type=="qr"){
$scene =  $this->message['scene'];
       //记录文本日志
       logging_run('记录字符串日志数据');
       logging_run($scene);
   }
//这里定义此模块进行消息订阅时的, 消息到达以后的具体处理过程, 请查看微擎文档来编写你的代码
}

$scene就是带参数二维码的参数好像只能为int型的,在处理订阅消息的时候有个坑,如果这个消息已经在其他地方被直接处理了就不会进到订阅消息的处理流程了


相关内容

发表评论
更多 网友评论0 条评论)
暂无评论

Copyright © 2012-2014 我的代码板 Inc. 保留所有权利。

页面耗时0.0247秒, 内存占用1.83 MB, 访问数据库13次

闽ICP备15009223号-1