方法一
发送消息
https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=
文本方式
$txt = '{ "touser":"xxx", "msgtype":"miniprogrampage", "miniprogrampage":{ "title":"XX小程序", "appid":"小程序的appid", "pagepath":"pages/index/authorize", "thumb_media_id":"媒体id" } }';
方法二
用文本方式
$result = '<a data-miniprogram-appid="小程序的appid" data-miniprogram-path="pages/index/authorize" href="http://www.qq.com">跳转到小程序</a>';
参考接口详细信息https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Service_Center_messages.html#%E5%8F%91%E9%80%81%E5%B0%8F%E7%A8%8B%E5%BA%8F%E5%8D%A1%E7%89%87