1.页面跳转时,url 传大数据的参数不全的问题
//传参;
url: '/pages/testOfPhysical/shareEvaluation?detailInfo=' +encodeURIComponent(JSON.stringify(item.Details))+ '&childName=' + item.ChildName;//把字符串作为 URI 组件进行编码+json对象转为字符串;
//获取,转对象;
let response = JSON.parse(decodeURIComponent(options.detailInfo))//把字符串作为 URI 组件进行j解码+字符串转为json对象;
2.序列化对象:对象转字符串;字符串转对象;
//对象转字符串
localStorage.PushParams=JSON.stringify(pushParams);
//字符串转对象
let pushParams=JSON.parse(localStorage.PushParams);