使用vue-resource请求json文件时,使用get方法是可以获取到的this.$http.get('./static/json/banner.json')
.then((response) => { console.log(response.data);
}).catch((response) => { console.log(response);
});但是使用post就报404错误了this.$http.post('./static/json/banner.json', {})
.then((response) => { console.log(response.data);
}).catch((response) => { console.log(response);
});修改过emulateJSON属性与emulateHTTP属性将路径改成http://localhost:8080/static/...过给实例修改过headers属性查了很久了,试了很多方法都无效,请问是什么问题??
添加回答
举报
0/150
提交
取消