請求數據

this.$jsonp("http://cre.mix.sina.com.cn/api/v3/get?_=1543735672475").then((res)=>{
this.news=res.data.filter((item,index)=>{
return index<4
})
}) //須要下載jsonp 引入jsonpios

 


axios.get(`/lg/listmore.json`,{
params:{ //url地址中攜帶的參數 發送給後端
pageNo:1,
pageSize:15
}
}).then((res)=>{
console.log(res.content.data.page.result)
}) //引入axiosjson

 

 


axios.get("/wz/api/v3/get?_=1543733002403").then((res)=>{//設置配置項
console.log(res)
}),axios

 


this.$jsonp("http://temp.163.com/special/00804KV1/post1603_api_all.js?_=1543734867705",{
callbackName:"callback"
}).then((res)=>{
console.log(res)
})後端

//callbackName api

相關文章
相關標籤/搜索