修改测试环境登录问题
This commit is contained in:
@@ -249,7 +249,7 @@ public class WechatUtil {
|
|||||||
try {
|
try {
|
||||||
System.out.println("appid==============="+appid);
|
System.out.println("appid==============="+appid);
|
||||||
System.out.println("secret================"+secret);
|
System.out.println("secret================"+secret);
|
||||||
String response = getAccessData("http://192.168.2.102:10044/weixin?appid="+appid+"&secret="+secret+"&js_code="+code+"&grant_type=authorization_code");
|
String response = getAccessData("https://api.weixin.qq.com/sns/jscode2session?appid="+appid+"&secret="+secret+"&js_code="+code+"&grant_type=authorization_code");
|
||||||
JSONObject result = JSONObject.parseObject(response);
|
JSONObject result = JSONObject.parseObject(response);
|
||||||
// 微信返回错误码处理
|
// 微信返回错误码处理
|
||||||
if (result.containsKey("errcode") && result.getInteger("errcode") != 0) {
|
if (result.containsKey("errcode") && result.getInteger("errcode") != 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user