1.问题后台获取不到Ajax传过来的值2.贴上相关代码前台ajax请求; $.ajax({ url:user/updateHeadImage, date:{userId:"1",headImage:"Image"}, dataType:'json', //type:'POST', success:function(data){ if(data.success){ alert(data.data); }else{ common.failure(data.data); } }.bind(this), error:function(xhr, status, err){ console.error(url, status, err.toString()); }.bind(this) })3.后台java代码:@RequestMapping(value = "/updateHeadImage") @ResponseBody public Result updateHeadImage(Integer userId,String headImage)throws AppException{ memberService.updateHeadImage(userId, headImage); Member member=new Member(); member.setId(userId); member.setHeadImage(headImage); return new Result<>(true,member); }4.贴上相关截图
添加回答
举报
0/150
提交
取消