File tree Expand file tree Collapse file tree
weixin-java-mp/src/main/java/me/chanjar/weixin/mp/bean/result Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66
77import java .io .Serializable ;
88
9+ /**
10+ * https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421140842
11+ */
912@ Data
1013public class WxMpOAuth2AccessToken implements Serializable {
1114 private static final long serialVersionUID = -1345910558078620805L ;
@@ -20,6 +23,10 @@ public class WxMpOAuth2AccessToken implements Serializable {
2023
2124 private String scope ;
2225
26+ /**
27+ * https://mp.weixin.qq.com/cgi-bin/announce?action=getannouncement&announce_id=11513156443eZYea&version=&lang=zh_CN.
28+ * 本接口在scope参数为snsapi_base时不再提供unionID字段。
29+ */
2330 private String unionId ;
2431
2532 public static WxMpOAuth2AccessToken fromJson (String json ) {
Original file line number Diff line number Diff line change @@ -31,7 +31,13 @@ public class WxMpUser implements Serializable {
3131 private String headImgUrl ;
3232 private Long subscribeTime ;
3333 /**
34+ * https://mp.weixin.qq.com/cgi-bin/announce?action=getannouncement&announce_id=11513156443eZYea&version=&lang=zh_CN
35+ * <pre>
3436 * 只有在将公众号绑定到微信开放平台帐号后,才会出现该字段。
37+ * 另外,在用户未关注公众号时,将不返回用户unionID信息。
38+ * 已关注的用户,开发者可使用“获取用户基本信息接口”获取unionID;
39+ * 未关注用户,开发者可使用“微信授权登录接口”并将scope参数设置为snsapi_userinfo,获取用户unionID
40+ * </pre>
3541 */
3642 private String unionId ;
3743 private Integer sexId ;
You can’t perform that action at this time.
0 commit comments