page needs to display a piece of data that is changing all the time , and the source of the data can only be obtained through the request interface . I hope the old drivers can give us a plan or idea.
current solution:
1 defines a timer in the vue project to make axios requests every 2 seconds.
2 re-request when the axios request is returned successfully in the vue project (children and grandchildren are endless).
in multiple requests, it is found that there is an occasional timeout in the middle of . It is obviously not appropriate to adopt option 2.
if scenario 1 is adopted, multiple identical requests will be in pending state together because of asynchronous requests, and there will be time difference when returned. (I don"t know how to set up the same request queue, and the previous request is terminated )