|
@@ -797,6 +797,22 @@
|
|
|
console.warn("***没有数据***",res.list)
|
|
|
}
|
|
|
},
|
|
|
+ //页面返回后同步数据
|
|
|
+ backAysncData(){
|
|
|
+ console.warn("---backAysncData---",this.pvId)
|
|
|
+ let curLayoutStruct = JSON.parse(getStorage('curLayoutStruct')) ;//获取楼层的数据-户型数组
|
|
|
+ if(curLayoutStruct && curLayoutStruct.length>0){
|
|
|
+ curLayoutStruct.forEach((layoutStruct,index)=>{
|
|
|
+ let spaceList = JSON.parse(layoutStruct.houseJson);//houseJson是字符串需要序列号处理
|
|
|
+ spaceList.forEach(obj => delete obj.wallList);//去除墙体数据,减少数据量
|
|
|
+ if(this.curHouseObj && this.curHouseObj.id==layoutStruct.id){
|
|
|
+ this.curHouseObj.houseJson = JSON.stringify(spaceList);
|
|
|
+ console.warn("***backAysncData-curHouseObj***",this.curHouseObj)
|
|
|
+ }
|
|
|
+ this.curLayoutStruct[index].houseJson = JSON.stringify(spaceList);//数据会同步到组件中
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
//当前户型初始化
|
|
|
houseInit(item){
|
|
|
this.gltfWalls = [];
|
|
@@ -1843,7 +1859,7 @@
|
|
|
this.locationHandle();
|
|
|
setTimeout( async ()=>{
|
|
|
let shottingImg = await this.shottingAction() + "?x-oss-process=image/auto-orient,1/quality,Q_46/format,jpg";//开始截图
|
|
|
- console.warn("***shottingImg***",shottingImg,this.selectSpace);
|
|
|
+ console.warn("***shottingImg***",shottingImg,this.selectSpace,this.curLayoutStruct);
|
|
|
setStorage('shottingImg', shottingImg);//把空间选择的数据存入本地缓存里面,方便后续使用
|
|
|
if(!this.curLayoutStruct){
|
|
|
this.curLayoutStruct = [this.curHouseObj]
|