jeesite的controller返回消息到页面弹窗
controller方法上一定要加@ResponseBody注解,否则弹Undefined
@RequestMapping(value = "importExcel")
@ResponseBody
public String importFile(MultipartFile file) {
//业务
return renderResult(Global.TRUE, text("批量导入成功!"));
}
$("#inputForm2").validate({
submitHandler: function(form){
js.ajaxSubmitForm($(form), function(data){
js.showMessage(data.message);
if(data.result == Global.TRUE){
js.closeCurrentTabPage(function(contentWindow){
contentWindow.page();
});
}
}, "json");
}
});