vue开发:axios的post请求接口出现404,但是get则成功

来源:互联网 发布:淘宝店主房贷收入证明 编辑:程序博客网 时间:2024/06/06 10:40
methods:{
myclick(){
this.$http({
methods:"post",
url:"../../../static/my.json",
headers:{"Content-Type":'application/x-www-form-urlencoded; charset=UTF-8'}
}).then((res)=>{
console.log(JSON.stringify(res.data).length);

if(JSON.stringify(res.data).length>0){
this.myshow=false;
}else{
this.myshow=true;
}
})
}
}
阅读全文
0 0
原创粉丝点击