How to get back-end Interface data by redirecting pages with vue-cli

I know that we can write the AJAX request in the corresponding trigger event function for the click event, but where should the request be written when the page jumps.

Feb.16,2022

routing guard, or just do it in the component life cycle. The navigation guard of


vue router tries


A page to jump to page B and write the request in page B methods, which can be executed in created.


vue lifecycle.

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-1b3b060-2c258.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-1b3b060-2c258.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?