爱玩登录

master
duhui 2022-04-12 14:40:19 +08:00
parent 204cd21570
commit f96816e570
1 changed files with 10 additions and 11 deletions

View File

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