getData(){
let api = 'xxx/getMyOrders?user_id=199'
Axios.get(api).then((response)=>{
console.log('res=',response)
this.list = response.data;
})
.catch((error)=>{
console.log('err=',error)
})
}
// axios不支持jsonp类型
// 用fetch jsonp来请求
getData(){
let api = 'xxx/getMyOrders?user_id=199'
Axios.get(api).then((response)=>{
console.log('res=',response)
this.list = response.data;
})
.catch((error)=>{
console.log('err=',error)
})
}
// axios不支持jsonp类型
// 用fetch jsonp来请求
本文标题:axios请求
本文链接:https://www.haomeiwen.com/subject/zpqujctx.html
网友评论