var saveData={"id":khbh,"msg":citybm};
$.ajax({
url:"../../personal/grxx/gjjdkcx.service",//查询个人账户和合同编号
type:"post",
data:JSON.stringify(saveData),
contentType:"application/json",
dataType:"json",
success:function(result){
cs={"grzhArr":[result.data[0].gjjxx[0].grzh],"htbhArr":[result.data[0].dkxx[0].htbh]};
console.log(cs)
getFunction(cs);
},error:function(){
alert("失败")
}
})
后台
public Object APP_Gr_getgjjdkcx(@RequestBody Req req) throws ConnectTimeoutException, SocketTimeoutException, Exception {
String s = JSONObject.fromObject(req).toString();
System.out.println("请求数据gjjdkcx +json:" + s);
String url = AplicationParams.instance().getDataurl()
+ "/app/personal/grxx/gjjdkcx.service";
String str=HttpClientUtils.poststr(url, s);
System.out.println("返回==str=="+str);
return str;
}