Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

怎么同时执行多个请求? #50

Closed
cnsimplo opened this issue Sep 22, 2018 · 1 comment
Closed

怎么同时执行多个请求? #50

cnsimplo opened this issue Sep 22, 2018 · 1 comment

Comments

@cnsimplo
Copy link

老大, 这种怎么一次执行多个请求?请求路径一样,只是参数不同
this.$http({
url: this.$http.adornUrl('/xx/xx'),
method: 'get',
params: this.$http.adornParams({ 'xx':0, })
}).then(({data}) => { })

this.$http({
url: this.$http.adornUrl('/xx/xx'),
method: 'get',
params: this.$http.adornParams({ 'xx':1, })
}).then(({data}) => { })

@daxiongYang
Copy link
Contributor

去Axios官网查找axios.all方法,或者Promise.all也可以。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants