日期:2014-05-18 浏览次数:20619 次
@RequestMapping({"getAstSingleWheelImg_bbs"+Constant.JSON})
@ResponseBody
public Result getImgUrl(HttpServletRequest request, Model model, WheelChart chart)throws ParseException{
String userName = request.getParameter("userName");
System.out.println("userName:"+userName);
String astroDate = request.getParameter("astroDate");
String astroHour = request.getParameter("astroHour");
String astroMin = request.getParameter("astroMin");
//略过部分代码
result.setSuccess(true);
result.setDesc(show_imgUrl);
System.out.println(show_imgUrl);
return result;
}
$.ajax({
type:"post",
contentType:"application/x-www-form-urlencoded",
cache:false,
url:request_url+"/getAstSingleWheelImg_bbs.jo",
data:a.serializeArray(),
dataType:"json",
timeout:200,
beforeSend: function () {
alert("正在处理请求,请稍后。。。。。");
},
success:function(result){
$("img_wheel").attr("src",result.desc);
alert(a.desc);
},
error:function(){
alert("服务器忙,请重试!");
}
});
}});
error: function(XMLHttpRequest, textStatus, errorThrown) {
alert(XMLHttpRequest.status);
alert(XMLHttpRequest.readyState);
alert(textStatus);