Commit d98091f9 authored by 李苏's avatar 李苏 💬

不用session 和免登生命周期逻辑冲突

parent 1dca486c
......@@ -48,6 +48,8 @@ const user = {
sessionStorage.setItem('allUserInfo',JSON.stringify(res.data))
localStorage.setItem('username',res.data.username)
localStorage.setItem('userid',res.data.userid)
localStorage.setItem('allUserInfo',JSON.stringify(res.data))
/* 存储本地一份 */
setToken(res.data.token)
commit('SET_TOKEN', res.data.token)
......
......@@ -265,8 +265,8 @@
} from '@/api/home/homepage.js'
import ryqno from '@/assets/images/ryqno.png'
var allUserInfo = JSON.parse(sessionStorage.getItem('allUserInfo'));
console.log(allUserInfo, 'allUserInfo')
var allUserInfo = JSON.parse(localStorage.getItem('allUserInfo'));
export default {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment