🐛 #2016 【企业微信】修复第三方应用 getLoginInfo 接口参数问题

This commit is contained in:
Yang Liu 2021-02-26 11:48:22 +08:00 committed by GitHub
parent 3f9bba4c63
commit f002311b69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -440,8 +440,8 @@ public abstract class BaseWxCpTpServiceImpl<H, P> implements WxCpTpService, Requ
public WxTpLoginInfo getLoginInfo(String authCode) throws WxErrorException { public WxTpLoginInfo getLoginInfo(String authCode) throws WxErrorException {
JsonObject jsonObject = new JsonObject(); JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("auth_code", authCode); jsonObject.addProperty("auth_code", authCode);
jsonObject.addProperty("access_token", configStorage.getProviderToken()); String access_token = getWxCpProviderToken();
String responseText = post(configStorage.getApiUrl(GET_LOGIN_INFO), jsonObject.toString()); String responseText = post(configStorage.getApiUrl(GET_LOGIN_INFO) + "?access_token=" + access_token, jsonObject.toString());
return WxTpLoginInfo.fromJson(responseText); return WxTpLoginInfo.fromJson(responseText);
} }