解决方法:
将数据同步到sessionStorage中
set_token(state, token) {
state.token = token
sessionStorage.setItem('token',token)
},
del_token(state) {
state.token = ''
sessionStorage.removeItem('token')
}
解决方法:
将数据同步到sessionStorage中
set_token(state, token) {
state.token = token
sessionStorage.setItem('token',token)
},
del_token(state) {
state.token = ''
sessionStorage.removeItem('token')
}