\Overtrue\Wechat\Notice::formatData 解析数组键值方式与wiki不符

justplaymore 2015-08-11 10:34:40 +08:00
parent 224a0f3316
commit 8a6f29129a

@ -105,11 +105,11 @@ $messageId = $notice->uses($templateId)->withUrl($url)->andData($data)->andRecei
```php
$data = array(
"first" => array("恭喜你购买成功!", '#555555'),
"keynote1" => array("巧克力", "#336699"),
"keynote2" => array("39.8元", "#FF0000"),
"keynote3" => array("2014年9月16日", "#888888"),
"remark" => array("欢迎再次购买!", "#5599FF"),
"first" => array("恭喜你购买成功!" => '#555555'),
"keynote1" => array("巧克力" => "#336699"),
"keynote2" => array("39.8元" => "#FF0000"),
"keynote3" => array("2014年9月16日" => "#888888"),
"remark" => array("欢迎再次购买!" => "#5599FF"),
);
```
+ 复杂型(也是微信官方唯一支持的方式,估计没有人想这么用):