为了账号安全,请及时绑定邮箱和手机立即绑定

AJAX 传送data 服务器报错是什么原因?

AJAX 传送data 服务器报错是什么原因?

www说 2018-08-20 10:09:49
showInput:function(){var t = this;alert("增加工作经验");$.ajax({type:"POST",async:true,url:globeo_.url+"/api/student/jycs/resume/insert/work",data:{company:t.company,department:t.department,duty:t.duty,starttime:t.starttime,endtime:t.endtime},dataType:"json",beforeSend: function (jqXHR, options) {globeo_.sendToken(jqXHR);},success:function(data,status,xhr){//console.log(xhr);//globeo_.getToken(xhr);console.log(data);if(data.status==1){alert("添加成功");location.reload();}else{alert("添加失败");}},error:function(){alert("网络错误,请检查接口");}}请求头里面有data数据控制台报错为:{status: 0, info: "服务器出错!"}
查看完整描述

1 回答

?
慕虎7371278

TA贡献1802条经验 获得超4个赞

检查下url是否正确 或者data 应该就是这两个哪个出错了


查看完整回答
反对 回复 2018-09-13
  • 1 回答
  • 0 关注
  • 773 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信