getDataFunc() {
let that = this;
axios.get('/api/test.php')
.then(function(response) {
console.log(response);
})
.catch(function(error) {
console.log(error);
});
},
Network里面看响应码是200,且返回了json数据,但是没有执行then直接执行了catch,且error还是undefined。
————
想请问是什么原因?
看一下你是给 axios 配了拦截器(
interceptors
)之类的么,感觉是拦截器里面抛出异常了。