sessionstorage传值发现显示未定义,将json转成字符串
sessionstorage传值:
sessionStorage.setItem("userId", JSON.stringify(this.userId));
json数据转成string
this.userId=JSON.parse(sessionStorage.getItem("userId"));
string转json
sessionstorage传值发现显示未定义,将json转成字符串
sessionstorage传值:
sessionStorage.setItem("userId", JSON.stringify(this.userId));
json数据转成string
this.userId=JSON.parse(sessionStorage.getItem("userId"));
string转json