-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Media::updateNews() 方法与微信API不一致 #29
Comments
@acgrid 妹的微信应该是改了这个 API,之前我故意加个 |
Closed
This was referenced Aug 28, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
修改图文信息的方法
https://github.com/overtrue/wechat/blob/master/src/Wechat/Media.php#L179
对传入的数组又放入了一个新的数组中。
微信API: http://mp.weixin.qq.com/wiki/4/19a59cba020d506e767360ca1be29450.html
示例如下:
注意articles键的值是一个关联数组。
也就是说发布图文消息时$article的结构是[{},{},{}],在更新时只能根据index更新各项{}。
我因为只需要发单图文信息,直接把[]去掉就可以了。
对于需要编辑多图文的客户端代码,确实有可能忘记提取元素(我一开始也写成发布和更新传入的参数一样,改了以后发现还是不对才去看的源码),感觉这样就可以偷懒了?
The text was updated successfully, but these errors were encountered: