After the page in vue is refreshed, the data in store is not available.

as shown in the figure, I get the data in vuex in created. I can get it as soon as I enter the page, but I can"t get the data after the page is refreshed

Mar.06,2021
The store returns to its original state after the

page refreshes. The data in the discussion group 163958730


store is the original storage component state and is not used for local data storage after refreshing


can be solved through local storage.
Local storage can be localStorage/sessionStorage or cookie .


you can think of it as js cached data; for example:

let arr = [];

//  [1]
//   

can be solved through sessionStorage or localStorage

const state = {phone:localStorage.getItem('phone')||""}

can be saved with sessionStorage in your store.js, and you can get

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