作者 郭文星

121

... ... @@ -108,7 +108,7 @@ class Index extends Api
// 构造要发送的消息数据
$data = [
'touser' => $unionId,
'touser' => $openId,
'msgtype' => 'text',
'text' => [
'content' => '你好,这是一个公众号消息'
... ... @@ -129,7 +129,6 @@ class Index extends Api
// 处理响应结果
$result = json_decode($response, true);
print_r($result);return;
if ($result['errcode'] == 0) {
echo "消息发送成功";
} else {
... ...