|
@@ -144,14 +144,14 @@ public class WeChatService {
|
|
|
String requestUrl = "https://api.weixin.qq.com/sns/jscode2session";
|
|
|
Map<String, String> requestUrlParam = new HashMap<String, String>(4);
|
|
|
// 小程序appId
|
|
|
- requestUrlParam.put("appId", miniAppId);
|
|
|
+ requestUrlParam.put("appid", miniAppId);
|
|
|
log.info("appId: ---" + miniAppId);
|
|
|
// 小程序appSecret
|
|
|
- requestUrlParam.put("appSecret", miniAppSecret);
|
|
|
+ requestUrlParam.put("secret", miniAppSecret);
|
|
|
// 小程序端返回的code
|
|
|
- requestUrlParam.put("code", code);
|
|
|
+ requestUrlParam.put("js_code", code);
|
|
|
// 默认参数
|
|
|
- requestUrlParam.put("grantType", "authorization_code");
|
|
|
+ requestUrlParam.put("grant_type", "authorization_code");
|
|
|
// 发送post请求读取调用微信接口获取openid用户唯一标识
|
|
|
String infos;
|
|
|
try {
|