Ver código fonte

解决微信报错问题

吴学文 6 anos atrás
pai
commit
7c6220fd08

+ 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", "返回报文中未包含 错误编码,接口出错");