//es6实现方式
const getData = async ()=> {
//同步请求数据
const res1=await this.$http.get("https://www.cnblogs.com/yxy99/p/5852987.html")
//并发请求数据
const res2=await this.$http.all([this.$http.get("https://www.cnblogs.com/yxy99/p/5852987.html"),this.$http.get("https://www.cnblogs.com/yxy99/p/5852987.html")])
return {res1,res2};
}
getData().then(function ({res1,res2}) {
console.log(res1)
console.log(res2)
})