generated from root/miduo_server
爱玩登录
parent
204cd21570
commit
f96816e570
|
@ -94,25 +94,24 @@ public class AiWanVerifyService extends AbstractVerifyService {
|
||||||
@Override
|
@Override
|
||||||
boolean doVerify(VerifyParams params) {
|
boolean doVerify(VerifyParams params) {
|
||||||
LOGGER.info("AiWanVerifyService登录验证-->{}", params.getOpenId());
|
LOGGER.info("AiWanVerifyService登录验证-->{}", params.getOpenId());
|
||||||
String url = "https://apicn-sdk.jxywl.cn/user/auth";
|
String url = "https://apicn-sdk.jxywl.cn/user/auth?"
|
||||||
Map<String, String> parms = new HashMap<>();
|
+"app_id="+app_id
|
||||||
parms.put("app_id", app_id);
|
+"&account="+params.getOpenId()
|
||||||
parms.put("account", params.getOpenId());
|
+"&token="+params.getToken()
|
||||||
parms.put("token", params.getToken());
|
+"&time="+params.getTime()
|
||||||
parms.put("time", params.getTime());
|
+"&sign="+params.getParamSign();
|
||||||
parms.put("sign", params.getParamSign());
|
|
||||||
boolean result = false;
|
boolean result = false;
|
||||||
|
LOGGER.info("AiWanVerifyService请求参数:{}", url);
|
||||||
try {
|
try {
|
||||||
LOGGER.info("AiWanVerifyService请求参数:{}", parms);
|
String r = HttpUtils.httpGetRequest(url);
|
||||||
String r = HttpUtils.doPost(url, parms);
|
|
||||||
JSONObject jsonObject = JSON.parseObject(r);
|
JSONObject jsonObject = JSON.parseObject(r);
|
||||||
int errno = jsonObject.getIntValue("code");
|
int errno = jsonObject.getIntValue("code");
|
||||||
LOGGER.info("AiWanVerifyService请求结果:{}", r);
|
LOGGER.info("AiWanVerifyService请求结果:{}", r);
|
||||||
if (errno == 200) {
|
if (errno == 200) {
|
||||||
result = true;
|
result = true;
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
}catch (Exception e){
|
||||||
LOGGER.info("AiWanVerifyService验证失败,IOException");
|
LOGGER.error("AiWanVerifyService请求报错:{}",e.getMessage());
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue