sessionStorage存数据,如果刷新页面,数据仍旧存在,只有关闭页面,数据才消失
sessionStorage存储一条数据:
sessionStorage.setItem('name',this.insuredOneName);
sessionStorage存储多条数据:
this.queryParams={name:this.insuredOneName,id:this.insuredOneID};
sessionStorage.setItem('queryParam',JSON.stringify(this.queryParams))
读取数据:
this.queryParams = JSON.parse(sessionStorage.getItem('queryParam'));