Action()
{
//获取响应结果
web_reg_save_param("system_code",
"LB=system_code\":\"",//匹配的左边界
"RB=\"",//匹配的右边界
LAST);

web_reg_save_param("session_id",
"LB=session_id\":\"",
"RB=\"",
LAST);

//获取当前时间戳
web_save_timestamp_param("time_stamp", LAST);
lr_output_message("当前时间戳:%s",lr_eval_string("{time_stamp}"));
lr_save_string("15800929086","mobile");
lr_output_message("当前手机号:%s",lr_eval_string("{mobile}"));
lr_save_string("http://192.168.8.151:5200","url");
lr_rendezvous("集合点");
lr_start_transaction("获取session");
web_custom_request("web_custom_request",
"URL={url}/560/system/getSession",
"Method=POST",
"Resource=0",
"RecContentType=application/json",
"Referer=",
"Mode=HTTP",
"EncType=application/json",
"Body={"
"\"destination\":\"system.getSession\","
"\"mobile\":\"{mobile}\","
"\"imei\":\"ffffffff-b210-bf58-ffff-ffff99d603a9\","
"\"req_source\":\"1\","
"\"phone_model\":\"xiaomi\","
"\"time_stamp\":\"{time_stamp}\","
"\"session_id\": \"\","
"\"system_version\":\"Android_7.0\","
"\"version\":\"2.3.5\","
"\"inno_version\":\"2358888\","
"\"ip_address\":\"192.168.0.11\","
"\"parameter\":{}}"
,LAST);
lr_end_sub_transaction("获取session",LR_ABORT);
lr_output_message("system_code:%s",lr_eval_string("{system_code}"));
if(atoi(lr_eval_string("{system_code}")) == 200)
lr_output_message("system_code:%s,请求成功!",(lr_eval_string("{system_code}")));
else
lr_output_message("system_code:%s,请求失败!",(lr_eval_string("{system_code}")));
//打印sessionID
lr_output_message("session_id:%s",lr_eval_string("{session_id}"));
lr_log_message("!-----------执行结束------------------!");

web_custom_request("web_custom_request",
"URL={url}/560/user-service/user/login",
"Method=POST",
"Resource=0",
"RecContentType=application/json",
"Referer=",
"Mode=HTTP",
"EncType=application/json",
"Body={\"destination\":\"user.login\","
"\"mobile\":\"{mobile}\","
"\"imei\":\"ffffffff-b210-bf58-ffff-ffff99d603a9\","
"\"req_source\":\"2\","
"\"phone_model\":\"xiaomi\","
"\"time_stamp\":\"{time_stamp}\","
"\"session_id\":\"{session_id}\","
"\"system_version\":\"Android_7.0\","
"\"version\":\"2.3.5\","
"\"inno_version\":\"2358888\","
"\"ip_address\":\"192.168.0.11\","
"\"parameter\":{\"mobile\":\"{mobile}\","
"\"pass_word\":\"123456\","
"\"msg_push_token\":\"ssss\","
"\"login_address\":\"102421\","
"\"login_type\":\"1\"}}",LAST);

return 0;

}

05-11 22:53