requirements: when the page is loaded, send two requests at the same time, the code is as follows:
async initData(id){
//
let res1 = await getPathCategory(id);
this.categoryList = res1.result.list;
//
let res2 = await getPathListData(id,this.category,this.pageSize,this.pageNo);
if(res2.result.list.length>0){
this.pathList = [...res2.result.list];
this.loading = false;
}
},
question: when you enter the current page from the previous page, only the first requested data is obtained. When the current page is refreshed again, the data will come out together