Can the actions method in vuex dispatch another method after the dispatch is called?

clipboard.png

clipboard.png

the requirement is that when I click the login button, I need to request an interface to determine whether the user has successfully logged in, change the status in store if successful, and then jump to the page according to the status. The interface that determines whether the user is logged in or not needs to be fetched before each interface request. Ask the great god for an answer. How can we do that?

Mar.21,2021

of course write like this and you'll see


there's nothing wrong with it. It can be replaced with async/await. It's more readable. It's more readable.


it's possible, complete ok

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