Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2e14b54

Browse filesBrowse files
jnan88binarywang
authored andcommitted
🐛 binarywang#1276 修复微信开放平台获取授权列表接口token参数导致死循环的问题
WxOpenComponentServiceImpl#getAuthorizerList由post内部维护token,否则总是使用旧token导致死循环
1 parent e7a0d6a commit 2e14b54
Copy full SHA for 2e14b54

File tree

Expand file treeCollapse file tree

2 files changed

+2
-5
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+2
-5
lines changed

‎weixin-java-open/src/main/java/me/chanjar/weixin/open/api/WxOpenComponentService.java

Copy file name to clipboardExpand all lines: weixin-java-open/src/main/java/me/chanjar/weixin/open/api/WxOpenComponentService.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public interface WxOpenComponentService {
2727
String API_GET_AUTHORIZER_INFO_URL = "https://api.weixin.qq.com/cgi-bin/component/api_get_authorizer_info";
2828
String API_GET_AUTHORIZER_OPTION_URL = "https://api.weixin.qq.com/cgi-bin/component/api_get_authorizer_option";
2929
String API_SET_AUTHORIZER_OPTION_URL = "https://api.weixin.qq.com/cgi-bin/component/api_set_authorizer_option";
30-
String API_GET_AUTHORIZER_LIST = "https://api.weixin.qq.com/cgi-bin/component/api_get_authorizer_list?component_access_token=%s";
30+
String API_GET_AUTHORIZER_LIST = "https://api.weixin.qq.com/cgi-bin/component/api_get_authorizer_list";
3131

3232
String COMPONENT_LOGIN_PAGE_URL = "https://mp.weixin.qq.com/cgi-bin/componentloginpage?component_appid=%s&pre_auth_code=%s&redirect_uri=%s&auth_type=xxx&biz_appid=xxx";
3333

‎weixin-java-open/src/main/java/me/chanjar/weixin/open/api/impl/WxOpenComponentServiceImpl.java

Copy file name to clipboardExpand all lines: weixin-java-open/src/main/java/me/chanjar/weixin/open/api/impl/WxOpenComponentServiceImpl.java
+1-4Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -304,16 +304,13 @@ public WxOpenAuthorizerInfoResult getAuthorizerInfo(String authorizerAppid) thro
304304

305305
@Override
306306
public WxOpenAuthorizerListResult getAuthorizerList(int begin, int len) throws WxErrorException {
307-
308-
String url = String.format(API_GET_AUTHORIZER_LIST, getComponentAccessToken(false));
309307
begin = begin < 0 ? 0 : begin;
310308
len = len == 0 ? 10 : len;
311-
312309
JsonObject jsonObject = new JsonObject();
313310
jsonObject.addProperty("component_appid", getWxOpenConfigStorage().getComponentAppId());
314311
jsonObject.addProperty("offset", begin);
315312
jsonObject.addProperty("count", len);
316-
String responseContent = post(url, jsonObject.toString());
313+
String responseContent = post(API_GET_AUTHORIZER_LIST, jsonObject.toString());
317314
WxOpenAuthorizerListResult ret = WxOpenGsonBuilder.create().fromJson(responseContent, WxOpenAuthorizerListResult.class);
318315
if (ret != null && ret.getList() != null) {
319316
for (Map<String, String> data : ret.getList()) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.