From c9272d5c1ef2a7ee9b244f4455f61fa3f93a5933 Mon Sep 17 00:00:00 2001 From: 1212e Date: Wed, 3 Jun 2015 16:52:08 +0800 Subject: [PATCH] Fix color --- 模板消息.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/模板消息.md b/模板消息.md index cfe5844..e8f2dc2 100644 --- a/模板消息.md +++ b/模板消息.md @@ -90,12 +90,12 @@ $messageId = $notice->uses($templateId)->withUrl($url)->andData($data)->andRecei ```php $data = array( - "first" => "恭喜你购买成功!", - "keynote1" => "巧克力", - "keynote2" => "39.8元", - "keynote3" => "2014年9月16日", - "remark" => "欢迎再次购买!", - ); + "first" => "恭喜你购买成功!", + "keynote1" => "巧克力", + "keynote2" => "39.8元", + "keynote3" => "2014年9月16日", + "remark" => "欢迎再次购买!", + ); ``` 默认颜色为'#173177', 你可以通过 `defaultColor($color)` 来修改 @@ -105,23 +105,23 @@ $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"), + ); ``` + 复杂型(也是微信官方唯一支持的方式,估计没有人想这么用): ```php $data = array( - "first" => array("value" => "恭喜你购买成功!", "color" => '#555555'), - "keynote1" => array("value" => "巧克力", "color" => "#336699"), - "keynote2" => array("value" => "39.8元","color" => "FF0000"), - "keynote3" => array("value" => "2014年9月16日", "color" => "#888888"), - "remark" => array("value" => "欢迎再次购买!", "color" => "#5599FF"), - ); + "first" => array("value" => "恭喜你购买成功!", "color" => '#555555'), + "keynote1" => array("value" => "巧克力", "color" => "#336699"), + "keynote2" => array("value" => "39.8元","color" => "#FF0000"), + "keynote3" => array("value" => "2014年9月16日", "color" => "#888888"), + "remark" => array("value" => "欢迎再次购买!", "color" => "#5599FF"), + ); ``` 关于模板消息的使用请参考:http://mp.weixin.qq.com/wiki/17/304c1885ea66dbedf7dc170d84999a9d.html \ No newline at end of file