zjs_project преди 1 година
родител
ревизия
1bbcfa4d23

+ 1 - 1
src/components/newBottomCom/viewMask/viewMask.html

@@ -22,7 +22,7 @@
 	</div>
 	<div class="btn-view columns" v-if="showAIImage==false">
 		<!-- 切换视图-退出当前模式 -->
-		<div class="compareBtn btn1" @click.stop="showOrHideWebGl">
+		<div class="compareBtn btn1" @click.stop="showOrHideWebGl" v-if="aiImagesList && aiImagesList.length>0">
 			<img class="compareIcon" src="https://dm.static.elab-plus.com/miniProgram/space1/compareAI_btn.png" mode="widthFix" />
 		</div>
 		<!-- 切换视角 -->

+ 1 - 1
src/components/newBottomCom/viewMask/viewMask.scss

@@ -72,7 +72,7 @@
 		box-sizing: border-box;
 		font-family: "Verdana Bold";
 		font-weight: 700;
-		font-size: 26rem;
+		font-size: 24rem;
 		color: #fff;
 		text-align: center;
 		justify-content:unset;

+ 1 - 1
src/mixins/floorMethod.js

@@ -150,7 +150,7 @@ export default {
 				cube.userType = "mesh";
 				cube.userData = obj;//位置数据
 				// 设置位置,旋转,缩放
-				cube.position.set(positionX, -0.001, -positionY);
+				cube.position.set(positionX, -0.01, -positionY);
 				cube.rotation.x = -Math.PI / 2 ;  // 旋转 180 度
 				cube.receiveShadow = true;//材质是否接收阴影
 				

+ 12 - 2
src/mixins/loadModel.js

@@ -17,6 +17,7 @@ export default {
 			type:1,
 			tmpList:[],
 			realList:[],
+			nextString:'_simple',//精简模型后缀
 		}
 	},
 	watch: {},
@@ -147,10 +148,11 @@ export default {
 		//过滤掉不需要的家具
 		fliterList(list){
 			this.realList = [];
+			let tempList = globlShowModel.map(it=>it.replace(this.nextString,''));
 			//找到直接的家具模型
 			list && list.forEach((mod)=>{
 				let name = mod.modelName.substring(0,mod.modelName.length-2);
-				if(globlShowModel.includes(name)){
+				if(tempList.includes(name)){
 					this.realList.push(mod);
 				}
 			})
@@ -200,8 +202,16 @@ export default {
 					let object = realFurnitureArr.find(it=>it.url==layoutModel.url);
 					//列表中还没有这个数据
 					if(!object){
+						let url = layoutModel.url;
+						if(this.type==2){//全局精简模型;需要的是所有空间的模型
+							//说明当前模型存在精简模型对象,则应该使用精简模型数据
+							if(globlShowModel.includes(layoutModel.modelName + this.nextString)){
+								let idx = layoutModel.url.lastIndexOf('.');
+								url = url.substr(0,idx) + this.nextString + url.substr(idx)
+							}
+						}
 						let it = {
-							url:layoutModel.url,
+							url:url,
 							name:layoutModel.modelName,
 							list:[item],
 						}

+ 5 - 1
src/mixins/wallMethod.js

@@ -591,7 +591,11 @@ export default {
 											newWallType = element;
 										}
 									}
-									console.log("寻找最大的窗户",index, wallWidth, newWallType.width,element.width)
+									try{
+										console.log("寻找最大的窗户",index, wallWidth, newWallType.width,element.width)
+									}catch(e){
+										console.error("***rrrrr***",e,element,newWallType)
+									}
 								}
 			
 								item.wallModelData[1].wallWidth = newWallType.width;

+ 1 - 1
src/static/globlShowModel.js

@@ -8,7 +8,7 @@ var globlShowModel = [
 	"BP_L_2Sofa02",
 	"BP_L_1Sofa01",
 	"BP_L_1Sofa02",
-	"BP_L_1sofa03",
+	"BP_L_1Sofa03",
 	"BP_L_backsofa01",
 	"BP_L_book01",
 	"BP_L_31TV01",

+ 2 - 3
src/static/layoutModelData.js

@@ -18,7 +18,6 @@ var layoutModel = [
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_D_RoundTable01.glb', name: '12人圆桌',modelName: 'BP_D_12people_round', type:1},
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_B_penzai01.glb', name: '盆栽',modelName: 'BP_B_penzai02', type:1},
 
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_L_backsofa01.gltf', name: '靠背沙发01',modelName: 'BP_D_backsofa01', type:1},
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_L_facesofa01.gltf', name: '对坐沙发01',modelName: 'BP_D_facesofa01', type:1},
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_O_painting01.gltf', name: '挂画装饰',modelName: 'BP_DLBT_painting01', type:1},
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_B_painting01.glb', name: '挂画01',modelName: 'BP_B_painting01', type:1},
@@ -147,8 +146,8 @@ var layoutModel = [
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_L_2Sofa02.glb', name: '双人沙发02',modelName: 'BP_L_2Sofa02', type:1},
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_L_1Sofa01.glb', name: '单人沙发01',modelName: 'BP_L_1Sofa01', type:1},
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_L_1Sofa02.glb', name: '单人沙发02',modelName: 'BP_L_1Sofa02', type:1},
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_L_1sofa03.glb', name: '单人沙发03',modelName: 'BP_L_1sofa03', type:1},
-	// {url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_L_backsofa01.glb', name: '单人沙发03',modelName: 'BP_L_backsofa01', type:1},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_L_1sofa03.glb', name: '单人沙发03',modelName: 'BP_L_1Sofa03', type:1},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_L_backsofa01.glb', name: '单人沙发03',modelName: 'BP_L_backsofa01', type:1},
 	
 	
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_X_RelaxTable01.gltf', name: '单独休闲桌01',modelName: 'BP_X_RelaxTable01', type:1},