my project nuxt before generate asyncData axios data is fixed not update the code like
async asyncData() {
let [todatWarningData, warningLists] = await Promise.all([
axios.post('/xxxx', {}),
axios.post('/xxxx',qs.stringify({
pageNum: 1,
earlyWarnType: 0,
startTime: startTime,
}))])
return {
todatWarningData: todatWarningData.data,
warningLists: warningLists.data.EmergencyInfoList,
warningCount: warningLists.data.count,
warningInfo: warningLists.data,
}
},
,but some page is work like
async asyncData(context) {
const companyId = context.route.query.conpanyId;
let [companyInfo] = await Promise.all([
axios.post('/xxxxxxx', qs.stringify({id: companyId}))
]);
return {
companyInfo:companyInfo.data
}
},
Can anyone tell me why,thanks!