TA的每日心情 | 开心 2018-5-3 18:09 |
---|
签到天数: 2 天 连续签到: 1 天 [LV.1]测试小兵
|
Action()
{
char arrayParamName[50];
int count;
int x;
web_submit_data("Index",
"Action=http://localhost/clinical/Login/Index",
"Method=POST",
"TargetFrame=",
"RecContentType=application/json",
"Referer=http://localhost/clinical/login/index",
"Snapshot=t62.inf",
"Mode=HTML",
ITEMDATA,
"Name=userName", "Value=30048", ENDITEM,
"Name=password", "Value=5436", ENDITEM,
"Name=remember", "Value=1", ENDITEM,
LAST);
web_reg_save_param_ex("ParamName=newParam",
"LB/IC=HospitalNumber\":\"",
"RB/IC=\",\"PatName",
"Ordinal=all",
SEARCH_FILTERS,
"Scope=body",
LAST);
web_custom_request("GetTable",
"Method=POST",
"Url=http://localhost/clinical/ReferralAppointment/GetTableData",
"Body=jsonData={\"Rp\":20,\"Page\":1,\"Sortname\":\"NextReferralTime\",\"Sortorder\":\"asc\",\"DateTimeBegin\":\"1900-01-01 00:00:00\",\"DateTimeEnd\":\"2090-01-01 23:59:59\",\"BelongingDoctor\":\"\"}",
LAST);
count = atoi(lr_eval_string("{newParam_count}"));
lr_output_message("总记录数: %d",count);
for (x=1;x<=count;x++)
{
sprintf(arrayParamName, "{newParam_%d}", x);
lr_output_message ("%s: %s",arrayParamName,lr_eval_string(arrayParamName));
}
return 0;
}
附图里是输出结果,你只需要把你的这个请求函数写到循环里即可
|
评分
-
查看全部评分
|