使用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屬性查了很久了,試了很多方法都無效,請問是什么問題??
vue-resource中使用post方法請求json報404錯誤
慕田峪4524236
2018-10-19 11:10:10