Project background
Upload id photos, when click upload call interface, in this time show that style of the upload, this time, the user can click the close button, back to not upload photos of style, if we do not do any processing at this time, the interface data back after you come back, will show upload results, but the business requires that if the user interrupt, represents the abandoned upload last time
So you need to cancel the last Ajax request
This project uses an AXIOS request
Through this. Axios. CancelToken. Source ()
www.jianshu.com/p/9266baf97…
Through the new CancelToken () method
www.jianshu.com/p/22b49e6ad…