1、使用localStorage存储对象,直接存回自动json格式,所以在存取的时候都需要json一下
存储时转json字符串JSON.stringify()
取出时转json对象 JSON.parse
注:setStorage为封装的存储方法
this.setStorage('tem_xfInfo', JSON.stringify(info))
this.temFloorInfo = JSON.parse(this.getStorage('tem_xfInfo'))
1、使用localStorage存储对象,直接存回自动json格式,所以在存取的时候都需要json一下
存储时转json字符串JSON.stringify()
取出时转json对象 JSON.parse
注:setStorage为封装的存储方法
this.setStorage('tem_xfInfo', JSON.stringify(info))
this.temFloorInfo = JSON.parse(this.getStorage('tem_xfInfo'))