相同的代码在网页中没问题,在微信开发工具中却报错
百度又搜索不到
VM4473:1 (in promise) MiniProgramError
Request failed with status code undefined
Error: Request failed with status code undefined
报错代码处:
this.$http.post("api/report/phone", this.postdata).then(resp => {
if (resp.status === 2000) {
if(this.postdata.page==resp.data.pages){
this.pageMax=false
}
...
后来发现是链接前面少了“/”,加上解决
api/report/phone >> /api/report/phone
this.$http.post("/api/report/phone", this.postdata).then(resp => {
if (resp.status === 2000) {
if(this.postdata.page==resp.data.pages){
this.pageMax=false
}
...