看了微擎的文档也不知道带参数二维码到底属于哪一类消息,直接把文档里面支持的消息类型全部写上
<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型的,在处理订阅消息的时候有个坑,如果这个消息已经在其他地方被直接处理了就不会进到订阅消息的处理流程了