zjs_project 1 rok pred
rodič
commit
4cf2301c35

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

@@ -8,8 +8,9 @@
 			<!-- <img @touchstart="mytouchstart" @touchmove="mytouchmove" @touchend="mytouchend" style="width:100%;height:100%;object-fit: cover;" mode="aspectFill" :src="item.image"></image> -->
 			<el-image 
 				@touchstart="mytouchstart" @touchmove="mytouchmove" @touchend="mytouchend"
-			    style="width:100%;height:100%;"
+			    style="width:100%;height:100%;cursor:none;"
 			    :src="item.image"
+				fit='cover'
 			    :preview-src-list="item.list">
 			  </el-image>
 		</el-carousel-item>

+ 3 - 0
src/components/newBottomCom/viewMask/viewMask.scss

@@ -19,6 +19,9 @@
 	height:calc(100vh - 408rem);
 	z-index: 12;
 	pointer-events: auto;
+	/deep/.el-image__preview{
+		cursor: none;
+	}
 }
 /deep/.el-carousel__container{
 	height:calc(100vh - 408rem);

+ 4 - 0
src/components/newBottomCom/viewShell/viewShell.vue

@@ -171,6 +171,10 @@
 				if(this.floorId==item.id){
 					return false;
 				}
+				if(this.$parent.loadLayFlag){//加载家具模型中
+					this.$message("加载模型中,请稍后再试");
+					return false
+				}
 				this.floorId = item.id;
 				let param = {
 					type: 'CLK', //埋点类型

+ 20 - 16
src/mixins/loadModel.js

@@ -22,6 +22,7 @@ export default {
 			tmpList:[],
 			realList:[],
 			nextString:'_simple',//精简模型后缀
+			loadLayFlag:false,	//是否处在加载家具过程中
 			// lastFrunList:[],
 		}
 	},
@@ -203,6 +204,7 @@ export default {
 			}
 			console.log("***realFurArr***", realFurArr,this.gltfLayouts);
 			realFurArr && realFurArr.forEach((item,index) => {
+				this.loadLayFlag = true;
 				this.promise_list.push(
 					new Promise((resolve, reject) => {
 						this.loadLayoutModels(item, resolve);
@@ -211,6 +213,7 @@ export default {
 			});
 			Promise.all(this.promise_list).then(() => {
 				let endTime = new Date().getTime();
+				this.loadLayFlag = false;
 				console.log("家具模型全部加载完成,时间:", endTime - startTime, this.gltfLayouts);
 				this.loadLastSpaceModel();//加载剩余空间的家具模型
 			})
@@ -353,22 +356,23 @@ export default {
 							//realData 该模型被重复使用时的每一次的形变参数等
 							realData.list && realData.list.forEach((it,i)=>{
 								let gltfFurn = that.gltfLayouts.find(itme=>itme.uniId==it.uniId);//判断是否已经添加过
-								
-								gltf.scene.rotation.y = gltfFurn.rotation.y;
-								gltf.scene.position.set(gltfFurn.position.x,0,gltfFurn.position.z);
-								gltf.scene.scale.set(gltfFurn.scale.x,1,gltfFurn.scale.z);
-								gltf.scene.updateMatrixWorld();//更新世界坐标-这样,子模型也同步更新了
-								instancedMesh.setMatrixAt(i, child.matrixWorld);
-								instancedMesh.instanceMatrix.needsUpdate = true;
-								gltfFurn.loaded = true;
-								if(!gltfFurn.instancedMeshIndexList){//标识网格实例数组的序号 以及 当前几何体 在网格实例的序号
-									gltfFurn.instancedMeshIndexList = [
-										{instancedMeshIndex:this.instancedFurList.length-1,instancedAtIndex:i},
-									]
-								}else{
-									gltfFurn.instancedMeshIndexList.push({
-										instancedMeshIndex:this.instancedFurList.length-1,instancedAtIndex:i
-									})
+								if(gltfFurn){
+									gltf.scene.rotation.y = gltfFurn.rotation.y;
+									gltf.scene.position.set(gltfFurn.position.x,0,gltfFurn.position.z);
+									gltf.scene.scale.set(gltfFurn.scale.x,1,gltfFurn.scale.z);
+									gltf.scene.updateMatrixWorld();//更新世界坐标-这样,子模型也同步更新了
+									instancedMesh.setMatrixAt(i, child.matrixWorld);
+									instancedMesh.instanceMatrix.needsUpdate = true;
+									gltfFurn.loaded = true;
+									if(!gltfFurn.instancedMeshIndexList){//标识网格实例数组的序号 以及 当前几何体 在网格实例的序号
+										gltfFurn.instancedMeshIndexList = [
+											{instancedMeshIndex:this.instancedFurList.length-1,instancedAtIndex:i},
+										]
+									}else{
+										gltfFurn.instancedMeshIndexList.push({
+											instancedMeshIndex:this.instancedFurList.length-1,instancedAtIndex:i
+										})
+									}
 								}
 							})
 							instancedMesh.userType = "layoutMesh";

+ 1 - 1
src/utils/util.js

@@ -215,7 +215,7 @@ var util = {
 			// return data;
 			// app.globalData.session_id = data.session
 			// app.globalData.sessionTime = timeNow;
-			requestConfig('upload', data, true);
+			// requestConfig('upload', data, true);
 			// let param = ["SEND" +
 			// 	"\nproject:" + "elab-marketing-system" + 
 			// 	"\nmethod:" + 'POST' +