var reqData = {
tel:this.usertel,
pwd:this.$md5(this.userpwd)
};
$.ajax({
url: config.loginUrl,
type: 'POST',
async:false,
data: JSON.stringify(reqData) ,
// contentType: 'application/json',
dataType: 'application/json',
timeout: 5000,
success: function (response) {
console.log(response)
},
error: function () {
console.log("#####error#####")
}
});
用postman测试接口是没问题的,返回了json对象,但是用这个Ajax调用,可以调用到对应的服务,但是拿不到返回的响应信息,直接走的error。求大神教我。前端response里面是failed to load response data.