Request URL: http://localhost:8081/api/tableData.json
Request Method: POST
Status Code: 404 Not Found
Remote Address: 127.0.0.1:8081
Referrer Policy: no-referrer-when-downgrade
connection: close
content-length: 166
content-security-policy: default-src 'self'
content-type: text/html; charset=utf-8
date: Thu, 27 Sep 2018 06:43:10 GMT
Vary: Accept-Encoding
x-content-type-options: nosniff
x-powered-by: Express
Accept: application/json, text/plain, /
Accept-Encoding: gzip, deflate, br
Accept-Language: zh-CN,zh;q=0.9
Connection: keep-alive
Content-Length: 0
Host: localhost:8081
Origin: http://localhost:8081
Referer: http://localhost:8081/
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36
init () {
axios.post('/api/tableData.json')
.then(this.handleGetDataSucc)
},
handleGetDataSucc(res){
res=res.data
if(res.ret && res.data) {
const data = res.data
this.pageData = data.pageData
}
为什么设置代理后访问不到数据?
cannot post
为什么不用get?