Commit 0eff8e59 authored by 734642908@qq.com's avatar 734642908@qq.com

消息推送

parent 65cb92f7
...@@ -30,23 +30,23 @@ class WechatController extends BaseController ...@@ -30,23 +30,23 @@ class WechatController extends BaseController
$token = json_decode($token,true)['access_token']; $token = json_decode($token,true)['access_token'];
$posturl = 'https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token='.$token; $posturl = 'https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token='.$token;
$data = '{ /*$data = '{
"touser":"'.$fromUsername.'", "touser":"'.$fromUsername.'",
"msgtype":"text", "msgtype":"text",
"text": "text":
{ {
"content":"再见" "content":"再见"
} }
}'; }';*/
/*$data = '{ $data = '{
"touser":"'.$fromUsername.'", "touser":"'.$fromUsername.'",
"msgtype":"image", "msgtype":"image",
"image": "image":
{ {
"media_id":"88DSz9hHd-7fc_PEZg9NH-O2bl7Jyp0fN-CRuCE0hxbWA3xzLuyUPNb2YxWrSF_2" "media_id":"AsEriSNkp4IZ6vUowg8bViVijbgvqOfbh6N_5r4B_9NLITJOAplkEWVjsz9r3LIp"
} }
}';*/ }';
//$data = json_encode($data); //$data = json_encode($data);
$re = $this->curlPost($posturl,$data,true); $re = $this->curlPost($posturl,$data,true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment