请求数据

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

相关文章
相关标签/搜索