|
@@ -27,6 +27,7 @@ public class CreateInternalServiceImpl implements ICreateInternalService {
|
|
|
|
|
|
@Value("${jeecg.path.chrome-driver}")
|
|
|
private String chromeDriver;
|
|
|
+
|
|
|
@Override
|
|
|
public Map<String, Object> createInternal(JSONObject requestJson) {
|
|
|
String url = "https://ad.oceanengine.com/pages/login/index.html";
|
|
@@ -58,7 +59,7 @@ public class CreateInternalServiceImpl implements ICreateInternalService {
|
|
|
header.put("Content-Type", "application/x-www-form-urlencoded");
|
|
|
header.put("Origin", "https://ad.oceanengine.com");
|
|
|
header.put("Referer", "https://ad.oceanengine.com/pages/login/index.html");
|
|
|
- Map<String, Object> param = new HashMap<String, Object>();
|
|
|
+ Map<String, Object> param = new HashMap<>();
|
|
|
param.put("mobile", "");
|
|
|
param.put("code", "");
|
|
|
param.put("account", "dcd_ad@bytedance.com");
|
|
@@ -67,6 +68,8 @@ public class CreateInternalServiceImpl implements ICreateInternalService {
|
|
|
param.put("is_30_days_no_login", "true");
|
|
|
param.put("service", "https://ad.oceanengine.com");
|
|
|
String res = HttpUtils.httpPostParamRequest("https://sso.toutiao.com/account_login/", param, header);
|
|
|
+ System.out.println("res:" + new String(res.getBytes("GBK"), "UTF8"));
|
|
|
+
|
|
|
ObjectMapper mapper = new ObjectMapper();
|
|
|
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
|
|
JsonNode jsonNode = mapper.readTree(res);
|
|
@@ -88,7 +91,7 @@ public class CreateInternalServiceImpl implements ICreateInternalService {
|
|
|
param.put("captcha", resp.pred_resl);
|
|
|
orderId = resp.req_id;
|
|
|
res = HttpUtils.httpPostParamRequest("https://sso.toutiao.com/account_login/", param, header);
|
|
|
- System.out.println(res);
|
|
|
+ System.out.println("res:" + res);
|
|
|
jsonNode = mapper.readTree(res);
|
|
|
errorCode = jsonNode.get("error_code").asInt();
|
|
|
}
|