[已解决]jeesite的controller返回自定义消息到页面弹窗

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");
        }
    });

猜你喜欢

转载自blog.csdn.net/weixin_42788392/article/details/88748132
今日推荐