How to determine how to hide a page when both ajax return results in vue

enter a page with loading. When both ajax returns results, the loading is hidden. How can you tell that both ajax have returned results?
because they are both asynchronous, one may return, and the other will return after a period of time. You can"t poll the results of two ajax all the time, can you?

Jan.10,2022

axios.all([
    axios.get('xxxxxx'),
     axios.get('xxxxx')
]).then(axios.spread((response1,response2)=>{
 // 
}));

when all requests are completed, you will receive an array containing response objects in the same order as the requests were sent


  1. A simple method to string two requests together (after the first request is completed, the second is sent, and the second is completed, which means that all requests are finished)
  2. wrap the request as a Promise object, and then use Promise.all, to send the request in parallel. You can also get the
  3. you want.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3d18c-2c36f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3d18c-2c36f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?