您可以像正常的承诺一样进行连锁。触发第一个请求中的.then
下一个请求,然后返回该承诺,这样您将获得.then
第二个请求。
axios.get(...)
.then((response) => {
return axios.get(...); // using response.data
})
.then((response) => {
console.log('Response', response);
});
Run Code Online (Sandbox Code Playgroud)