请求数据

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 引入jsonp


axios.get(`/lg/listmore.json`,{
params:{ //url地址中携带的参数 发送给后端
pageNo:1,
pageSize:15
}
}).then((res)=>{
console.log(res.content.data.page.result)
}) //引入axios


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


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

//callbackName

原文地址:https://www.cnblogs.com/fdbjazy/p/10161911.html