question: php API, data can be requested with ajax request, but not with axios request.
< H2 > axios < / H2 >Code:
getJson(){
this.axios({
method:"post",
url:"vip/index.php",
data:{
"name":"qq.com",
"videoUrl":"https://v.qq.com/detail/6/639agzdh10yu2q2.html"
}
}).then(res=>{
//console.log(res.data);
this.msg = res.data;
console.log(this.msg)
})
}
Screenshot
ajax
:
: