Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

模板消息的颜色设置问题 #914

Closed
imxfly opened this issue Sep 8, 2017 · 7 comments
Closed

模板消息的颜色设置问题 #914

imxfly opened this issue Sep 8, 2017 · 7 comments

Comments

@imxfly
Copy link

imxfly commented Sep 8, 2017

我用的环境

PHP 版本:7.1.2
overtrue/wechat 版本:3.3

问题及现象

模板消息中的数据项颜色我通过 defaultColor($color) 来统一修改,但是调用该方法后安卓上的微信可以收到颜色正确的模板消息,但是IOS上的微信收到的模板消息数据项内容全变空了。

$this->notice->to($openid)->uses($templateId)->defaultColor($color)->data($body)->send();

当我将该方法去掉后就都正常能显示了,然后又尝试了独立设置每个模板项颜色:

$body = array(
    "first"    => array("恭喜你购买成功!", '#555555'),
    // ...
);

这样也是正常的。

@overtrue
Copy link
Collaborator

overtrue commented Sep 8, 2017

官方已经不支持了吧,官方文档都去掉颜色相关的部分了

@imxfly
Copy link
Author

imxfly commented Sep 9, 2017

我就是看官方文档这么写才用的呢,官方文档截图如下:

example

@imxfly
Copy link
Author

imxfly commented Sep 9, 2017

贴个有锚点的链接吧:传送门

@overtrue
Copy link
Collaborator

overtrue commented Sep 9, 2017

我说的是微信官方。。。

@imxfly
Copy link
Author

imxfly commented Sep 10, 2017

我晕,还以为是easywechat的官方文档咧。。。 🙊 🙊 🙊

@imxfly
Copy link
Author

imxfly commented Sep 10, 2017

微信官方文档上目前还是有颜色设置的描述的,然后我想说的是,既然微信官方仍然提供颜色设置的,并且easywechat提供了批量设置默认颜色的方法,但是使用该方法后出现的问题就和微信官方无关了吧 😢

@imxfly
Copy link
Author

imxfly commented Sep 10, 2017

t

GO

@overtrue overtrue closed this as completed Dec 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants