1.将发送的客服消息封装到数组中
2.POST给微信接口数据:https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=ACCESS_TOKEN
3.用户手机端收到模板消息
问题:客服消息发送文本消息的时候中文乱码
解决:采用JSON_UNESCAPED_UNICODE(中文不转为unicode)即可:
Http::post($url,json_encode($data,JSON_UNESCAPED_UNICODE))