easy-swoole/wechat

小程序发送模板消息参数格式化错误

jackwangshukai opened this issue · 1 comments

namespace EasySwoole\WeChat\Bean\MiniProgram;

TemplateMsg类
getSendMessage 里格式化data 参数现在data 参数感觉按官方文档来传递的话这里的格式化会有错误。理论上直接按官方文档传递即可,不太明白这几行代码的意思

if (!empty($message['data'])) { foreach ($message['data'] as $key => $data) { $key = key(reset($data)); $value = current(reset($data)); $message['data'][$key] = [$key => ['value' => $value]]; } }

已修复,之前太忙了