The speed of data requested by vuex asynchronously is slower than that of page rendering.

  1. the page has been rendered after calling the method in actions to get the data asynchronously. And reported an error.

clipboard.png

clipboard.png

clipboard.png

clipboard.png

clipboard.png

clipboard.png

clipboard.png

Mar.18,2021

isn't it normal that data from asynchronous requests is slower than page rendering? Your mistake here is that the compatibility of the code is not good enough. When reading the properties of an object (object,array,function, etc.), you need to judge whether the data type of the object is correct


you can use v-if to hide the banner first, and then display the data after the request, so that there will be no problem.


add a judgment to banner [0] .data.baked to determine whether it exists or not.


you are not recommended to write this way, you can write vshow = "banner", and then assign a value to banner after getting the data. In short, try not to use unknown data.

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