springmvc jquery ajax success 不进success
后台走了,不进前台的success方法里边。进error了。
怎么能进success??
@RequestMapping("/getQiciDown")
@ResponseBody
public String getQiciDown(Model model,String city) throws UnsupportedEncodingException {
// String s = new String(qc.getBytes("iso-8859-1"),"utf-8");
System.out.println("000==========================="+city);
ReportMx bean = new ReportMx();
bean.setCity(city);
List<ReportMx> qicidown = reportMxService.getQiciDown(bean);
model.addAttribute("qicidown",qicidown);
return "{success:true}";
}
===========================================
function getcity(val){
$.ajax({
type: "post",
async:false,
url: "admin/navigation/system/report/getQiciDown",
data:{
city:val
},
dataType: "json",
success: function(msg) {
alert(1111);
alert(msg);
},error:function()
{
alert(222);
},
});
}