First, make two optimizations for slider:
1. Use Keepalive to save the page cache
The component calls destroyed to destroy the instance when the page is destroyed. So at this time to clear the timer, it is a good habit to become conducive to memory free.
Now formally fetching data: