diff --git a/src/main/java/com/ljsd/service/QuickVerifyService3.java b/src/main/java/com/ljsd/service/QuickVerifyService3.java index bb94479..36ec61e 100644 --- a/src/main/java/com/ljsd/service/QuickVerifyService3.java +++ b/src/main/java/com/ljsd/service/QuickVerifyService3.java @@ -73,11 +73,22 @@ public class QuickVerifyService3 extends AbstractVerifyService { // 正式 ios if ("2".equals(platform) ) { - //测试服构建参数 - VerifyParams params = new VerifyParams(); - params.setProductCode(iosAppId); - VerifyParams testParam = getFormatParam(params,request, openId, token); - boolean result = doVerifyIos(testParam); + String sub_channel = request.getParameter("sub_channel"); + boolean result = false; + if (sub_channel != null && !sub_channel.equals("")) { + VerifyParams params = new VerifyParams(); + params.setProductCode(iosAppId); + VerifyParams param; + // 1000是测试服 + if (sub_channel.equals("1000")) { + param = getTestParam(params,request, openId, token); + result = verifyTestIos(param); + } else { + param = getFormatParam(params,request, openId, token); + result = verifyFormatIos(param); + } + + } if (!result) { response.sendError(400, "ios verify fail"); LOGGER.error("ios verify fail"); @@ -101,6 +112,16 @@ public class QuickVerifyService3 extends AbstractVerifyService { return doVerify(params); } + public boolean verifyTestIos(VerifyParams params) { + String url = "https://sandbox-sdk.ohayoo.cn/game_sdk/light_game/account/partner/check"; + return doVerifyIos(params,url); + } + + public boolean verifyFormatIos(VerifyParams params) { + String url = "https://ohayoo.cn/game_sdk/light_game/account/partner/check"; + return doVerifyIos(params,url); + } + @Override boolean doVerify(VerifyParams params) { LOGGER.info("quick登录验证-->{}",params.getOpenId()); @@ -123,9 +144,8 @@ public class QuickVerifyService3 extends AbstractVerifyService { return result; } - boolean doVerifyIos(VerifyParams params) { + boolean doVerifyIos(VerifyParams params, String url) { LOGGER.info("疯体 Ohayoo 登录验证-->{}",params.getOpenId()); - String url = "https://ohayoo.cn/game_sdk/light_game/account/partner/check"; Map parms = new HashMap<>(); parms.put("app_id",params.getProductCode()); parms.put("token",params.getToken());