inside the asyncData method of the nuxt.js framework
let [
FindInstitutionsDetailed,
EnterpriseHot,
]
= await Promise.all([
P.FindInstitutionsDetailed({"id":context.route.query.id+""}),
P.EnterpriseHot()
])
return {
***FindInstitutionsDetailed***: FindInstitutionsDetailed.data,
EnterpriseHot: EnterpriseHot.data,
}
as shown in the figure above, it is always written like this. Promise.all requests all APIs concurrently before the page is rendered. There"s no problem with that.
however, there is now an interface that needs to get userId as a parameter from the FindInstitutionsDetailed interface.
would you like to ask how to write it? You cannot access this in nuxt.
or after Promise.all (...)
. Then ?