소스 검색

修改模型&兼容风格为空的容错处理

zjs_project 1 년 전
부모
커밋
0100a32252
2개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 4 4
      src/components/newBottomCom/viewMask/viewMask.vue
  2. 1 1
      src/static/layoutModelData.js

+ 4 - 4
src/components/newBottomCom/viewMask/viewMask.vue

@@ -351,11 +351,11 @@
 				}
 				if(!this.styleList || this.styleList.length==0){
 					this.disableAble = true;//不能点击-没有风格
-					let unit = app.globalData.systemInfo.screenWidth / 750;//单位rpx 对应 px 的值
-					this.$parent.canvasHeight = app.globalData.systemInfo.screenHeight - (208 * unit);
-					this.$parent.camera.aspect = app.globalData.systemInfo.screenWidth / this.$parent.canvasHeight;
+					let unit = window.screen.width / 750;//单位rpm 对应 px 的值
+					this.$parent.canvasHeight = window.screen.height - (208 * unit);
+					this.$parent.camera.aspect = window.screen.width / this.$parent.canvasHeight;
 					this.$parent.camera.updateProjectionMatrix();
-					this.$parent.renderer.setSize(app.globalData.systemInfo.screenWidth, this.$parent.canvasHeight);
+					this.$parent.renderer.setSize(window.screen.width, this.$parent.canvasHeight);
 				}else{
 					this.disableAble = false;//可以点击
 				}

+ 1 - 1
src/static/layoutModelData.js

@@ -146,7 +146,7 @@ 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_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},