浏览代码

解决微信报错问题

吴学文 6 年之前
父节点
当前提交
7c6220fd08
共有 1 个文件被更改,包括 2 次插入 和 1 次删除
  1. 2 1
      AppFrontService/src/main/java/com/java110/app/smo/wxLogin/impl/WxLoginSMOImpl.java

+ 2 - 1
AppFrontService/src/main/java/com/java110/app/smo/wxLogin/impl/WxLoginSMOImpl.java

@@ -57,13 +57,14 @@ public class WxLoginSMOImpl extends AbstractComponentSMO implements IWxLoginSMO
         logger.debug("doLogin入参:" + paramIn.toJSONString());
         ResponseEntity<String> responseEntity;
         String code = paramIn.getString("code");
-        String urlString = "?appid={appid}&secret={srcret}&js_code={code}&grant_type={grantType}";
+        String urlString = "?appid={appId}&secret={secret}&js_code={code}&grant_type={grantType}";
         String response = restTemplate.getForObject(
                 wechatAuthProperties.getSessionHost() + urlString, String.class,
                 wechatAuthProperties.getAppId(),
                 wechatAuthProperties.getSecret(),
                 code,
                 wechatAuthProperties.getGrantType());
+
         logger.debug("微信返回报文:" + response);
 
         Assert.jsonObjectHaveKey(response, "errcode", "返回报文中未包含 错误编码,接口出错");