zjs_project 9 maanden geleden
bovenliggende
commit
9bac84bcfb
2 gewijzigde bestanden met toevoegingen van 36 en 4 verwijderingen
  1. 3 2
      src/components/newQCCom/viewMask/viewMask.vue
  2. 33 2
      src/pages/webgl_rxdz_test/webgl_rxdz_test.vue

+ 3 - 2
src/components/newQCCom/viewMask/viewMask.vue

@@ -1225,7 +1225,8 @@
                 // if(thirdData && thirdData.length>0){
                 //     mainImage = thirdData[1] ? thirdData[1].hardboundEffect[0] : thirdData[0].hardboundEffect[0];
                 // }
-            	houseData.houseJson = spaceList.concat(this.form.layoutStruct[0].houseJson);
+            	// houseData.houseJson = spaceList.concat(this.form.layoutStruct[0].houseJson);
+            	houseData.houseJson = this.form.layoutStruct[0].houseJson.concat(spaceList);
             	// houseData.expand = expand;
             	let param = {
                     id:this.customizedRecordId,
@@ -1262,7 +1263,7 @@
             			houseId:this.houseId || curHouseObj.houseId,
             			id:res.single,
             		}
-                    wx.miniProgram.redirectTo({url: '/webgl/pages/webgl_rxdz_text_customize/webgl_rxdz_text_customize?id='+data.id+"&houseId="+this.houseId})
+                    wx.miniProgram.redirectTo({url: '/webgl/pages/webgl_rxdz_text_customize/webgl_rxdz_text_customize?id='+data.id+"&houseId="+(this.houseId || curHouseObj.houseId)})
             		// router.push({
             		// 	name: "webgl_rxdz_text_customize",
             		// 	query:data

+ 33 - 2
src/pages/webgl_rxdz_test/webgl_rxdz_test.vue

@@ -707,14 +707,46 @@
 		},
 
 		methods: {
+            async getInitData(){
+            	let parmas = {
+            		childLayout:this.childLayout || 0,
+            		houseId:this.houseId,
+            	}
+            	const res = await requestConfig('getHouseTypeSpaceDetailsV2', parmas, true);
+            	if (res.success && res.list) {
+            		let list = res.list || [];
+            		list && list.forEach((single,index)=>{
+            			single.layoutStruct.forEach((item)=>{
+            				if(item.houseJson){
+            					let spaceList = JSON.parse(item.houseJson);
+            					// 交换centerX, centerY
+            					for (let index = 0; index < spaceList.length; index++) {
+            					    var element = spaceList[index];
+            					    const {centerX, centerY} = element;
+            					    element.centerX = centerY;
+            					    element.centerY = centerX;
+            					}
+            					item.houseJson = JSON.stringify(spaceList);
+            				}
+            			})
+            		})
+            		console.log("户型详情列表-接口原始数据: ", list);
+            		this.houseList = list;//数据会同步到组件中-进而反馈更新页面数据
+            	}
+            },
             // 查询户型列表
             async findHouseTypeSpaceListByIds() {
+                // let parmas = {
+                // 	childLayout:this.childLayout || 0,
+                // 	houseId:this.houseId,
+                // }
+                // let _url = "getHouseTypeSpaceDetailsV2";
                 var parmas = {
                     brandId: $config.brandId,
                     houseId: this.houseId,
                     pageNo: 1,
                     pageSize: 2000,
-                    ids: [this.ueId],
+                    ids: this.ueId ? [this.ueId] : [286],
                 };
                 let res = await requestConfig("findHouseTypeSpaceListByIds", parmas);
                 if (res.success && res.list) {
@@ -746,7 +778,6 @@
                     this.curHouseObj = res.list[0];
                     setStorage('curHouseObj', this.curHouseObj);
                     this.houseInit();
-                    // this.houseList = res.list || [];
                 }
             },
 			voiceMaskChange(voiceMask){