vue获取本地json,一直404
文件位置
代码
Vue.prototype.$http = axios this.$http.get('/src/api/testJson.json').then(response => { console.log(response) }, response => { // error callback })
你直接在浏览器访问http://localhost:8090/src/api...,看能不能访问
755k questions
754k answers
5 comments
53.3k users