- SessionStorage存储-读取字符串
sessionStorage.setItem("key","value");
sessionStorage.getItem("key");
- SessionStorage存储-读取对象
sessionStorage.setItem('user',JSON.stringify(res.data.body.user));
let userInfo=JSON.parse(sessionStorage.getItem('user'));
userInfo.userPk
来源:CSDN
作者:王晓(Java)
链接:https://blog.csdn.net/qq_29229567/article/details/103845586