zjs_project 1 рік тому
батько
коміт
071609420f
54 змінених файлів з 15887 додано та 466 видалено
  1. 33 0
      public/gltf/draco_decoder.js
  2. BIN
      public/gltf/draco_decoder.wasm
  3. 33 0
      public/gltf/draco_encoder.js
  4. 116 0
      public/gltf/draco_wasm_wrapper.js
  5. 1 36
      src/App.vue
  6. 5 0
      src/components/mapComponent/mapComponent.html
  7. 28 15
      src/components/mapComponent/mapComponent.vue
  8. 56 0
      src/components/newBottomCom/viewCareful/viewCareful.css
  9. 33 0
      src/components/newBottomCom/viewCareful/viewCareful.html
  10. 176 0
      src/components/newBottomCom/viewCareful/viewCareful.vue
  11. 75 0
      src/components/newBottomCom/viewMask/viewMask.html
  12. 296 0
      src/components/newBottomCom/viewMask/viewMask.scss
  13. 687 0
      src/components/newBottomCom/viewMask/viewMask.vue
  14. 116 0
      src/components/newBottomCom/viewShell/viewShell.css
  15. 36 0
      src/components/newBottomCom/viewShell/viewShell.html
  16. 272 0
      src/components/newBottomCom/viewShell/viewShell.vue
  17. 30 0
      src/components/newBottomCom/viewStyle/viewStyle.html
  18. 138 0
      src/components/newBottomCom/viewStyle/viewStyle.scss
  19. 428 0
      src/components/newBottomCom/viewStyle/viewStyle.vue
  20. 18 0
      src/components/newBottomCom/viewToolNav/viewToolNav.css
  21. 10 0
      src/components/newBottomCom/viewToolNav/viewToolNav.html
  22. 59 0
      src/components/newBottomCom/viewToolNav/viewToolNav.vue
  23. 112 0
      src/components/newBottomCom/viewlayout/viewlayout.css
  24. 12 0
      src/components/newBottomCom/viewlayout/viewlayout.html
  25. 520 0
      src/components/newBottomCom/viewlayout/viewlayout.vue
  26. 305 207
      src/mixins/loadModel.js
  27. 68 0
      src/mixins/touchHandle.js
  28. 6 1
      src/mixins/wallMethod.js
  29. 17 4
      src/pages/mainView/mainView.html
  30. 197 0
      src/pages/mainView/mainView.scss
  31. 2454 110
      src/pages/mainView/mainView.vue
  32. 29 0
      src/static/globlShowModel.js
  33. 14 12
      src/static/layoutModelData.js
  34. 29 29
      src/static/wallData.js
  35. 1 1
      src/utils/rem.js
  36. 178 1
      src/utils/util.js
  37. 0 0
      webgl/favicon.ico
  38. 33 0
      webgl/gltf/draco_decoder.js
  39. BIN
      webgl/gltf/draco_decoder.wasm
  40. 33 0
      webgl/gltf/draco_encoder.js
  41. 116 0
      webgl/gltf/draco_wasm_wrapper.js
  42. 18 0
      webgl/index.html
  43. 0 0
      webgl/static/fonts/element-icons.f1a45d74.ttf
  44. 0 0
      webgl/static/fonts/element-icons.ff18efd1.woff
  45. 0 0
      webgl/static/fonts/iconfont.962990fe.woff
  46. 0 0
      webgl/static/fonts/iconfont.96f2aa87.ttf
  47. 0 0
      webgl/static/fonts/iconfont.9e5bae0e.woff2
  48. 824 0
      webgl/static/js/app.js
  49. 8275 0
      webgl/static/js/chunk-vendors.js
  50. 0 1
      webgl1/index.html
  51. 0 1
      webgl1/static/css/app.cad3a579.css
  52. 0 1
      webgl1/static/css/chunk-vendors.911808b7.css
  53. 0 1
      webgl1/static/js/app.88c5ea02.js
  54. 0 46
      webgl1/static/js/chunk-vendors.f9210246.js

Різницю між файлами не показано, бо вона завелика
+ 33 - 0
public/gltf/draco_decoder.js


BIN
public/gltf/draco_decoder.wasm


Різницю між файлами не показано, бо вона завелика
+ 33 - 0
public/gltf/draco_encoder.js


Різницю між файлами не показано, бо вона завелика
+ 116 - 0
public/gltf/draco_wasm_wrapper.js


+ 1 - 36
src/App.vue

@@ -7,42 +7,7 @@
 				<div class="loadingMsg">{{loadingMsg}}</div>
 			</div>
 		</div>
-		<div class="loadingShadow rows justify-center" v-show="showAccountView">
-			<div class="account-view">
-				<!--顶部-->
-				<div class="title rows rows-between">
-					<div class="rows" style="margin-right:10rem">
-						<img class="title-icon" src="https://dm.static.elab-plus.com/thing/ty/zhsq.png">
-						账号选择
-					</div>
-					<div class="close" @click="closeFun">
-						<i class="el-icon-close close-img"></i>
-					</div>
-				</div>
-				<div class="content" style="margin-top:20rem;">
-					<div class="">选择关联账号</div>
-					<div class="content-main-view" style="margin-top:10rem;">
-						<div class="rows rows-between" @click="accountChange(item)"
-							style="margin-bottom:20rem;cursor: pointer;" v-for="(item,index) in acountList"
-							:key="index">
-							<div class="rows">
-								<div style="margin-right:18rem;">
-									<div v-if="selectAccount && selectAccount.advertiserId == item.advertiserId"
-										class="selcect-view"></div>
-									<div v-else class="unselcect-view"></div>
-								</div>
-								<div>{{item.name}}{{' ID'+item.advertiserId}})</div>
-							</div>
-							<div v-if="selectAccount && selectAccount.advertiserId == item.advertiserId"
-								class="icon-gougou iconfont gougou-icon"></div>
-						</div>
-					</div>
-				</div>
-				<div class="auth-btn-view rows justify-center" style="margin-top:35rem">
-					<div class="auth-btn style2 rows justify-center" @click="accountConfirm">确定</div>
-				</div>
-			</div>
-		</div>
+		
 	</div>
 </template>
 

+ 5 - 0
src/components/mapComponent/mapComponent.html

@@ -1,4 +1,9 @@
 <div class="map" style="position: absolute;width: 100%;height: 100vh;z-index: 1;">
+	<!-- 主要操作视图 -->
+	<viewShell pageType="1" :overChange="overChange" :houseList="houseList" :houseObj="curHouseObj" :curHouseType="curHouseType" @curSpaceChange="curSpaceChange" @curHouseTypeChange="curHouseTypeChange" @curHouseFloorChange="curHouseFloorChange"></viewShell>
+	<!-- 提交按钮 -->
+	<div class="submit-btn" @click="submitHouse">提交</div>
+	
     <div id="mapDiv" ref="webgl"></div>
 	<canvas id="glcanvas" width="100vw" height="100vh" ref="glcanvas">
 		你的浏览器似乎不支持或者禁用了 HTML5 <code>&lt;canvas&gt;</code> 元素。

+ 28 - 15
src/components/mapComponent/mapComponent.vue

@@ -19,8 +19,9 @@
 	import floorMethod from '@/mixins/floorMethod.js';
 	import wallMethod from '@/mixins/wallMethod.js';
 	import loadModel from '@/mixins/loadModel.js';
+	import viewShell from'@/components/newBottomCom/viewShell/viewShell.vue';
 	export default {
-		// components:{viewShell},
+		components:{viewShell},
 		mixins:[screenshot,floorMethod,wallMethod,loadModel],
 		/**
 		 * 页面的初始数据
@@ -199,14 +200,14 @@
 			this.starRender = starRender;//对外暴露启动渲染的方法
 			function init() {
 
-                scene.background = new THREE.Color("#F2F2F2");
-                scene.environment = new THREE.Color("#F2F2F2");
+                scene.background = new THREE.Color("#FFFFFF");
+                // scene.environment = new THREE.Color("#F2F2F2");
 
 				// 创建相机位置-投影相机
 				camera = new THREE.PerspectiveCamera( 80, window.innerWidth / window.innerHeight, 0.1, 10000 );
 				// let aspect = window.innerWidth /  window.innerHeight;
 				// camera = new THREE.OrthographicCamera( frustumSize * aspect / - 2, frustumSize * aspect / 2, frustumSize / 2, frustumSize / - 2, 0.1,1000);
-				camera.up.set(0, 1, -0);//俯视状态,将相机的up向量设置为z轴负方向
+				camera.up.set(0, 1, 0);//俯视状态,将相机的up向量设置为z轴负方向
 				camera.position.set(that.cameraStarPosition.x, that.cameraStarPosition.y, that.cameraStarPosition.z);
 				scene.add(camera);
                 that.camera = camera;
@@ -219,12 +220,12 @@
 				// scene.add(gridHelper);
 
                 // 环境光会均匀的照亮场景中的所有物体
-                const ambientLight = new THREE.AmbientLight( 0xffffff, 0.6 );
-                scene.add( ambientLight );
+                const ambientLight = new THREE.AmbientLight(0xFFEFE0, 2);
+                scene.add(ambientLight);
                 //平行光
-				const light = new THREE.DirectionalLight( 0xffedd1, 0.5 );
-				light.position.set(-14.8, 9.188, -7.448); //default; light shining from top
-				scene.add(light);
+                const light = new THREE.DirectionalLight(0xFFF8E5, 2.2);
+                light.position.set(-14.8, 9.188, -7.448); //default; light shining from top
+                scene.add(light);
                 // 从一个点向各个方向发射的光源。一个常见的例子是模拟一个灯泡发出的光。
                 // const pointLight = new THREE.PointLight( 0xffffff, 0.3 );
                 // camera.add( pointLight );
@@ -234,10 +235,14 @@
                 renderer = that.renderer = new THREE.WebGLRenderer( { canvas:canvas3d, alpha: true, antialias:false,
 					// 如果想保存three.js canvas画布上的信息,注意设置preserveDrawingBuffer
 					preserveDrawingBuffer: true, } );
-                renderer.outputEncoding = THREE.sRGBEncoding;
+				renderer.shadowMap.enabled = true;//产生阴影
+				renderer.shadowMap.type = THREE.PCFSoftShadowMap; // 阴影属性
+				renderer.outputEncoding = THREE.sRGBEncoding;
 				renderer.outputColorSpace = THREE.SRGBColorSpace;
-                renderer.toneMappingExposure = 0.3;//色调映射的曝光级别。默认是1
-
+				// renderer.toneMappingExposure = 0.1;//色调映射的曝光级别。默认是1
+				renderer.toneMapping = THREE.NoToneMapping;//色调映射
+				renderer.physicallyCorrectLights = true;//关键参数,模拟物理光照影响,必须设置为true
+				
                 renderer.setPixelRatio( window.devicePixelRatio );
                 renderer.setSize( window.innerWidth,  window.innerHeight );
                 container.appendChild( renderer.domElement );
@@ -252,7 +257,7 @@
 				controls.target.set(that.controlStarPosition.x, that.controlStarPosition.y, that.controlStarPosition.z);
 				controls.enableZoom = true;//启用摄像机的缩放
 				
-				that.controls = controls;
+				// that.controls = controls;
 				// controls.target = new THREE.Vector3( that.controlStarPosition.x, that.controlStarPosition.y, that.controlStarPosition.z );;
 				camera.lookAt(that.controlStarPosition.x,that.controlStarPosition.y,that.controlStarPosition.z);
                 // 监听
@@ -261,7 +266,15 @@
 				container.appendChild( stats.dom );
 				attendEvent();	//注册监听事件
 				starRender();	//启动渲染
+				// 监听
+				window.addEventListener( 'resize', onWindowResize );
             }
+			function onWindowResize() {
+			    camera.aspect = window.innerWidth / window.innerHeight;
+			    camera.updateProjectionMatrix();
+			    renderer.setSize( window.innerWidth, window.innerHeight );
+				console.warn("****onWindowResize**")
+			}
 			function attendEvent () {
 				document.addEventListener('touchstart', onPointerStart, false);
 				document.addEventListener('touchmove', onPointerMove, false);
@@ -1648,7 +1661,6 @@
 				this.loaderSpaceArr(this.spaceList);
                 // 绘制墙体
                 this.getHouseTypeSpaceWalls();
-				// this.getOverallArrangementDetailsList();
             },
 			// 添加文字标签
 			addWordLabel(){
@@ -1698,7 +1710,8 @@
                         }
                     }
                 }
-                this.loadSpaceObjWalls(wallArr, wallList)
+                this.loadSpaceObjWalls(wallArr, wallList);
+				this.getOverallArrangementDetailsList(2);
             },
 			// 加载单个空间墙体资源
             async loadSpaceObjWalls(wallArr, wallList){

+ 56 - 0
src/components/newBottomCom/viewCareful/viewCareful.css

@@ -0,0 +1,56 @@
+.careful-view{
+	position: relative;
+	width: auto;
+	box-sizing: border-box;
+	z-index: 12;
+}
+.careful-list{
+	width: 100%;
+	max-height:600rem;
+	margin-top:30rem;
+}
+.item-top{
+	width: 100%;
+}
+.careful-item .item-top .index-view{
+	width: 40rem;
+	height: 40rem;
+	background: #f0f0f0;
+	border-radius:20rem;
+	margin-right:10rem;
+	font-family: "DIN Alternate Bold";
+	font-weight: 700;
+	font-size: 28rem;
+	color: #585858;
+}
+.item-slider{
+	width: 100%;
+}
+.name-view{
+	font-family: "Verdana Bold";
+	font-weight: 700;
+	font-size: 28rem;
+	color: #585858;
+}
+.area-view{
+	font-family: "DIN Alternate Bold";
+	font-weight: 700;
+	font-size: 28rem;
+	color: #e89848;
+	margin-right:50rem;
+}
+.percent-view{
+	font-family: "DIN Alternate Bold";
+	font-weight: 700;
+	font-size: 28rem;
+	color: #333;
+}
+.ai-btn{
+	width: 80rem;
+	height: 84rem;
+	border-radius: 8rem;
+	background-image:linear-gradient(124deg, rgba(245, 201, 82, 0.2) 0%, rgba(239, 149, 57, 0.2) 100%);
+	font-weight: 400;
+	font-size: 24rem;
+	color: #f59d40;
+}

+ 33 - 0
src/components/newBottomCom/viewCareful/viewCareful.html

@@ -0,0 +1,33 @@
+<!-- 精细调整操作视图 -->
+<view class="careful-view">
+	<!-- 精细调整区域 -->
+	<scroll-view enable-flex="true" scroll-y :enhanced="true" :show-scrollbar="false">
+		<view class="careful-list">
+			<view class="careful-item rows rows-between" v-for="(carefulItem,index) in carefulList" :key="carefulItem.spaceId">
+				<view class="columns rows-between" style="width: 570rpx;">
+					<view class="item-top rows rows-between">
+						<view class="rows">
+							<view class="index-view rows justify-center">{{carefulItem.index+1}}</view>
+							<view class="name-view">{{carefulItem.name}}</view>
+						</view>
+						<view class="rows">
+							<view class="area-view">{{carefulItem.area}}㎡</view>
+							<view class="percent-view">{{carefulItem.percent}}%</view>
+						</view>
+					</view>
+					<view class="item-slider">
+						<slider style="margin:20rpx 16rpx" :disabled="overChange" class="moveProgress" :value="carefulItem.area"
+							@change="sliderChange($event,carefulItem)" @changing="sliderChanging($event,carefulItem)"
+							:activeColor="'#FFAD5C'" backgroundColor="#d2e0dd"
+							:block-color="'#FF9B0A'" block-size="16" step="0.1"
+							:min='carefulItem.minArea' :max='carefulItem.maxArea' />
+					</view>
+				</view>
+				<view class="ai-btn rows justify-center" @click="goRoam(carefulItem.spaceId)">
+					美家
+				</view>
+			</view>
+			
+		</view>
+	</scroll-view>
+</view>

+ 176 - 0
src/components/newBottomCom/viewCareful/viewCareful.vue

@@ -0,0 +1,176 @@
+<template src="./viewCareful.html">
+
+</template>
+<script>
+	// const util = require('@/static/utils/util.js');
+	const config = require('@/services/urlConfig.js');
+	// import Bus from '@/common/bus';
+	// import commonMethod from '@/common/commonMethod.js';
+	// import requestConfig from '@/static/lib/requestConfig';
+	// import bgLoading from "@/components/bgLoading/bgLoading.vue"
+	// import { nextTick } from "vue";
+	// const app = getApp(); //获取应用实例
+	export default {
+		data: function() {
+			return {
+				selectItem:null,
+				carefulList:[],
+			}
+		},
+		props:{
+			overChange: {//当前页面是否处在忙碌状态
+				type: Boolean,
+				default: false,
+			},
+			curHouseObj: {//当前展示的户型
+				type: Object,
+				default: () => {
+					return null
+				}
+			},
+		},
+		watch: {
+			curHouseObj: {
+				handler(newVal,oldVal) {
+					if (newVal) {
+						console.warn("***curHouseObj-CHANGE-viewCareful***", newVal,oldVal)
+						if(!oldVal || (oldVal && oldVal.id != newVal.id)){
+							this.initData();
+						}
+					}
+				},
+			},
+		},
+		// components:{
+		// 	bgLoading
+		// },
+		mixins: [],
+		async mounted() {//组件挂载时事件
+			// this.initData();
+			// var currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
+			// currPage.updateCareFul = this.initData;//页面注册变更方法
+		},
+		// 页面被展示时执行
+		onPageShow: function() {  
+		},
+		//页面被隐藏时执行
+        onPageHide: function() {
+        },
+		methods:{
+			//初始化数据
+			initData(){
+				// var currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
+				this.carefulList = [];
+				const spaceDetail = this.curHouseObj;
+				const spaceList = JSON.parse(spaceDetail.houseJson);
+				spaceList && spaceList.forEach((item,index)=>{
+					let curSpaceArea = parseFloat(
+						(item.spaceWidth * item.spaceHeight) / 10000
+					).toFixed(1);
+					let minArea = 0;
+					let maxArea = 100;
+					if(item.hasOwnProperty('spaceWidthMin') && item.hasOwnProperty('spaceHeightMin')){
+						minArea = parseFloat((item.spaceWidthMin * item.spaceHeightMin) / 10000).toFixed(1);
+					}
+					if(item.hasOwnProperty('spaceWidthMax') && item.hasOwnProperty('spaceHeightMax')){
+						maxArea = parseFloat((item.spaceWidthMax * item.spaceHeightMax) / 10000).toFixed(1);
+					}
+					let text = item.spaceName;
+					// console.warn("***carefulList-change1***", item,item.spaceType)
+					if(text && !item.isSizeLock){//楼梯不显示
+						let data = {
+							spaceId:item.spaceId,
+							index:this.carefulList.length,
+							name:text,
+							area:curSpaceArea,
+							percent:null,
+							minArea:minArea,	//最小面积
+							maxArea:maxArea,	//最大面积
+						}
+						this.carefulList.push(data)
+					}
+				})
+				
+				let result = this.carefulList.reduce((prev, cur)=>{
+				    return prev + parseFloat(cur.area);
+				},0);
+				this.carefulList.forEach(it=>{
+					if(!result){
+						it.percent = 100;
+					}else{
+						it.percent = (parseFloat(it.area) / parseFloat(result)*100).toFixed(0);
+					}
+				})
+				console.warn("***viewCareful-change***", this.carefulList)
+			},
+			sliderChanging(e,item) {
+				// const wallValue = e.detail.value;
+				// item.percent = 60;
+				// console.warn("***sliderChanging***",item)
+				// this.curWallMoveValue = Math.abs(this.curWallValue - wallValue);
+			},
+			sliderChange(e,item) {
+				console.log("滑块值:", e.detail.value);
+				if(this.overChange){
+					uni.showToast({
+						title: '请慢一点!',
+						icon: 'none',
+						duration: 2000
+					})
+					return false;
+				}
+				let _area = e.detail.value - parseFloat(item.area);
+				let data = {
+					spaceId:item.spaceId,
+					area:Math.abs(_area),
+					isZoomIn:_area>0?true:false,
+				}
+				let param = {
+					type: 'CLK', //埋点类型
+					clkId: 'clk_2cmina_23080405', //点击ID
+					clkName: 'zoomin_clk', //点击前往的页面名称
+					clkParams: {
+						locusName: "精细调整放大",
+					}
+				};
+				if(_area<0){//缩小
+					param = {
+						type: 'CLK', //埋点类型
+						clkId: 'clk_2cmina_23080406', //点击ID
+						clkName: 'zoomout_clk', //点击前往的页面名称
+						clkParams: {
+							locusName: "精细调整缩小",
+						}
+					};
+				}
+				// util.trackRequest(param);
+				console.log("发送消息-空间变化: ",data, JSON.stringify(item));
+				this.selectItem = item;
+				var currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
+				// this.sendMessageAction(JSON.stringify(parmas));
+				currPage.callBackFun = this.callBack;//通知回调
+				this.$emit("curSpaceChange",data);//通知父组件-当前已经选中了户型大类
+			},
+			goRoam(spaceId){
+				var currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
+				currPage.goRoam1(spaceId);
+			},
+			callBack(type){
+				console.warn("***callBack***",type)
+				var currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
+				// if(type==false){
+				// 	this.carefulList = [];
				// 	this.$nextTick(()=>{
				// 		this.initData();
				// 	})
+				// }
+				this.carefulList = [];
+				this.$nextTick(()=>{
+					this.initData();
+				})
+				currPage.callBackFun = null;
+			}
+		}
+	}
+</script>
+<style lang="css" scoped>
+    @import "./viewCareful.css";
+	/* @import "@/common/css/common.css"; */
+</style>

+ 75 - 0
src/components/newBottomCom/viewMask/viewMask.html

@@ -0,0 +1,75 @@
+<!-- 覆盖层操作视图 -->
+<div class="mask-view" @touchmove.stop.prevent="catchTapEvent" @click.stop="catchTapEvent">
+	<!-- AI图片-轮播图 -->
+	<swiper v-if="aiImagesList && aiImagesList.length>0" v-show="showAIImage" class="swiper" :autoplay="false" :circular="false"
+	 @change="swiperChangeImg"  :current="currentIndex" :indicator-dots="false">
+		<block v-for="(item,index1) in aiImagesList" :key="index1" >
+			<swiper-item >
+				<img @touchstart="mytouchstart" @touchmove="mytouchmove" @touchend="mytouchend" style="width:100%;height:100%;" mode="aspectFill" :src="item.image"></image>
+			</swiper-item>
+		</block>
+	</swiper>
+	<div class="indicator-view rows" v-if="aiImagesList && aiImagesList.length>1 && showAIImage">
+		<div class="indicator-item" :class="{'active': currentIndex == idx}" v-for="(item, idx) in aiImagesList" :key="idx"></div>
+	</div>
+	<div class="loading_more" v-if="aiFlag && aiImagesList.length>0 && showAIImage">
+		<img class="loading_img"
+			src="https://dm.static2.elab-plus.com/aiBeauty/aiBeauty3/icon_loading_Img.png"
+			mode="aspectFit"></image>
+		<!-- <img class="loading_text"
+			src="https://dm.static2.elab-plus.com/aiBeauty/aiBeauty3/icon_loading_text.png"
+			mode="heightFix"></image> -->
+			自动生成更多图片中{{random+'%'}}...
+	</div>
+	<!-- 切换视角 -->
+	<div class="change-angle columns" @click.stop="switchActor" v-if="aiImagesList && aiImagesList.length>0">
+		<img class="camera" src="https://dm.static.elab-plus.com/miniProgram/iconfont/camera.png" mode="widthFix"/>
+		视角切换
+	</div>
+	<!-- 右侧按钮 -->
+	<div class="btn-view columns" v-if="aiImagesList && aiImagesList.length>0">
+		<!-- 下载 -->
+		<div class="compareBtn btn1" @click.self="save" v-if="showAIImage">
+			<img class="down" src="https://dm.static.elab-plus.com/miniProgram/iconfont/down.png" mode="widthFix"/>
+		</div>
+		<!-- 切换视图-退出当前模式 -->
+		<div class="compareBtn" @click.self="showOrHideWebGl">
+			<img class="compareIcon" src="https://dm.static.elab-plus.com/miniProgram/space1/compareAI_btn.png" mode="widthFix" />
+		</div>
+	</div>
+	
+	<!-- 风格层主操作视图 -->
+	<div class="layout-view" :style="{'height':disableAble?'248rpx':'448rpx'}">
+		<!-- 手势区域 -->
+		<div class="signscoll-block"></div>
+		<!-- 精装修 -->
+		<div class="aiEdit">
+			<scroll-view scroll-x="true" class="aiStyleList" :style="{'height':disableAble?'20rpx':'240rpx'}">
+				<div class="scrollViewItem" v-for="(item, idx) in styleList" :key="idx" :id="'styleItem'+idx"
+					@click.stop="selectStyle(idx)">
+					<div class="styleItem" :class="{'styleItemSelected':curStyleIndex==idx}">
+						<img class="styleIcon" :src="item.imgUrl" mode="aspectFill"></image>
+						<text class="styleTitle">{{item.styleName}}</text>
+					</div>
+				</div>
+			</scroll-view>
+			<div class="aiTool">
+				<div class="changeBtn" v-if="showAIFlag" @click.stop="changeAIImg">
+					<span v-if="checked==false" class="iconfont icon-xingzhuang-tuoyuanxing" style="margin-right:10rpx;font-size:36rpx;"></span>
+					<span v-else class="iconfont icon-ziyuan" style="margin-right:10rpx;font-size:36rpx;color:#FAB060"></span>
+					<!-- <img class="right-icon" src="https://dm.static.elab-plus.com/miniProgram/iconfont/right-icon.png" mode="widthFix"/> -->
+					{{checked?'已选定图片':'选定图片'}}
+				</div>
+				<div v-if="showAIFlag" class="submitBtn continue rows justify-center" @click.stop="aiSubmit(2)"
+				 :class="{disable:disableAble}">
+					继续生成
+				</div>
+				<div v-else class="submitBtn rows justify-center" @click.stop="aiSubmit(1)" 
+				:class="{disable:disableAble}" >
+					<img class="magic-icon" src="https://dm.static.elab-plus.com/miniProgram/iconfont/magic.png" mode="widthFix"/>
+					AI生成精软装风格
+				</div>
+			</div>
+		</div>
+	</div>
+</div>

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

@@ -0,0 +1,296 @@
+.mask-view{
+	position: absolute;
+	bottom:0rem;
+	width:100vw; 
+	height:100vh;
+	box-sizing: border-box;
+	z-index: 12;
+	font-family: "Verdana Bold";
+	font-size: 0rem;
+	background: transparent;
+	pointer-events: none;
+}
+// .pointer-auto{
+// 	pointer-events: auto;
+// }
+.swiper{
+	position: relative;
+	width: 100%;
+	height:calc(100vh - 408rem);
+	z-index: 12;
+	pointer-events: auto;
+}
+.change-angle{
+	position: absolute;
+	width: 72rem;
+	height: 160rem;
+	left:30rem;
+	bottom:478rem;
+	border-radius: 12rem;
+	padding:20rem 10rem;
+	background: rgba(0, 0, 0, 0.5);
+	box-sizing: border-box;
+	font-family: "Verdana Bold";
+	font-weight: 700;
+	font-size: 24rem;
+	color: #fff;
+	text-align: center;
+	justify-content:unset;
+	z-index: 13;
+	.camera{
+		width: 43.07rem;
+		height: 49.22rem;
+	}
+	pointer-events: auto;
+}
+.btn-view{
+	position: absolute;
+	bottom: 478rem;
+	right: 30rem;
+	width: 72rem;
+	z-index: 13;
+	pointer-events: auto;
+	.compareBtn {
+		position: relative;
+		background: rgba(0,0,0,0.2);
+		border-radius: 50%;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		pointer-events: auto;
+		z-index:11;
+		width: 72rem;
+		height: 72rem;
+	}
+	.btn1{
+		margin-bottom:20rem;
+	}
+	.compareIcon {
+		width: 42rem;
+		height: 44rem;
+	}
+	.down{
+		width: 40rem;
+		height: 39rem;
+	}
+}
+
+.layout-view{
+	position: absolute;
+	bottom:0rem;
+	left:0rem;
+	width: 100vw;
+	height: 448rem;
+	border-radius: 40rem 40rem 0 0;
+	background: #fff;
+	box-shadow: 0 -6rem 12rem rgba(0, 0, 0, 0.12);
+	z-index: 15;
+	padding:0rem 30rem;
+	box-sizing: border-box;
+	pointer-events: auto;
+	.signscoll-block{
+		position: absolute;
+		width: 90rem;
+		height: 10rem;
+		border-radius: 5rem;
+		background: #707070;
+		opacity: 0.6;
+		top: 10rem;
+		left:330rem;
+	}
+}
+
+.aiEdit {
+	position: relative;
+	width: 100%;
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+	margin-top:60rem;
+	.aiStyleList {
+		width: 100%;
+		height: 240rem;
+		/* background: #333; */
+		flex-shrink: 0;
+		white-space: nowrap;
+
+		.scrollViewItem {
+			width: 152rem;
+			height: 100%;
+			display: inline-block;
+			margin: 0rem 10rem;
+		}
+
+		.scrollViewItem:first-child {
+			margin-left: 30rem;
+		}
+
+		.scrollViewItem:last-child {
+			margin-right: 30rem;
+		}
+
+		.styleItem {
+			position: absolute;
+			width: 144rem;
+			height: 100%;
+			display: flex;
+			flex-direction: column;
+			justify-content: center;
+			align-items: center;
+
+			/* background: red; */
+			.styleIcon {
+				width: 144rem;
+				height: 144rem;
+				background: #5c5c5c;
+				border-radius: 12rem;
+				border: 2rem solid #fff;
+			}
+
+			.styleTitle {
+				margin-top: 20rem;
+				font-family: "Verdana";
+				font-weight: 400;
+				font-size: 28rem;
+				text-align: center;
+				color: #4e4e4e;
+			}
+		}
+
+		.styleItemSelected {
+			.styleIcon {
+				border: 2rem solid #ff9c38;
+			}
+
+			.styleTitle {
+				font-family: "Verdana Bold";
+				font-weight: 700;
+				color: #ff9f40;
+			}
+		}
+	}
+
+	.aiStyleList ::-webkit-scrollbar {
+		width: 0;
+		height: 0;
+		background-color: transparent;
+	}
+
+	.aiTool {
+		width: 100%;
+		height: 100rem;
+		display: flex;
+		flex-direction: row;
+		align-items: center;
+		justify-content: center;
+		/* background: red; */
+		// margin: 0rem 30rem;
+		margin-top: 10rem;
+		padding: 0rem 30rem;
+		box-sizing: border-box;
+		.changeBtn {
+			width: 320rem;
+			height: 100rem;
+			border-radius: 50rem;
+			background: rgba(255, 156, 56, 0.15);
+			margin-right: 30rem;
+			line-height: 100rem;
+			text-align: center;
+			font-family: "DIN Alternate Bold";
+			font-weight: 700;
+			font-size: 32rem;
+			color: #ff9f36;
+		}
+
+		.submitBtn {
+			width: 460rem;
+			border-radius: 50rem;
+			background: rgba(255, 156, 56, 0.15);
+			text-align: center;
+			height: 100%;
+			line-height: 100rem;
+			font-family: "DIN Alternate Bold";
+			font-weight: 700;
+			font-size: 28rem;
+			color: #fff;
+			box-shadow: 0 6rem 20rem rgba(242, 152, 2, 0.2);
+			backdrop-filter: blur(40rem);
+			background-color: rgba(255, 255, 255, 0.15);
+			background-image:linear-gradient(124deg, rgba(245, 201, 82, 1) 0%, rgba(239, 149, 57, 1) 100%);
+		}
+		.disable{
+			background-color: #ccc;
+			background-image: unset;
+		}
+		.continue{
+			width: 330rem;
+			background: #fab060;
+		}
+		.right-icon{
+			width: 34rem;
+			height: 34rem;
+			margin-right:10rem;
+		}
+		.magic-icon{
+			width: 40.6rem;
+			height: 40.56rem;
+			margin-right:10rem;
+		}
+	}
+}
+.indicator-view{
+	position: absolute;
+	z-index: 12;
+	bottom: 468rem;
+	left:50%;
+	transform: translateX(-50%);
+	.indicator-item{
+		width: 12rem;
+		height: 12rem;
+		background: #fff;
+		opacity: 0.52;
+		margin-right:6rem;
+		border-radius: 50%;
+		&.active{
+			opacity:1;
+		}
+		&:last-child{
+			margin-right:0rem;
+		}
+	}
+}
+.loading_more {
+	position: absolute;
+	width: 100%;
+	z-index: 12;
+	bottom: 498rem;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	z-index: 25;
+	color:#fff;
+	font-size:28rem;
+	.loading_img {
+		width: 40rem;
+		height: 40rem;
+		margin-right: 10rem;
+
+		-webkit-animation: rotation 1s linear infinite;
+		animation: rotation 1s linear infinite;
+	}
+
+	@-webkit-keyframes rotation {
+		0% {
+			transform: rotate(0deg);
+		}
+
+		100% {
+			transform: rotate(360deg);
+		}
+	}
+
+	.loading_text {
+		height: 40rem;
+	}
+
+}

+ 687 - 0
src/components/newBottomCom/viewMask/viewMask.vue

@@ -0,0 +1,687 @@
+<template src="./viewMask.html">
+
+</template>
+<script>
+	const util = require('@/static/utils/util.js');
+	const config = require('@/static/config.js');
+	import touchHandle from '@/common/mixins/touchHandle.js';
+	import requestConfig from '@/static/lib/requestConfig';
+	const app = getApp(); //获取应用实例
+	export default {
+		mixins: [touchHandle],
+		data: function() {
+			return {
+				currentIndex:0,	//当前看到的图片序号
+				showAIImage: false,//是否显示当前AI结果集合 默认不显示,因为没有
+				aiImagesList:[
+					// {
+					// 	image:"https://dm.static.elab-plus.com/miniProgram/plus_IM01.png",
+					// 	checked:false,
+					// },
+					// {
+					// 	image:"https://dm.static.elab-plus.com/miniProgram/plus_IM02.png",
+					// 	checked:false,
+					// }
+				],//AI生成的图片列表
+				
+				styleList: [], //风格列表数据
+				curStyleIndex: 0, //当前选中的风格序号
+				aiFlag:false,
+				aiImage: "",
+				inputBase64Url: "",
+				taskId: "", // 图生图任务ID
+				img2imgTimer: null,
+				imageWidth: 320,
+				imageHeight: 448,
+				showAIFlag:false,//继续生成状态切换标志
+				checked:false,
+				shottingImg:'',
+				count:0,
+				random:1,
+				disableAble:false,
+				spaceTypes: [{
+						icon: "",
+						title: "卧室",
+						subtitle: "0个布局",
+						englishRemark: "bedroom",
+					},
+					{
+						icon: "",
+						title: "客厅",
+						subtitle: "0个布局",
+						englishRemark: "living room",
+					},
+					{
+						icon: "",
+						title: "餐厅",
+						subtitle: "0个布局",
+						englishRemark: "dinning room",
+					},
+					{
+						icon: "",
+						title: "厨房",
+						subtitle: "0个个布局",
+						englishRemark: "kitchen",
+					},
+					{
+						icon: "",
+						title: "玄关",
+						subtitle: "0个布局",
+						englishRemark: "hallway",
+					},
+					{
+						icon: "",
+						title: "卫生间",
+						subtitle: "0个布局",
+						englishRemark: "bathroom",
+					},
+					{
+						icon: "",
+						title: "衣帽间",
+						subtitle: "0个布局",
+						englishRemark: "walkin closet",
+					},
+					{
+						icon: "",
+						title: "收纳",
+						subtitle: "0个布局",
+						englishRemark: "storage room",
+					},
+					{
+						icon: "",
+						title: "阳台",
+						subtitle: "0个布局",
+						englishRemark: "balcony",
+					},
+					{
+						icon: "",
+						title: "飘窗",
+						subtitle: "0个布局",
+						englishRemark: "bay window",
+					},
+					{
+						icon: "",
+						title: "链接空间",
+						subtitle: "0个布局",
+						englishRemark: "connecting space between two rooms",
+					},
+					{
+						icon: "",
+						title: "自定义",
+						subtitle: "0个布局",
+						englishRemark: "room",
+					},
+				],
+			}
+		},
+		props:{
+			spaceObj: {
+				type: Object,
+				default: null,
+			},
+		},
+		watch: {
+			spaceObj(newVal, oldVal) {
+				if (newVal == null) {
+					return;
+				}
+				console.log("当前空间数据view-mark-watch:", newVal);
+				this.getAiBeautyFamily();
+				// this.curSpaceArea = parseFloat(
+				// 	(newVal.spaceWidth * newVal.spaceHeight) / 10000
+				// ).toFixed(2);
+				// this.getOverallArrangementDetailsList();
+			},
+		},
+		mounted() {//组件挂载时事件
+			// console.warn("***mounted-nav***",this.seedItem)
+			// if(this.seedItem){
+			// 	this.title = this.seedItem.seedText;
+			// }
+		},
+		// 页面被展示时执行
+		onPageShow: function() {  
+			
+		},
+		//页面被隐藏时执行
+        onPageHide: function() {
+        },
+		beforeDestroy:function(){
+			console.warn("***beforeDestroy***");//更新到页面上的数据
+			this.clearInterval();
+		},
+		methods:{
+			swiperChangeImg(e){
+			    console.log(e);
+				this.currentIndex = e.detail.current;
+				this.checked = this.aiImagesList[this.currentIndex].checked;
+				console.warn("***changeAIImg***",this.checked);//更新到页面上的数据
+			},
+			//视角切换
+			switchActor(){
+				let currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
+				// currPage.clearHandle()
+				this.$emit('switchActor');
+				this.showAIImage = false;//隐藏AI结果集合-执行切换视角
+				let index = currPage.currentActor.userIndex;//当前视角的序号
+				let nextIndex = (index + 1) % currPage.actors.length;
+				let param = {
+					type: 'CLK', //埋点类型
+					clkId: 'clk_2cmina_23080417', //点击ID
+					clkName: 'changeangle_clk', //点击前往的页面名称
+					clkParams: {
+						locusName: "视角切换",
+						type:currPage.actors[nextIndex].actorEum
+					}
+				};
+				util.trackRequest(param);
+			},
+			showOrHideWebGl(){
+				let currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
+				currPage.clearHandle()
+				this.showAIImage = !this.showAIImage;
+				let param = {
+					type: 'CLK', //埋点类型
+					clkId: 'clk_2cmina_23080415', //点击ID
+					clkName: 'contrast_clk', //点击前往的页面名称
+					clkParams: {
+						locusName: "对比",
+					}
+				};
+				util.trackRequest(param);
+				setTimeout(()=> {
+					if(this.showAIImage==true){
+						currPage.clearHandle()
+					}else{
+						currPage.attendEvent()
+					}
+				}, 100);
+			},
+			//保存到相册
+			save() {
+			    //表示canvas正在绘制,不能进行保存
+			    if (!this.aiImagesList || this.aiImagesList.length==0) {
+			        return false;
+			    }
+				var _resultImg = this.aiImagesList[this.currentIndex].image;
+			    //正在选择照片,不能生效
+			    if (!_resultImg || _resultImg.length==0) {
+					uni.showToast({
+					    title: "请选中图片后再试!",
+					    icon: 'none',
+					    duration: 1500,
+					})
+			        return false;
+			    }
+			    let that = this;
+			    var para = {
+			        type: 'CLK', //埋点类型
+			        clkId: 'clk_2cmina_56', //点击ID,固定
+			        clkName: "share-savepic", //点击名称
+			        expand: {
+			            "resultImg": (_resultImg || ""),
+			        },
+			    }
+			    util.trackRequest(para);
+			    uni.getSetting({
+			        success: (response) => {
+			            console.log("***rtcroomCom.onLoad***getSetting", response)
+			            // 没有授权
+			            if (!response.authSetting['scope.writePhotosAlbum']) {
+			                console.warn("***scope.writePhotosAlbum-false***")
+			                uni.authorize({
+			                    scope: 'scope.writePhotosAlbum',
+			                    success() {
+			                        that.saveImageHandle(_resultImg);
+			                    },
+			                    fail(res) {
+			                        console.log("***scope.writePhotosAlbum***")
+			                        uni.hideLoading();
+			                    }
+			                })
+			            } else {
+			                console.log("***scope.writePhotosAlbum-ok***")
+			                that.saveImageHandle(_resultImg);
+			            }
+			        }
+			    })
+			},
+			saveImageHandle(_resultImg){
+				let param = {
+					type: 'CLK', //埋点类型
+					clkId: 'clk_2cmina_23080414', //点击ID
+					clkName: 'download_clk', //点击前往的页面名称
+					clkParams: {
+						locusName: "下载",
+						img:_resultImg
+					}
+				};
+				util.trackRequest(param);
+				//表示图是临时文件,则可以直接保存
+				if (_resultImg.startsWith("http://tmp/") || _resultImg.startsWith("wxfile://")) {
+				    uni.saveImageToPhotosAlbum({
+				        filePath: _resultImg,
+				        success(result) {
+				            uni.hideLoading();
+				            uni.showToast({
+				                title: "保存成功!",
+				                icon: 'success',
+				                duration: 1500,
+				            })
+				        },
+				        fail(err) {
+				            uni.hideLoading();
+				        }
+				    })
+				} else { //表示该图是网络图片,需要先下载才能保存
+				    console.log("***getSetting.save***网络图片", _resultImg);
+				    uni.downloadFile({
+				        url: _resultImg,
+				        success: function(res) {
+				            uni.saveImageToPhotosAlbum({
+				                filePath: res.tempFilePath,
+				                success(result) {
+				                    uni.hideLoading();
+				                    uni.showToast({
+				                        title: "保存成功!",
+				                        icon: 'success',
+				                        duration: 1500,
+				                    })
+				                },
+				                fail(err) {
+				                    uni.hideLoading();
+				                }
+				            })
+				        },
+				        fail(err) {
+				            uni.hideLoading();
+				        }
+				    });
+				}
+			},
+		
+			//选项变更
+			changeAIImg() {
+				// let currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
+				let lastPage = getCurrentPages()[getCurrentPages().length - 2] ? getCurrentPages()[getCurrentPages().length - 2].$vm : null;
+				this.checked = !this.checked;//变更选项
+				this.aiImagesList[this.currentIndex].checked = this.checked;
+				console.warn("***changeAIImg***",this.checked)
+				// currPage.aiImagesList[this.currentIndex].checked = this.checked;
+				if(lastPage){//给上一个页面回传生成的数据
+					let space = lastPage.postAIData.find(it=>{
+						return it.spaceId == this.spaceObj.spaceId
+					})
+					if(space){
+						space.aiImagesList[this.currentIndex].checked = this.checked;
+					}
+				}
+				if(this.checked){
+					let param = {
+						type: 'CLK', //埋点类型
+						clkId: 'clk_2cmina_23080418', //点击ID
+						clkName: 'chooseprogramme_clk', //点击前往的页面名称
+						clkParams: {
+							locusName: "选定风格/视角",
+							style:this.styleList[this.curStyleIndex].styleName,
+							img:this.aiImagesList[this.currentIndex].image,
+						}
+					};
+					util.trackRequest(param);
+				}
+			},
+			leftScroll(){//继续生成
+				if(this.currentIndex != this.aiImagesList.length - 1){
+					return false;
+				}
+				console.log("***leftScroll***",this.currentIndex,this.aiImagesList.length)
+				this.aiSubmit(2);//继续生成下一张
+			},
+			catchTapEvent:function(){
+				return false;
+			},
+			//获取AI风格列表
+			async getAiBeautyFamily() {
+				let currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
+				// const spaceName = this.spaceTypes[this.spaceObj.spaceType - 1].title;
+				let res = await requestConfig("getHardboundEffects", {
+					"houseId": currPage.houseId,
+					"spaceType": this.spaceObj.spaceType,
+				});
+				this.styleList = [];
+				if (res.success) {
+					let list = res.list;
+					this.styleList = list;
+				}
+				if(!this.styleList || this.styleList.length==0){
+					this.disableAble = true;//不能点击-没有风格
+					let currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
+					let unit = app.globalData.systemInfo.screenWidth / 750;//单位rpx 对应 px 的值
+					currPage.canvasHeight = app.globalData.systemInfo.screenHeight - (208 * unit);
+					currPage.camera.aspect = app.globalData.systemInfo.screenWidth / currPage.canvasHeight;
+					currPage.camera.updateProjectionMatrix();
+					currPage.renderer.setSize(app.globalData.systemInfo.screenWidth, currPage.canvasHeight);
+				}else{
+					this.disableAble = false;//可以点击
+				}
+			},
+			clearInterval() {
+				if (this.img2imgTimer) {
+					clearInterval(this.img2imgTimer);
+					this.img2imgTimer = null;
+					this.random = 1;
+				}
+			},
+			//风格选择
+			selectStyle(idx){
+				if(this.curStyleIndex == idx){
+					return false
+				}
+				this.curStyleIndex = idx;
+				let param = {
+					type: 'CLK', //埋点类型
+					clkId: 'clk_2cmina_23080416', //点击ID
+					clkName: 'AIstyle_ret_clk', //点击前往的页面名称
+					clkParams: {
+						locusName: "AI 风格",
+						type:this.styleList[this.curStyleIndex].styleName
+					}
+				};
+				util.trackRequest(param);
+			},
+			// AI渲染
+			async aiSubmit(type) {
+				if(!this.styleList || this.styleList.length==0 || this.curStyleIndex==-1
+				|| !this.styleList[this.curStyleIndex].prompt || !this.styleList[this.curStyleIndex].negativePrompt){
+					return false;
+				}
+				// 防止连续点击处理
+				if (this.aiFlag) {
+					return
+				}
+				this.aiFlag = true;
+				let currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
+				if (this.aiImage == "" || !this.aiImage) {
+					this.aiImage = ""; // https://dm.static.elab-plus.com/CE4/backImg.png
+				}
+				this.aiImage = "";
+			
+				this.clearInterval();
+				if(!this.showAIImage){
+					uni.showLoading({
+						title: "设计中...",
+					});
+				}
+				
+				// this.inputBase64Url = await this.shottingAction(2);//开始截图-返回的是base64的数据
+				// this.startServer();
+				if(type==1){//AI生成时,重新截图,继续生成时,不重新截图
+					this.$emit('hideOrShowActor','hide');//隐藏所有视角
+					let shottingImg = await currPage.shottingAction();//开始截图-返回的是图片
+					shottingImg += "?imageMogr2/auto-orient/format/webp/blur/1x0/quality/75";//压缩图片
+					this.shottingImg = shottingImg;
+					this.$emit('hideOrShowActor','show');//显示选中的视角
+				}
+				this.changeImg2Base64(this.shottingImg, type==1?false:true);
+				console.warn("***shottingImg***",this.shottingImg)
+				if(type==1){
+					let param = {
+						type: 'CLK', //埋点类型
+						clkId: 'clk_2cmina_23080413', //点击ID
+						clkName: 'AIcreate_clk', //点击前往的页面名称
+						clkParams: {
+							locusName: "AI生成",
+							userparamter:{
+								shottingImg:this.shottingImg,
+								style:this.styleList[this.curStyleIndex].styleName
+							}
+						}
+					};
+					util.trackRequest(param);
+				}else{
+					let param = {
+						type: 'CLK', //埋点类型
+						clkId: 'clk_2cmina_23080419', //点击ID
+						clkName: 'continueAIcreate_clk', //点击前往的页面名称
+						clkParams: {
+							locusName: "继续生成",
+							userparamter:{
+								shottingImg:this.shottingImg,
+								style:this.styleList[this.curStyleIndex].styleName
+							}
+						}
+					};
+					util.trackRequest(param);
+				}
+			},
+			changeImg2Base64(url, isRepeat) {
+				var self = this;
+				if(isRepeat && self.inputBase64Url){//重复使用
+					self.startServer();
+				}else{
+					uni.request({
+						url: url,
+						method: "GET",
+						responseType: "arraybuffer",
+						success: async (res) => {
+							let base64 = wx.arrayBufferToBase64(res.data);
+							let Base64Url = "data:image/jpeg;base64," + base64;
+							// console.log('base64:', Base64Url);
+							self.inputBase64Url = Base64Url;
+							console.log("生成inputBase64Url");
+							self.startServer();
+						},
+					});
+				}
+			},
+			//开始图生图流程
+			async startServer() {
+				let data = {
+					"configType": "ControlNet_Config",
+					"keyvalue": "mix混合风_controlnet_upload",
+					"server": "simple_and_quiet",
+					"model": "control_v11p_sd15_mlsd_fp16 [77b5ad24]",
+					"cpu": "mlsd",
+					"session_hash": Date.now(),
+					"weight": 0.8,
+					"number1": 0.2,
+					"number2": 1,
+					"number3": 0.1,
+					"number4": 1,
+					"imageBase64": this.inputBase64Url
+				}
+				let res1 = await requestConfig("AIuploadImgControlNet", data);
+				if(!res1 || !res1.single){
+					uni.hideLoading();
+					this.aiFlag = false;
+					uni.showToast({
+						icon: "none",
+						title: "渲染失败,请重试",
+					});
+					this.aiImage = "";
+					return false;
+				}
+				let session_hash = res1.single;
+				data.model = "control_v11p_sd15_seg_fp16 [ab613144]";
+				data.cpu =  "seg_ofade20k";
+				data.weight =  0.5;
+				data.number1 =  0.1;
+				data.number2 =  0.2;
+				data.number3 =  0;
+				data.number4 =  0.1;
+				data.session_hash = session_hash;
+				
+				let res2 = await requestConfig("AIuploadImgControlNet", data);
+				if(!res2 || !res2.success){
+					uni.hideLoading();
+					this.aiFlag = false;
+					uni.showToast({
+						icon: "none",
+						title: "渲染失败,请重试",
+					});
+					this.aiImage = "";
+					return false;
+				}
+				
+				const prompt = this.styleList[this.curStyleIndex].prompt;
+				const noPromot = this.styleList[this.curStyleIndex].negativePrompt;
+				
+				var parmas = {
+					negativePrompt: noPromot,
+					prompt: prompt,
+					"batchSize": 1,
+					brandId: config.brandId,
+					height: this.imageHeight,
+					width: this.imageWidth,
+					"moduleType": "simple_and_quiet",
+					"keyword":"img_2_img",
+					"steps":50,
+					"sampler":"DDIM",
+					"controlNetSessionHash":session_hash,
+					"cfgScale":12,
+					"denoising":0.9
+				};
+				let res = await requestConfig("generateTaskImgToImgForAliyun", parmas);
+				console.log("图生图结果:", res);
+				let currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
+				if(currPage && currPage.pvCurPageName!="room_show"){//说明用户切换页面了
+					console.warn("***用户已经退出页面***")
+					return false;
+				}
+				let that = this;
+				if (res.success && res.single) {
+					if(typeof(res.single)=="object"){
+						uni.showToast({
+							icon: "none",
+							title: `${
+								res.single.queueCount | 0
+							}人排队中,预计等待${Math.round(Math.random() * 20)}秒`,
+						});
+						this.aiImage = "";
+						this.aiFlag = false;
+						this.clearInterval();
+						return false;
+					}
+					this.taskId = res.single;
+					if (!this.img2imgTimer) {
+						this.count = 0;
+						this.random = 1;
+						this.img2imgTimer = setInterval(() => {
+							this.count ++;
+							this.getResultForImgToImg();
+						}, 1000);
+					}
+				}else{
+					uni.hideLoading();
+					this.aiFlag = false;
+					uni.showToast({
+						icon: "none",
+						title: "渲染失败,请重试",
+					});
+					this.aiImage = "";
+				}
+			},
+			// 轮询获取图片结果
+			async getResultForImgToImg() {
+				var parmas = {
+					id: this.taskId,
+				};
+				let res = await requestConfig("generateProcess", parmas);
+				let currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
+				let lastPage = getCurrentPages()[getCurrentPages().length - 2] ? getCurrentPages()[getCurrentPages().length - 2].$vm : null;
+				// console.warn("图生图轮询结果:", res);
+				if (res.success && res.single) {
+					if (res.single.inQueue == false) {
+						if (res.single.urls) {
+							uni.hideLoading();
+							this.aiFlag = false;
+							this.random = 100;
+							console.warn("图生图轮询结束: ", res);
+							this.aiImage = res.single.urls[0];
+							this.showAIFlag = true;
+							let newImage = this.aiImage;
+							let aiStyleName = this.styleList[this.curStyleIndex].styleName;
+							let _data = {
+								image:newImage,
+								checked:false,
+							}
+							this.aiImagesList.push(_data);
+							this.showAIImage = true;//显示AI结果集合-因为生成了AI图片
+							if(currPage && typeof(currPage.clearHandle)=="function" ){
+								currPage.clearHandle();
+							}
+							if(lastPage && lastPage.postAIData){//给上一个页面回传生成的数据
+								let space = lastPage.postAIData.find(it=>{
+									return it.houseFloor == lastPage.curHouseFloor && it.spaceId == this.spaceObj.spaceId
+								})
+								if(space){
+									let data ={
+										aiStyleName:aiStyleName,
+										image:newImage,
+										checked:false,
+									}
+									space.aiImagesList.push(data);
+								}else{//不存在则构建数据
+									let data = {
+										houseFloor:lastPage.curHouseFloor,//当前的楼层
+										spaceId:this.spaceObj.spaceId,
+										aiImagesList:[
+											{
+												aiStyleName:aiStyleName,
+												image:newImage,
+												checked:false,
+											}
+										]
+									}
+									lastPage.postAIData.push(data)
+								}
+							}
+							this.clearInterval();
+						} else {
+							if (!res.success) {
+								uni.hideLoading();
+								this.aiFlag = false;
+								uni.showToast({
+									icon: "none",
+									title: "渲染失败,请重试",
+								});
+								this.aiImage = "";
+								this.clearInterval();
+							}else {
+								this.random = parseInt(this.count * 2);
+								if(this.random>100){
+									this.random = 99;
+								}
+								if(!this.showAIImage){
+									uni.showLoading({
+										icon: 'loading',
+										title: '生成中…' + this.random + '%'
+									})
+								}else{
+									uni.hideLoading();
+								}
+							}
+						}
+					} else {
+						uni.showToast({
+							icon: "none",
+							title: `${
+								res.single.queueCount | 0
+							}人排队中,预计等待${Math.round(Math.random() * 20)}秒`,
+						});
+						this.aiImage = "";
+						this.aiFlag = false;
+						this.clearInterval();
+					}
+				}
+			},
+			
+		}
+	}
+</script>
+<style lang="scss" scoped>
+    @import "./viewMask.scss";
+</style>
+<style lang="css" scoped>
+	@import "@/common/css/common.css";
+</style>

+ 116 - 0
src/components/newBottomCom/viewShell/viewShell.css

@@ -0,0 +1,116 @@
+.plus_park {
+	position: relative;
+}
+.shell-view{
+	position: fixed;
+	left: 0rem;
+	bottom: 0rem;
+	width: 100vw;
+	height: 380rem;
+	border-radius: 40rem 40rem 0 0;
+	background: #fff;
+	box-shadow: 0 -6rem 12rem #0000001f;
+	box-sizing: border-box;
+	z-index: 15;
+	padding:0rem 40rem;
+	padding-top:30rem;
+	padding-bottom:60rem;
+	transition: height 1s;
+}
+.shell-view2{
+	height: 448rem;
+	padding-left:0rem;
+	padding-right:0rem;
+}
+.shell-signscoll{
+	position: absolute;
+	top:-50rem;
+	left:275rem;
+	width:200rem;
+	height: 100rem;
+	z-index: 120;
+	/* padding-top:50rem; */
+	box-sizing: border-box;
+}
+.signscoll-block{
+	position: absolute;
+	width: 90rem;
+	height: 10rem;
+	border-radius: 5rem;
+	background: #707070;
+	opacity: 0.6;
+	bottom: 30rem;
+}
+.floor-view{
+	position: absolute;
+	left:30rem;
+	width: 72rem;
+	border-radius: 12rem;
+	background: rgba(0, 0, 0, 0.4);
+	overflow: hidden;
+}
+.floor-item{
+	height: 60rem;
+	color: #fff;
+}
+.floor-item.active{
+	color: #faa040;
+	background: #fff;
+}
+.tips-view{
+	position: absolute;
+	left:50%;
+	transform:translateX(-50%);
+	top:-50rem;
+	font-family: "Verdana";
+	font-weight: 400;
+	font-size: 26rem;
+	line-height: 30rem;
+	text-align: center;
+	color: #2b2b2b;
+	opacity: 0.5;
+	pointer-events: none;
+}
+
+.zoom-view{
+	position: absolute;
+	top:-82rem;
+	right:30rem;
+	width: 52rem;
+	height: 52rem;
+}
+.zoom-view .icon {
+	width: 52rem;
+	height: 52rem;
+}
+.connect-view{
+	position: absolute;
+	width: 72rem;
+	height: 160rem;
+	border-radius: 36rem;
+	background: rgba(0, 0, 0, 0.4);
+	top:-190rem;
+	right:30rem; 
+	padding:2rem;
+	padding-bottom:18rem;
+	box-sizing: border-box;
+	font-family: "Verdana";
+	font-weight: 400;
+	font-size: 24rem;
+	line-height: 28rem;
+	color: #fff;
+	text-align: center;
+	justify-content:unset;
+}
+.connect-view .defaultHead{
+	width: 68rem;
+	height: 68rem;
+}
+button{
+	background-color: unset;
+	line-height: unset;
+	padding: unset;
+}
+button::after {
+    border: none;
+}

+ 36 - 0
src/components/newBottomCom/viewShell/viewShell.html

@@ -0,0 +1,36 @@
+<!-- 弹出层的壳子 -->
+<div class="shell-view" :class="pageType==2?'shell-view2':''" :style="{'height':shellHeight}" @touchmove.stop="catchTouchMove">
+	<!-- 楼层 -->
+	<div class="floor-view" v-if="pageType==1 && floorList&&floorList.length>1" :style="{'top':'calc( -' + floorList.length*60 + 'rem - 30rem)'}">
+		<div class="floor-item rows justify-center" :class="floorId==floor.id?'active':''" 
+			v-for="(floor,index) in floorList" :key="index" @click="floorChange(floor)">
+			{{floor.houseFloor?floor.houseFloor+'F':''}}
+		</div>
+	</div>
+	<!-- 提示 -->
+	<div class="tips-view">
+		{{pageType==1?'点击进入空间':'单击圆点切换视角'}}
+	</div>
+	<!-- 放大缩小操作区域 -->
+	<div class="zoom-view" @click.stop="zoomInOut" v-if="pageType==1 && (styleType==2 || styleType==3)">
+		<img class="icon":src="styleType==2?'https://dm.static.elab-plus.com/miniProgram/iconfont/zoomin.png':'https://dm.static.elab-plus.com/miniProgram/iconfont/zoomout.png'" mode="widthFix"/>
+	</div>
+	<!-- 微信客服 -->
+	<div class="connect-view columns" v-if="pageType==1 && styleType==1"
+	@click="mynavigateFuc" data-jumplink="客服链接" data-jumptype="50" data-jumpvalue="企业id">
+		<img class="defaultHead" src="https://dm.static.elab-plus.com/miniProgram/iconfont/defaultHead.png" mode="widthFix"/>
+		联系定制
+	</div>
+	<!-- 手势操作区域 -->
+	<div v-if="showSignscoll" class="shell-signscoll rows justify-center" @click="upScrollOrDown" @touchstart="mytouchstart" @touchmove="mytouchmove" @touchend="mytouchend">
+		<div class="signscoll-block"></div>
+	</div>
+	<!-- 精细化视图 -->
+	<viewCareful ref="viewCareful" v-show="styleType==2" @curSpaceChange="curSpaceChange" :overChange="overChange" :curHouseObj="houseObj"></viewCareful>
+	<!-- 种子户型视图 -->
+	<viewlayout ref="viewlayout" @curSpaceChange="curSpaceChange" :styleType="styleType" :overChange="overChange" :curHouseObj="houseObj" :houseList="houseList" @upCom="upCom" @streamRecord="streamRecord" @streamRecordEnd="streamRecordEnd" @seedChange="seedChange"></viewlayout>
+	<!-- nav视图 -->
+	<!-- <viewToolNav v-show="pageType==1 && (styleType==2 || styleType==3)" :seedItem="seedItem" @downCom="downScroll"></viewToolNav> -->
+	<!-- 风格选择视图 -->
+	<!-- <viewStyle v-if="pageType==2" :spaceObj="spaceObj" @hideOrShowActor="hideOrShowActor"></viewStyle> -->
+</div>

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

@@ -0,0 +1,272 @@
+<template src="./viewShell.html">
+
+</template>
+<script>
+	// const util = require('@/static/utils/util.js');
+	const config = require('@/services/urlConfig.js');
+	// import commonMethod from '@/common/commonMethod.js';
+	import touchHandle from '@/mixins/touchHandle.js';
+	// import requestConfig from '@/static/lib/requestConfig';
+	import viewlayout from'@/components/newBottomCom/viewlayout/viewlayout.vue';
+	import viewCareful from'@/components/newBottomCom/viewCareful/viewCareful.vue';
+	// import viewToolNav from'@/components/newBottomCom/viewToolNav/viewToolNav.vue';
+	// import viewStyle from'@/webgl/components/newBottomCom/viewStyle/viewStyle.vue';
+
+	// const app = getApp(); //获取应用实例
+	// let positions = new Set();
+	export default {
+		data: function() {
+			return {
+				floorList:[
+					{
+						text:'1F',
+					},
+					{
+						text:'2F',
+					}
+				],
+				floorId:0,//楼层选中的id
+				shellHeight:'200rem',
+				isShare: false,
+				shareVideoItem:null,
+				actPageId: config.actPageId,
+				styleType:1,	//当前底部组件的状态
+				seedItem:null,	//当前选中的种子户型
+				showSignscoll:true,	//是否显示手势操作区域
+			}
+		},
+		props:{
+			overChange: {//当前选中的户型类型
+				type: Boolean,
+				default: false,
+			},
+			pageType: {//当前组件所在的页面类型-决定了使用哪些子组件和样式
+				type: [String, Number],
+				default: 1,
+			},
+			curHouseType: {//当前选中的户型类型
+				type: [String, Number],
+				default: '',
+			},
+			houseList: {//当前户型所有的户型详情,可以切换
+				type: Array,
+				default: () => {
+					return []
+				}
+			},
+			houseObj: {//当前户型的具体详情
+				type: Object,
+				default: () => {
+					return null
+				}
+			},
+			spaceObj: {//当前户型的空间详情
+				type: Object,
+				default: () => {
+					return null
+				}
+			},
+		},
+		watch: {
+			curHouseType: {
+				handler(newVal) {
+					if (newVal) {
+						//户型大类发生了变更,此时需要更新楼层信息,并且重新选择具体的户型
+						console.warn("***curHouseType-change***",newVal)
+						this.initData()
+					}
+				},
+			},
+			styleType: {//组件展开状态切换
+				handler(newVal,oldVal) {
+					if (newVal) {
+						console.warn("***styleType***",newVal,oldVal)
+						let _starHeight = parseInt(this.shellHeight);
+						let _endHeight = 380;
+						if(this.inter){//存在,说明当前还在弹窗过程中
+							return false;
+						}
+						if(newVal==1){//变更为初始状态
+							this.shellHeight = '200rem';
+							_endHeight = 200;
+						}else if(newVal==2){//变更为展开状态
+							this.shellHeight = '800rem';
+							_endHeight = 800;
+						}else if(newVal==3){//变更为最小状态
+							this.shellHeight = '200rem';
+							_endHeight = 200;
+						}
+						// let currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
+						// if(currPage && currPage.hasOwnProperty('canvasHeight')){
+						// 	currPage.gradientResize(1,_starHeight,_endHeight)
+						// }
+						// currPage.styleType = newVal;//变更为展开状态
+					}
+				},
+			},
+			// houseObj: {
+			// 	handler(newVal) {
+			// 		if (newVal) {
+			// 			//户型大类发生了变更,此时需要更新楼层信息,并且重新选择具体的户型
+			// 			console.warn("***curHouseType-change***",newVal)
+			// 		}
+			// 	},
+			// },
+		},
+		components:{
+			viewlayout,
+			viewCareful,
+			// viewStyle,
+		},
+		mixins: [touchHandle],
+		async mounted() {
+			// await this.getCityHouseList();
+			if(this.pageType==2){
+				this.shellHeight = '448rem';
+			}			
+			console.warn("***viewShell***",this.houseList)
+		},
+		// 页面被展示时执行
+		onPageShow: function() {  
+			
+		},
+		//页面被隐藏时执行
+        onPageHide: function() {
+        	// console.warn("***detached-hide***")
+        },
+		methods:{
+			initData(){
+				let houseList = this.houseList;
+				// let currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
+				// let curHouseType = currPage.curHouseType?currPage.curHouseType:houseList[0].spaceStructure;//获取当前页面选中的户型类型
+				let curHouseType = houseList[0].spaceStructure;//获取当前页面选中的户型类型
+				//获取当前选中的户型大类,从中提取楼层信息
+				let curData = houseList.find(item=>{
+					return item.spaceStructure == curHouseType;
+				})
+				this.floorList = [];
+				curData.layoutStruct && curData.layoutStruct.forEach(item=>{
+					this.floorList.push(item);
+				})
+				console.warn("***floorList-init***",this.floorList)
+				if(this.floorList && this.floorList[0]){
+					this.floorId = this.floorList[0].id;//默认选中第一个
+					this.$emit("curHouseFloorChange", this.floorList[0]);//通知页面,户型楼层发生了变更
+				}
+			},
+			catchTouchMove: function() {
+				return false;
+			},
+			// hideOrShowActor(type){
+			// 	this.$emit('hideOrShowActor',type);//隐藏所有视角
+			// },
+			//子组件开始录音
+			streamRecord(){
+				this.showSignscoll = false;
+			},
+			//子组件录音结束
+			streamRecordEnd(){
+				this.showSignscoll = true;
+			},
+			//楼层切换
+			floorChange(item){
+				if(this.floorId==item.id){
+					return false;
+				}
+				this.floorId = item.id;
+				let param = {
+					type: 'CLK', //埋点类型
+					clkId: 'clk_2cmina_23080410', //点击ID
+					clkName: 'floorswitching_clk', //点击前往的页面名称
+					clkParams: {
+						locusName: "楼层切换",
+					}
+				};
+				// util.trackRequest(param);
+				this.$emit("curHouseFloorChange", item);//通知页面,户型楼层发生了变更
+			},
+			//种子户型变更-户型大类变更
+			seedChange(item){
+				console.warn("***seedChange***",item)
+				this.seedItem = item;
+				this.$emit("curHouseTypeChange", item);//通知页面,户型大类发生了变更
+			},
+			//放大缩小
+			zoomInOut(){
+				if(this.styleType == 2){
+					this.styleType = 3;//变更为最小状态
+				}else if(this.styleType == 3){
+					this.styleType = 2;//变更为最大状态
+				}
+			},
+			//子组件通知上划到状态2
+			upCom(){
+				if(this.styleType==1 || this.styleType==3){//初始状态 或者 收缩状态
+					this.styleType = 2;//变更为展开状态
+				}
+			},
+			curSpaceChange(data){
+				this.$emit("curSpaceChange", data);
+			},
+			//点击-不是手势动作
+			upScrollOrDown(){
+				if(this.pageType!=1){//只有1才起作用
+					return false
+				}
+				if(this.styleType==1 || this.styleType==3){//初始状态 或者 收缩状态
+					this.styleType = 2;//变更为展开状态
+				}
+				else if(this.styleType==2){//当前是展开状态,可以下滑
+					this.styleType = 1;//下滑到初始收缩状态
+				}
+			},
+			//上划-手势动作
+			upScroll(){
+				if(this.pageType!=1){//只有1才起作用
+					return false
+				}
+				if(this.styleType==1 || this.styleType==3){//初始状态 或者 收缩状态
+					this.styleType = 2;//变更为展开状态
+				}
+			},
+			//下划-手势动作
+			downScroll(){
+				if(this.pageType!=1){//只有1才起作用
+					return false
+				}
+				let carefulList = this.$refs.viewCareful && this.$refs.viewCareful.carefulList ? JSON.parse(JSON.stringify(this.$refs.viewCareful.carefulList)) : {}; 
+				if(this.styleType==2 || this.styleType==3){//当前是展开状态,可以下滑
+					this.styleType = 1;//下滑到初始收缩状态
+					let trackparam = {
+						type: 'CLK', //埋点类型
+						clkId: 'clk_2cmina_23080404', //点击ID
+						clkName: 'adjust_back_clk', //点击前往的页面名称
+						clkParams: {
+							locusName: "精细调整返回 /下划线",
+							userparamter:carefulList,
+						}
+					};
+					// util.trackRequest(trackparam);
+				}
+			},
+			mynavigateFuc(e) {
+				if (e) {
+					let param = {
+						type: 'CLK', //埋点类型
+						clkId: 'clk_2cmina_23080408', //点击ID
+						clkName: 'WeCom_clk', //点击前往的页面名称
+						clkParams: {
+							locusName: "联系定制",
+						}
+					};
+					// util.trackRequest(param);
+					this.navigateFuc(e);
+				}
+			},
+		}
+	}
+</script>
+<style lang="css" scoped>
+    @import "./viewShell.css";
+	/* @import "@/common/css/common.css"; */
+</style>

+ 30 - 0
src/components/newBottomCom/viewStyle/viewStyle.html

@@ -0,0 +1,30 @@
+<!-- 风格层主操作视图 -->
+<div class="layout-view">
+	<!-- 精装修 -->
+	<div class="aiEdit">
+		<scroll-view scroll-x="true" class="aiStyleList" :scroll-into-view="seqToStyleView">
+			<div class="scrollViewItem" v-for="(item, idx) in styleList" :key="idx" :id="'styleItem'+idx"
+				@click="curStyleIndex=idx">
+				<div class="styleItem" :class="{'styleItemSelected':curStyleIndex==idx}">
+					<img class="styleIcon" :src="item.imgList[0]" mode="aspectFill"></image>
+					<text class="styleTitle">{{item.item}}</text>
+				</div>
+			</div>
+		</scroll-view>
+		<div class="aiTool">
+			<div class="changeBtn" v-if="showAIFlag" @click="changeAIImg">
+				<span v-if="checked==false" class="iconfont icon-xingzhuang-tuoyuanxing" style="margin-right:10rpx;font-size:36rpx;"></span>
+				<span v-else class="iconfont icon-ziyuan" style="margin-right:10rpx;font-size:36rpx;color:#FAB060"></span>
+				<!-- <img class="right-icon" src="https://dm.static.elab-plus.com/miniProgram/iconfont/right-icon.png" mode="widthFix"/> -->
+				{{checked?'已选定图片':'选定图片'}}
+			</div>
+			<div v-if="showAIFlag" class="submitBtn continue rows justify-center" @click="aiSubmit">
+				继续生成
+			</div>
+			<div v-else class="submitBtn rows justify-center" @click="aiSubmit">
+				<img class="magic-icon" src="https://dm.static.elab-plus.com/miniProgram/iconfont/magic.png" mode="widthFix"/>
+				AI生成精软装风格
+			</div>
+		</div>
+	</div>
+</div>

+ 138 - 0
src/components/newBottomCom/viewStyle/viewStyle.scss

@@ -0,0 +1,138 @@
+.layout-view{
+	margin-top:30rem;
+}
+
+.aiEdit {
+	position: relative;
+	width: 100%;
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+
+	.aiStyleList {
+		width: 100%;
+		height: 240rem;
+		/* background: #333; */
+		flex-shrink: 0;
+		white-space: nowrap;
+
+		.scrollViewItem {
+			width: 152rem;
+			height: 100%;
+			display: inline-block;
+			margin: 0rem 10rem;
+		}
+
+		.scrollViewItem:first-child {
+			margin-left: 30rem;
+		}
+
+		.scrollViewItem:last-child {
+			margin-right: 30rem;
+		}
+
+		.styleItem {
+			position: absolute;
+			width: 144rem;
+			height: 100%;
+			display: flex;
+			flex-direction: column;
+			justify-content: center;
+			align-items: center;
+
+			/* background: red; */
+			.styleIcon {
+				width: 144rem;
+				height: 144rem;
+				background: #5c5c5c;
+				border-radius: 12rem;
+				border: 2rem solid #fff;
+			}
+
+			.styleTitle {
+				margin-top: 20rem;
+				font-family: "Verdana";
+				font-weight: 400;
+				font-size: 28rem;
+				text-align: center;
+				color: #4e4e4e;
+			}
+		}
+
+		.styleItemSelected {
+			.styleIcon {
+				border: 2rem solid #ff9c38;
+			}
+
+			.styleTitle {
+				font-family: "Verdana Bold";
+				font-weight: 700;
+				color: #ff9f40;
+			}
+		}
+	}
+
+	.aiStyleList ::-webkit-scrollbar {
+		width: 0;
+		height: 0;
+		background-color: transparent;
+	}
+
+	.aiTool {
+		width: 100%;
+		height: 100rem;
+		display: flex;
+		flex-direction: row;
+		align-items: center;
+		justify-content: center;
+		/* background: red; */
+		// margin: 0rem 30rem;
+		margin-top: 10rem;
+		padding: 0rem 30rem;
+		box-sizing: border-box;
+		.changeBtn {
+			width: 320rem;
+			height: 100rem;
+			border-radius: 50rem;
+			background: rgba(255, 156, 56, 0.15);
+			margin-right: 30rem;
+			line-height: 100rem;
+			text-align: center;
+			font-family: "DIN Alternate Bold";
+			font-weight: 700;
+			font-size: 32rem;
+			color: #ff9f36;
+		}
+
+		.submitBtn {
+			width: 460rem;
+			border-radius: 50rem;
+			background: rgba(255, 156, 56, 0.15);
+			text-align: center;
+			height: 100%;
+			line-height: 100rem;
+			font-family: "DIN Alternate Bold";
+			font-weight: 700;
+			font-size: 28rem;
+			color: #fff;
+			box-shadow: 0 6rem 20rem rgba(242, 152, 2, 0.2);
+			backdrop-filter: blur(40rem);
+			background-color: rgba(255, 255, 255, 0.15);
+			background-image:linear-gradient(124deg, rgba(245, 201, 82, 1) 0%, rgba(239, 149, 57, 1) 100%);
+		}
+		.continue{
+			width: 330rem;
+			background: #fab060;
+		}
+		.right-icon{
+			width: 34rem;
+			height: 34rem;
+			margin-right:10rem;
+		}
+		.magic-icon{
+			width: 40.6rem;
+			height: 40.56rem;
+			margin-right:10rem;
+		}
+	}
+}

Різницю між файлами не показано, бо вона завелика
+ 428 - 0
src/components/newBottomCom/viewStyle/viewStyle.vue


+ 18 - 0
src/components/newBottomCom/viewToolNav/viewToolNav.css

@@ -0,0 +1,18 @@
+.nav-view{
+	position: absolute;
+	bottom:60rpx;
+	width: 630rpx;
+	box-sizing: border-box;
+	z-index: 12;
+	font-family: "Verdana Bold";
+	font-size: 34rpx;
+	background: #fff;
+}
+.back-view{
+	font-weight: 700;
+	color: #faad5c;
+}
+.nav-title{
+	font-weight: 700;
+	color: #4d4d4d;
+}

+ 10 - 0
src/components/newBottomCom/viewToolNav/viewToolNav.html

@@ -0,0 +1,10 @@
+<!-- nav操作视图 -->
+<view class="nav-view rows rows-between">
+	<view class="back-view" @click="navBack">
+		<span class="iconfont icon-fanhui" style="margin-right:20rpx;font-size:34rpx;"></span>返回
+	</view>
+	<!-- 当前标题 -->
+	<view class="nav-title">
+		{{title || ''}}
+	</view>
+</view>

+ 59 - 0
src/components/newBottomCom/viewToolNav/viewToolNav.vue

@@ -0,0 +1,59 @@
+<template src="./viewToolNav.html">
+
+</template>
+<script>
+	const util = require('@/static/utils/util.js');
+	const config = require('@/static/config.js');
+	import Bus from '@/common/bus';
+	import commonMethod from '@/common/commonMethod.js';
+	import requestConfig from '@/static/lib/requestConfig';
+	// import bgLoading from "@/components/bgLoading/bgLoading.vue"
+	// import { nextTick } from "vue";
+	const app = getApp(); //获取应用实例
+	export default {
+		data: function() {
+			return {
+				title:"",
+			}
+		},
+		props:{
+			seedItem: {
+				type: Object,
+				default: {},
+			},
+		},
+		watch: {
+			seedItem: {
+				handler(newVal) {
+					if (newVal) {
+						this.title = newVal.spaceName
+						console.warn("***seedItem-change***",newVal)
+					}
+				},
+			},
+		},
+		mounted() {//组件挂载时事件
+			console.warn("***mounted-nav***",this.seedItem)
+			if(this.seedItem){
+				this.title = this.seedItem.spaceName;
+			}
+		},
+		// 页面被展示时执行
+		onPageShow: function() {  
+			
+		},
+		//页面被隐藏时执行
+        onPageHide: function() {
+
+        },
+		methods:{
+			navBack(){
+				this.$emit("downCom");
+			},
+		}
+	}
+</script>
+<style lang="css" scoped>
+    @import "./viewToolNav.css";
+	@import "@/common/css/common.css";
+</style>

+ 112 - 0
src/components/newBottomCom/viewlayout/viewlayout.css

@@ -0,0 +1,112 @@
+.layout-view{
+	position: fixed;
+	left: 30rem;
+	bottom: 0rem;
+	padding-bottom: 60rem;
+	width: 690rem;
+	z-index: 15;
+	background-color: rgba(255, 255, 255, 1);
+}
+.layout-list{
+	position: relative;
+	width: auto;
+	box-sizing: border-box;
+	z-index: 12;
+}
+.seed-item{
+	margin-right:90rem;
+}
+.seed-item:last-child{
+	margin-right:0rem;
+}
+.item-text{
+	font-family: "Verdana Bold";
+	font-weight: 700;
+	font-size: 34rem;
+	text-align: center;
+	color: #1c1c1c;
+	width: 95rem;
+	/* height: 80rem; */
+	margin-bottom:10rem;
+}
+.item-select{
+	width: 50rem;
+	height: 12rem;
+	border-radius: 6rem;
+	background: #ffa040;
+}
+.item-set{
+	font-family: "Verdana";
+	font-weight: 400;
+	font-size: 24rem;
+	text-align: left;
+	color: #faa040;
+}
+.btn-list{
+	position: relative;
+	width: 100%;
+	box-sizing: border-box;
+	margin-top:26rem;
+}
+.btn{
+	height: 100rem;
+	border-radius: 50rem;
+	backdrop-filter:blur(40px);
+	--webkit-backdrop-filter: blur(40px);
+	font-family: "Verdana Bold";
+	font-weight: 700;
+	font-size: 32rem;
+	color: #272727;
+	box-sizing: border-box;
+}
+.up{
+	width: 546rem;
+	box-shadow: 0 6rem 20rem #f2980233;
+}
+.up1{
+	color: rgba(245, 145, 39, 1);
+	background-image:linear-gradient(124deg, rgba(245, 201, 82, 0.4) 0%, rgba(239, 149, 57, 0.4) 100%);
+}
+.up2{
+	color: rgba(255, 255, 255, 1);
+	background-image:linear-gradient(124deg, rgba(245, 201, 82, 1) 0%, rgba(239, 149, 57, 1) 100%);
+}
+.voice2{
+	background-image:linear-gradient(124deg, rgba(245, 201, 82, 1) 0%, rgba(239, 149, 57, 1) 100%);
+}
+.voice3{
+	background-color: rgba(23, 23, 23, 0.04);
+	background-image:unset;
+}
+.voice{
+	width: 100rem;
+	background-color: rgba(23, 23, 23, 0.04);
+}
+.voice .icon{
+	width: 31.5rem;
+	height: 44rem;
+}
+.voice-view{
+	position: absolute;
+	left:0rem;
+	/* top:0rem; */
+	width: 100%;
+	font-family: "Verdana";
+	font-weight: 400;
+	z-index: 15;
+	pointer-events: none;
+}
+.voice-title{
+	font-size: 36rem;
+	color: #242424;
+}
+.voice-tips{
+	font-size: 28rem;
+	color: rgba(36, 36, 36, 0.51);
+	margin-top:10rem;
+	margin-bottom:28rem;
+}
+.voice-gif{
+	width: 100%;
+	margin-top:-20rem;
+}

+ 12 - 0
src/components/newBottomCom/viewlayout/viewlayout.html

@@ -0,0 +1,12 @@
+<!-- 户型弹出层主操作视图 -->
+<div class="layout-view" @touchend="streamRecordEnd">
+	<!-- 种子区域 -->
+	<div>
+		<div class="btn-list rows rows-between">
+			<div class="btn voice rows justify-center" :class="recording?'voice2':'voice3'" @touchstart="streamRecord" @touchmove="mytouchmove">
+				<img class="icon" :src="recording?'https://dm.static.elab-plus.com/miniProgram/iconfont/source.png':'https://dm.static.elab-plus.com/miniProgram/iconfont/source1.png'" mode="widthFix"/>
+			</div>
+			<div class="btn rows up justify-center" @click="upCom" :class="styleType==1?'up1':'up2'">精细调整 · 空间大小随心布局</div>
+		</div>
+	</div>
+</div>

+ 520 - 0
src/components/newBottomCom/viewlayout/viewlayout.vue

@@ -0,0 +1,520 @@
+<template src="./viewlayout.html">
+
+</template>
+<script>
+	// const util = require('@/static/utils/util.js');
+	const config = require('@/services/urlConfig.js');
+	// import Bus from '@/common/bus';
+	// import commonMethod from '@/common/commonMethod.js';
+	// import requestConfig from '@/static/lib/requestConfig';
+	// import { language } from '@/static/utils/conf.js'
+	// const plugin = requirePlugin("WechatSI");
+	// 获取**全局唯一**的语音识别管理器**recordRecoManager**
+	// const manager = plugin.getRecordRecognitionManager()
+	// import bgLoading from "@/components/bgLoading/bgLoading.vue"
+	// import { nextTick } from "vue";
+	// const app = getApp(); //获取应用实例
+	// let positions = new Set();
+	export default {
+		data: function() {
+			return {
+				seedLayoutList: [],
+				selectSeedId: null, //当前选中的种子户型id
+				currentTranslate: {
+					// 当前语音输入内容
+					create: '04/27 15:37',
+					text: '等待说话',
+				},
+				recording: false, // 正在录音
+				startX:0,
+				startY:0,
+				clientX:0,
+				clientY:0,
+				defaultIndex:0,//默认选中的户型大类
+				carefulList:[],
+				lastSpace:null,	//上一个语音操作的空间对象
+				bigWord:"变大,放大,大一点,变宽",
+				bigWordPY:"bianda,fangda,dayidian,biankuan",
+				smaillWord:"变小,缩放,小一点,变窄",
+				smaillWordPY:"bianxiao,suofang,xiaoyidian,bianzhai",
+				changeRate:0.05,	//每次变化的比例
+			}
+		},
+		props: {
+			houseList: {//当前户型所有的户型详情,可以切换
+				type: Array,
+				default: () => {
+					return []
+				}
+			},
+			curHouseObj: {//当前展示的户型
+				type: Object,
+				default: () => {
+					return null
+				}
+			},
+			overChange: {//当前选中的户型类型
+				type: Boolean,
+				default: false,
+			},
+			styleType:{
+				type: [String, Number],
+				default: '',
+			}
+		},
+		watch: {
+			houseList: {
+				handler(newVal) {
+					if (newVal) {
+						console.warn("***houseList-change***", newVal)
+						this.initData(newVal);
+					}
+				},
+			},
+			curHouseObj: {
+				handler(newVal,oldVal) {
+					if (newVal) {
+						console.warn("***curHouseObj-CHANGE-layout***", newVal)
+						if((oldVal && oldVal.id != newVal.id) || !oldVal){
+							this.initSpanceData();
+						}
+					}
+				},
+			},
+		},
+		async mounted() {
+			// this.getRecordAuth();//获取录音权限
+			// this.initRecord();
+			// var currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
+			// currPage.updateSpanceData = this.initSpanceData;//页面注册变更方法
+		},
+		// 页面被展示时执行
+		onPageShow: function() {
+			
+		},
+		//页面被隐藏时执行
+		onPageHide: function() {
+			console.warn("***detached-hide***")
+		},
+		methods: {
+			initSpanceData(){
+				this.carefulList = [];
+				// var currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
+				const spaceDetail = this.curHouseObj;
+				const spaceList = JSON.parse(spaceDetail.houseJson);
+				spaceList && spaceList.forEach(async (item,index)=>{
+					let curSpaceArea = parseFloat(
+						(item.spaceWidth * item.spaceHeight) / 10000
+					).toFixed(1);
+					let minArea = 0;
+					let maxArea = 100;
+					if(item.hasOwnProperty('spaceWidthMin') && item.hasOwnProperty('spaceHeightMin')){
+						minArea = parseFloat((item.spaceWidthMin * item.spaceHeightMin) / 10000).toFixed(1);
+					}
+					if(item.hasOwnProperty('spaceWidthMax') && item.hasOwnProperty('spaceHeightMax')){
+						maxArea = parseFloat((item.spaceWidthMax * item.spaceHeightMax) / 10000).toFixed(1);
+					}
+					let text = item.spaceName;
+					if(text && !item.isSizeLock){
+						let res = await requestConfig("chineseToPinyin", {chinese:text},true);
+						let pinyin = res.single;
+						let data = {
+							spaceId:item.spaceId,
+							index:this.carefulList.length,
+							name:text,
+							namePY:pinyin,
+							area:curSpaceArea,
+							percent:null,
+							minArea:minArea,	//最小面积
+							maxArea:maxArea,	//最大面积
+						}
+						this.carefulList.push(data)
+					}
+				})
+				console.warn("***viewlayout-init***", this.carefulList)
+			},
+			initData(houseList){
+				this.seedLayoutList = [];
+				houseList && houseList.forEach(item=>{
+					let data = {
+						spaceStructure: item.spaceStructure,
+						spaceName: item.spaceName,
+						set: false, //是否已经设置过
+					};
+					this.seedLayoutList.push(data);
+				})
+				// var currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
+				// if(currPage.curHouseType){//获取当前页面选中的户型类型
+				// 	this.selectSeedId = currPage.curHouseType
+				// } else if(this.seedLayoutList && this.seedLayoutList[this.defaultIndex]){//默认选中第一个
+				// 	this.selectSeedId = this.seedLayoutList[this.defaultIndex].spaceStructure;
+				// }
+				this.selectSeedId = this.seedLayoutList[this.defaultIndex].spaceStructure;
+				if(this.selectSeedId){
+					let item = this.seedLayoutList.find(it=>{
+						return it.spaceStructure == this.selectSeedId
+					})
+					this.$emit("seedChange", item);//通知父组件-当前已经选中了户型大类
+					let param = {
+						type: 'CLK', //埋点类型
+						clkId: 'clk_2cmina_23080402', //点击ID
+						clkName: 'seedroom_clk', //点击前往的页面名称
+						clkParams: {
+							type: item.spaceName,
+							locusValue: item.spaceStructure,
+							locusName: "切换种子户型",
+						}
+					};
+					// util.trackRequest(param);
+				}
+				console.warn("***curHouseType-init***",this.seedLayoutList)
+			},
+			// seedItemCheck(item) {
+			// 	if (!item || !item.spaceStructure) {
+			// 		return false;
+			// 	}
+			// 	if (item.spaceStructure == this.selectSeedId) {
+			// 		return false;
+			// 	}
+			// 	this.selectSeedId = item.spaceStructure;
+			// 	this.$emit("seedChange", item);
+			// 	let param = {
+			// 		type: 'CLK', //埋点类型
+			// 		clkId: 'clk_2cmina_23080402', //点击ID
+			// 		clkName: 'seedroom_clk', //点击前往的页面名称
+			// 		clkParams: {
+			// 			type: item.spaceName,
+			// 			locusValue: item.spaceStructure,
+			// 			locusName: "切换种子户型",
+			// 		}
+			// 	};
+			// 	// util.trackRequest(param);
+			// },
+			//上划触发
+			upCom() {
+				console.warn("***upCom***")
+				this.$emit("upCom");
+				let param = {
+					type: 'CLK', //埋点类型
+					clkId: 'clk_2cmina_23080403', //点击ID
+					clkName: 'adjust_clk', //点击前往的页面名称
+					clkParams: {
+						locusName: "精细调整",
+					}
+				};
+				// util.trackRequest(param);
+			},
+			//获取录音权限
+			getRecordAuth: function() {
+				uni.getSetting({
+					success(res) {
+						console.log("succ")
+						console.log(res)
+						if (!res.authSetting['scope.record']) {
+							uni.authorize({
+								scope: 'scope.record',
+								success() {
+									// 用户已经同意小程序使用录音功能,后续调用 wx.startRecord 接口不会弹窗询问
+									console.log("succ auth")
+								},
+								fail() {
+									console.log("fail auth")
+								}
+							})
+						} else {
+							console.log("record has been authed")
+						}
+					},
+					fail(res) {
+						console.log("fail")
+						console.log(res)
+					}
+				})
+			},
+			//求最长公共子集
+			findSubStr(str1, str2){
+			    if (str1.length > str2.length) {
+			      var temp = str1;
+			      str1 = str2;
+			      str2 = temp;
+			    }
+			    let len1 = str1.length;
+			    let len2 = str2.length;
+			    for (var j = len1; j > 0; j--) {
+			      for (var i = 0; i < len1 - j; i++) {
+			        var current = str1.substr(i, j);
+			        if (str2.indexOf(current) >= 0) {
+			          return current;
+			        }
+			      }
+			    }
+			    return "";
+			},
+			//声音变化
+			async textChange(text) {
+				if(this.overChange){
+					uni.showToast({
+						title: '请慢一点',
+						icon: 'none',
+						duration: 2000
+					})
+					return false;
+				}
+				let res = await requestConfig("chineseToPinyin", {chinese:text});
+				let pinyin = res.single;
+				console.warn("****pinyin***",pinyin)
+				text = pinyin;
+				//全匹配轮一遍
+				let curSpace = this.carefulList.find(space=>{
+					return text.includes(space.namePY)
+				})
+				if(!curSpace){
+					let list = this.carefulList.map((space,index)=>{
+						let comStr = this.findSubStr(text, space.namePY + ' ');
+						return {
+							spaceId:space.spaceId,
+							namePY:space.namePY,
+							name:space.name,
+							comStr,
+							index,
+						}
+					})
+					//寻找5个字符串以上的
+					let tmpList = list.filter(it=>{
+						return it.comStr.length > 5;
+					})
+					if(tmpList && tmpList.length>0){
+						tmpList.sort((a, b) => a.comStr.length - b.comStr.length);
+						let index = tmpList[tmpList.length-1].index;//最大值在carefulList的序号
+						curSpace = this.carefulList[index];//
+					}else{
+						curSpace = this.lastSpace;
+					}
+				}
+				
+				//没有找到语音操作对象
+				if(!curSpace){
+					uni.showToast({
+						title: '请再说一次',
+						icon: 'none',
+						duration: 2000
+					})
+					return false;
+				}
+				this.lastSpace = curSpace;
+				
+				console.log("textChange:", curSpace,this.carefulList,text,this.bigWordPY,this.smaillWordPY);
+				
+				let biglist = this.bigWordPY.split(',').map(word=>{
+					return text.lastIndexOf(word)
+				})
+				let smalllist = this.smaillWordPY.split(',').map(word=>{
+					return text.lastIndexOf(word)
+				})
+				let a = Math.max(...biglist);
+				let b = Math.max(...smalllist);
+				let big = false;
+				if(a==-1 && b==-1){//都没命中
+					uni.showToast({
+						title: '请再说一次',
+						icon: 'none',
+						duration: 2000
+					})
+					return false;
+				}else if(a>-1 && b>-1){//两个都命中了
+					if(a > b){//放大靠后-命中靠后
+						big = true;
+					}else{
+						big = false;
+					}
+				}else if(a>-1){
+					big = true;
+				}
+				let _area = parseFloat(curSpace.area) * this.changeRate;
+				let data = {
+					spaceId:curSpace.spaceId,
+					area:_area,
+					isZoomIn:big,//true 放大 false 缩放
+				}
+				console.log("viewlayout-发送消息-空间变化: ",data,curSpace.area,big);
+				uni.showToast({
+					title: '正在变化,请稍后',
+					icon: 'none',
+					duration: 2000
+				})
+				// this.sendMessageAction(JSON.stringify(parmas));
+				this.$emit("curSpaceChange",data);//通知父组件-当前已经选中了户型大类
+			},
+			/**
+			 * 初始化语音识别回调
+			 * 绑定语音播放开始事件
+			 */
+			initRecord: function() {
+				// var currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
+				//有新的识别内容返回,则会调用此事件
+				manager.onRecognize = (res) => {
+					let currentData = Object.assign({}, this.currentTranslate, {
+						text: res.result,
+					})
+					this.currentTranslate = currentData;
+					console.warn("***manager-正在录音***",this.currentTranslate)
+				}
+				// 识别结束事件
+				manager.onStop = (res) => {
+					console.warn("***manager-识别结束0***",this.recording,res)
+					// this.textChange("客厅大一点");
+					if(this.recording==false){//已经强制结束识别了
+						return false;//不识别
+					}
+					let text = res.result
+					if (text == '') {//识别内容为空时的反馈
+						this.showRecordEmptyTip()
+						return
+					}
+					console.warn("***manager-识别结束***",text);
+					let param = {
+						type: 'CLK', //埋点类型
+						clkId: 'clk_2cmina_23080407', //点击ID
+						clkName: 'voice_clk', //点击前往的页面名称
+						clkParams: {
+							locusName: "语音调整",
+							text:text
+						}
+					};
+					// util.trackRequest(param);
+					text = text.replaceAll(/,|。/ig, "");
+					this.textChange(text);
+					this.stopRecordHandle();
+					//翻译
+					// this.translateText(currentData, this.dialogList.length)
+				}
+
+				// 识别错误事件
+				manager.onError = (res) => {
+					console.warn("***manager-识别错误***",this.recording,res)
+					if(this.recording == false){
+						return false;
+					}
+					this.stopRecordHandle();
+					uni.showToast({
+						title: '请再说一次',
+						icon: 'none',
+						duration: 2000
+					})
+				}
+				// 语音播放开始事件
+				uni.onBackgroundAudioPlay(res => {
+					const backgroundAudioManager = uni.getBackgroundAudioManager()
+					let src = backgroundAudioManager.src
+					
+					this.currentTranslateVoice = src;
+				})
+			},
+			//执行停止录音的方法
+			stopRecordHandle(){
+				// var currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
+				this.recording = false;
+				this.$emit("streamRecordEnd");//通知父组件
+				// currPage.voiceMaskChange(false);//关闭蒙层
+			},
+			//用户语音为空
+			showRecordEmptyTip(){
+				this.stopRecordHandle();
+				uni.showToast({
+					title: '告诉我您的想法',
+					icon: 'none',
+					duration: 2000
+				})
+			},
+			catchTapEvent:function(){
+				return false;
+			},
+			/**
+			 * 按住按钮开始语音识别
+			 */
+			streamRecord: function(e) {
+				// this.getRecordAuth();//获取录音权限
+				console.warn("streamrecord", e)
+				let currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
+				// let buttonItem = detail.buttonItem || {}
+				manager.start({
+					lang: language[0].lang_content,
+				})
+				// this.recordStatus = 0;
+				this.clientX = 0;
+				this.clientY = 0;
+				this.startX = e.changedTouches[0].clientX;
+				this.startY = e.changedTouches[0].clientY;
+				this.recording = true;//录音中
+				currPage.voiceMaskChange(true);//显示蒙层
+				this.$emit("streamRecord");
+			},
+			mytouchmove(e) {
+				let startX = this.startX // 开始x坐标 
+				let startY = this.startY //开始y坐标
+				let touchMoveX = e.changedTouches[0].clientx //滑动变化坐标 
+				let touchMoveY = e.changedTouches[0].clientY //滑动变化坐标 
+				this.clientX = touchMoveX - startX;
+				this.clientY = touchMoveY - startY;
+			},
+			angle(start,end){
+				let _X = end.X - start.X;
+				let _Y = end.Y - start.Y;
+				if(_X == 0) return 90;
+				return 360 * Math.atan((_Y / _X) / (2*Math.PI))
+			},
+			/**
+			 * 松开按钮结束语音识别
+			 */
+			streamRecordEnd: function(e) {
+				console.warn("streamRecordEnd" ,this.recording,e)
+				// let detail = e.detail || {} // 自定义组件触发事件时提供的detail对象
+				// let buttonItem = detail.buttonItem || {}
+
+				// 防止重复触发stop函数
+				if (this.recording==false) {
+					console.warn("has finished!")
+					return
+				}
+				let startX = this.startX; // 开始x坐标
+				let startY = this.startY; //开始y坐标
+				let touchMoveX = e.changedTouches[0].clientX; //滑动变化坐标 
+				let touchMoveY = e.changedTouches[0].clientY; //滑动变化坐标 
+				let angle = this.angle(
+				{
+					X: startX,
+					Y: startY
+				}, {
+					X: touchMoveX,
+					Y: touchMoveY
+				})
+				//滑动角度超过45retrun
+				// console.log(Math.abs(angle), "Math.abs(angle)")
+				if (Math.abs(angle) > 45){//上下滑动
+					if (startY > touchMoveY && (startY - touchMoveY)>20) { //上滑
+						console.warn("***touchend-上滑***",startY - touchMoveY);
+						this.stopRecordHandle();//停止录音了
+						manager.stop()
+						uni.showToast({
+							title: '识别已取消!',
+							icon: 'none',
+							duration: 2000
+						})
+					}else{
+						this.stopRecordHandle();//停止录音了
+						manager.stop()
+						console.warn("streamRecordEnd-stop1" ,this.recording)
+					}
+				}else{
+					this.stopRecordHandle();//停止录音了
+					manager.stop();
+					console.warn("streamRecordEnd-stop2" ,this.recording)
+				}
+			},
+		}
+	}
+</script>
+<style lang="css" scoped>
+	@import "./viewlayout.css";
+	/* @import "@/common/css/common.css"; */
+</style>

+ 305 - 207
src/mixins/loadModel.js

@@ -1,6 +1,7 @@
 // const util = require('@/static/utils/util.js');
 const config = require('@/services/urlConfig.js');
 import modelData from '@/static/layoutModelData.js';
+import globlShowModel from '@/static/globlShowModel.js';
 // import requestConfig from '@/services/requestConfig.js';
 import { DRACOLoader } from 'three/addons/loaders/DRACOLoader.js';
 import * as THREE from 'three';
@@ -12,22 +13,25 @@ export default {
 			instancedFurList:[],
 			arrFrunList:[],
 			promise_list:[],
-			loadFurPromise: new Promise((resolve) => {
-			    this.loadedCompleteFun = function() {
-			        console.log('家具模型接口结束');
-			        resolve()
-			    }
-			}),
+			// loadFurPromise: new Promise((resolve) => {
+			//     this.loadedCompleteFun = function() {
+			//         console.log('家具模型接口结束');
+			//         resolve()
+			//     }
+			// }),
 			dracoLoader:null,
+			type:1,
+			tmpList:[],
+			realList:[],
 		}
 	},
 	watch: {},
 	mounted() {
 		console.warn("***loadmodel-mounted****")
-		// this.dracoLoader = new DRACOLoader();
-		// this.dracoLoader.setDecoderPath('three/addons/libs/draco/gltf/');
-		// this.dracoLoader.setDecoderConfig( { type: 'js' } );
-		// this.dracoLoader.preload();
+		this.dracoLoader = new DRACOLoader();
+		this.dracoLoader.setDecoderPath('/gltf/');
+		this.dracoLoader.setDecoderConfig( { type: 'js' } );
+		this.dracoLoader.preload();
 	},
 	methods: {
 		// 设置空间数组的墙体信息 
@@ -55,25 +59,23 @@ export default {
 				spaceWallInfo.wallS = wallSIndex == -1 ? false : true;
 				element.spaceWallInfo = spaceWallInfo;
 			}
-			await this.loadFurPromise;//等待解析分享者参数结束
-			this.$nextTick(() => {
-				this.calculateLayoutModelSize() // 计算模型的位置
-			})
+			// this.loadedCompleteFun();
 		},
 		// 批量获取空间模型信息
-		async getOverallArrangementDetailsList() {
+		async getOverallArrangementDetailsList(type=1) {
 			// 设置空间数组的墙体信息
 			// this.setSpaceListWallInfo();
+			this.type = type;//加载类型,1空间加载 2 全局精简加载
 			let arr = this.spaceList.map(it => it.layoutId).filter(it => it != 0);
 			let parmas = {
 				ids: arr,
 			};
-			this.loadFurPromise = new Promise((resolve, reject) => {
-				this.loadedCompleteFun = function() {
-				    console.log('家具模型接口结束');
-				    resolve()
-				}
-			})
+			// this.loadFurPromise = new Promise((resolve, reject) => {
+			// 	this.loadedCompleteFun = function() {
+			// 		console.log('家具模型接口结束');
+			// 		resolve()
+			// 	}
+			// })
 			let res = await requestConfig("getOverallArrangementDetailsList", parmas);
 			if (!res.success || !res.list || res.list.length == 0) {
 				return false;
@@ -89,16 +91,21 @@ export default {
 			this.gltfLayouts = []; //模型列表,所有空间里面的每个模型(家具)对应一条记录
 			
 			let allowSpaceId = [this.curSpaceObj.spaceId];
-			// let allowSpaceId = [];
-			if(this.curSpaceObj.spaceId==758){//二层主卧特殊处理
-				// allowSpaceId.push(735);//休闲小客厅
-			}
-			//花园类型的添加到家具加载目录里面
-			this.spaceList.forEach(it=>{
-				if(it.spaceType==14){
-					// allowSpaceId.push(it.spaceId);
+			if(this.type == 2){//全局精简模型;需要的是所有空间的模型
+				allowSpaceId = this.spaceList.map(it=>it.spaceId)
+			}else{//空间模型模式
+				allowSpaceId = [this.curSpaceObj.spaceId];
+				if(this.curSpaceObj.spaceId==758){//二层主卧特殊处理
+					allowSpaceId.push(735);//休闲小客厅
 				}
-			})
+				//花园类型的添加到家具加载目录里面
+				// this.spaceList.forEach(it=>{
+				// 	if(it.spaceType==14){
+				// 		allowSpaceId.push(it.spaceId);
+				// 	}
+				// })
+			}
+			// allowSpaceId = [388];//模型有警告,需要看下
 			this.arrFrunList.forEach(signel => {
 				let spaceId = this.spaceList.find(it => it.layoutId == signel.id).spaceId;
 				if(allowSpaceId.includes(spaceId)){//只加载允许的空间的布局,其他不加载
@@ -109,44 +116,84 @@ export default {
 						let item = md.modelData[i];
 						item.spaceId = spaceId;
 						item.layoutId = signel.id;
-						tmpList.push(item);
-						// this.promise_list.push(
-						// 	new Promise((resolve, reject) => {
-						// 		this.loadLayoutModelsOld(item , resolve);
-						// 	})
-						// )
+						item.h5Id = signel.id+""+item.id;//唯一标识
+						if(item.modelName=='BP_furnitureBase_C'){
+							continue;
+						}else{
+							tmpList.push(item);
+						}
 					}
 				}
-				
 			})
-			let realFurArr = this.preFurnitureData(tmpList);//统一处理家具模型
-			let arrLength = realFurArr.length;
-			console.log("***realFurArr***", realFurArr);
+			this.tmpList = tmpList;
+			if(this.type==2){//全局精简模型;需要的是所有空间的模型
+				this.fliterList(tmpList);
+				console.warn("***fliterList***",this.realList.length ,this.realList);
+				tmpList = this.realList;
+			}
+			let realFurArr = [];
+			realFurArr = this.preFurnitureData(tmpList);//统一处理家具模型
+			this.calculateLayoutModelSize() // 提前计算模型的位置
+			console.log("***realFurArr***", realFurArr,this.gltfLayouts);
 			realFurArr && realFurArr.forEach((item,index) => {
 				this.promise_list.push(
 					new Promise((resolve, reject) => {
-						this.loadLayoutModels(item, arrLength , resolve);
+						this.loadLayoutModels(item, resolve);
 					})
 				)
 			});
 			Promise.all(this.promise_list).then(() => {
 				let endTime = new Date().getTime();
 				console.log("家具模型全部加载完成,时间:", endTime - startTime);
-				this.loadedCompleteFun()
-				// this.$nextTick(() => {
-				// 	this.calculateLayoutModelSize() // 计算模型的位置
-				// })
 			})
 		},
+		//过滤掉不需要的家具
+		fliterList(list){
+			this.realList = [];
+			//找到直接的家具模型
+			list && list.forEach((mod)=>{
+				let name = mod.modelName.substring(0,mod.modelName.length-2);
+				if(globlShowModel.includes(name)){
+					this.realList.push(mod);
+				}
+			})
+			this.realList.forEach((ref)=>{
+				this.recursionFliter(ref)
+			})
+		},
+		//递归处理不需要的家具
+		recursionFliter(item){
+			let _list = [];//
+			if(parseInt(item.referenceModelBottom) > 0){
+				_list.push(item.referenceModelBottom)
+			}
+			if(parseInt(item.referenceModelLeft) > 0){
+				_list.push(item.referenceModelLeft)
+			}
+			if(parseInt(item.referenceModelRight) > 0){
+				_list.push(item.referenceModelRight)
+			}
+			if(parseInt(item.referenceModelTop) > 0){
+				_list.push(item.referenceModelTop)
+			}
+			if(_list.length==0){
+				return false;
+			}else{
+				this.tmpList.forEach(tmp=>{
+					if(_list.includes(tmp.id)){
+						if(!this.realList.find(it=>it.h5Id==tmp.h5Id)){
+							this.realList.push(tmp);
+							this.recursionFliter(tmp);
+						}
+					}
+				})
+			}
+			
+		},
 		//预处理需要加载墙体模型的数据-减少模型请求数
 		preFurnitureData(list){
 			let realFurnitureArr = [];//家具列表
-			let dataList = [];
-			dataList = list.map(item=>{
-				let curSpace = this.spaceList.find(space=>space.spaceId==item.spaceId);
-				return this.resetModelParameters(curSpace, item);
-			})
-			dataList && dataList.forEach((item, index) => {
+			list && list.forEach((item, index) => {
 				item.uniId = Date.now() + index;//唯一标识
 				//获取墙体对应的gltb模型的相关信息
 				let modelName = item.modelName;
@@ -165,87 +212,79 @@ export default {
 					}else{
 						object.list.push(item);
 					}
+					
+					let position = new THREE.Vector3();//当前几何体的位置参数
+					let scale = new THREE.Vector3();//当前几何体的缩放参数
+					let rotation = new THREE.Vector3();//当前几何体的缩放参数
+					let md = {
+						uniId:item.uniId,//家具模型实例的唯一标识
+						spaceId:item.spaceId,
+						id:item.id,
+						userData:item,
+						position:position,
+						scale:scale,
+						rotation:rotation,
+						loaded:false,
+					};
+					this.gltfLayouts.push(md);
 				}
 			});
 			return realFurnitureArr;
 		},
 		//加载家具模型-实例化方案
-		loadLayoutModels(realData, arrLength, resolve){
+		loadLayoutModels(realData, resolve){
 		    var that = this;
 			if(!realData.url){
 				console.warn("***家具模型不存在***",realData);
 				resolve();
 				return false;
 			}
-			that.loader.setDRACOLoader(this.dracoLoader);
-			// if(realData.url.endsWith('.glb')){
-			// 	realData.url = realData.url.replace('/model/',/dracomodel/);
-			// }
-			that.loader.load(realData.url, ( gltf ) => {
-				// that.progress = parseInt(100/arrLength) + that.progress;
-				// if(that.progress>100){
-				// 	that.progress = 100;
-				// }
-				// that.$refs.myLoading.showLoading("加载中..." + that.progress+'%')
-				// console.log("家具加载成功",that.progress,realData,gltf);
-				// gltf.scene.castShadow = true; 
-				gltf.scene.traverse((child)=> {
-					if (child.isMesh && child.visible) {
-						let instancedMesh = new THREE.InstancedMesh(child.geometry.clone(), child.material.clone(), realData.list.length);
-						this.instancedFurList.push(instancedMesh);
-						//realData 该模型被重复使用时的每一次的形变参数等
-						realData.list && realData.list.forEach((it,i)=>{
-							let rotationY = Math.PI / 2;
-							if (parseFloat(it.rotation) == 90) {
-								rotationY = 0;
-							}
-							if (parseFloat(it.rotation) == 180) {
-								rotationY = -Math.PI / 2;
-							}
-							if (parseFloat(it.rotation) == -90) {
-								rotationY = -Math.PI;
-							}
-							gltf.scene.rotation.y = rotationY;
-							gltf.scene.updateMatrixWorld();//更新世界坐标-这样,子模型也同步更新了
-							instancedMesh.setMatrixAt(i, child.matrixWorld);
-							instancedMesh.instanceMatrix.needsUpdate = true;
-							// instancedMesh.setColorAt(i, child.material.color);
-							// instancedMesh.instanceColor.needsUpdate = true;
-							let gltfFurn = that.gltfLayouts.find(itme=>itme.uniId==it.uniId);//判断是否已经添加过
-							if(!gltfFurn){
-								let position = new THREE.Vector3();//当前几何体的位置参数
-								let scale = new THREE.Vector3();//当前几何体的缩放参数
-								let rotation = new THREE.Vector3();//当前几何体的缩放参数
-								let md = {
-									uniId:it.uniId,//家具模型实例的唯一标识
-									spaceId:it.spaceId,
-									id:it.id,
-									instancedMeshIndexList:[//标识网格实例数组的序号 以及 当前几何体 在网格实例的序号
+			if(realData.name.includes('BP_XSPACE_deng_01')){//灯光
+				resolve();
+			}else{
+				that.loader.setDRACOLoader(this.dracoLoader);
+				that.loader.load(realData.url, ( gltf ) => {
+					gltf.scene.traverse((child)=> {
+						if (child.isMesh && child.visible) {
+							let instancedMesh = new THREE.InstancedMesh(child.geometry.clone(), child.material.clone(), realData.list.length);
+							this.instancedFurList.push(instancedMesh);
+							//realData 该模型被重复使用时的每一次的形变参数等
+							realData.list && realData.list.forEach((it,i)=>{
+								let gltfFurn = that.gltfLayouts.find(itme=>itme.uniId==it.uniId);//判断是否已经添加过
+								if(!gltfFurn){
+									return false;
+									// debugger
+								}
+								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},
-									],
-									userData:it,
-									position:position,
-									scale:scale,
-									rotation:rotation,
-									loaded:false,
-								};
-								that.gltfLayouts.push(md);
+									]
+								}else{
+									gltfFurn.instancedMeshIndexList.push({
+										instancedMeshIndex:this.instancedFurList.length-1,instancedAtIndex:i
+									})
+								}
+							})
+							instancedMesh.userType = "layoutMesh";
+							if(realData.name.includes("BP_L_carpet01")){//地毯接收阴影
+								instancedMesh.receiveShadow = true;//对象是否接收阴影
 							}else{
-								gltfFurn.instancedMeshIndexList.push({
-									instancedMeshIndex:this.instancedFurList.length-1,instancedAtIndex:i
-								})
+								instancedMesh.castShadow = true;//对象是否产生阴影
 							}
-						})
-						instancedMesh.userType = "layoutMesh";
-						if(realData.name.includes("BP_L_carpet01")){//地毯接收阴影
-							instancedMesh.receiveShadow = true;//对象是否接收阴影
-						}else{
-							instancedMesh.castShadow = true;//对象是否产生阴影
+							this.scene.add(instancedMesh);//添加到场景中
 						}
-					}
+					});
+					resolve();
 				});
-				resolve();
-			});
+			}
+			
 		},
 		//加载模型
 		loadLayoutModelsOld(modelObj, resolve) {
@@ -262,11 +301,11 @@ export default {
 			that.loader.load(url, (gltf) => {
 				// console.log("布局模型加载成功", gltf);
 				let model = gltf.scene; // 获取模型
-
+	
 				model.name = layoutModel.modelName;
 				model.userType = "layoutMesh";
 				model.userData = modelObj;
-
+	
 				// model.rotation.y =  Math.PI / 2 ;  // 旋转 90 度
 				this.gltfLayouts.push(model);
 				resolve();
@@ -300,42 +339,42 @@ export default {
 				centerX,
 				spaceId
 			} = curSpace;
-			// const cubeInfo = this.resetModelParameters(curSpace, cube.userData);
-			const cubeInfo = cube.userData;
+			const cubeInfo = this.resetModelParameters(curSpace, cube.userData);
+			// const cubeInfo = cube.userData;
 			let centerY = curSpace.centerY * -1; // UE和ThreeJS坐标做相反
 			// 默认空间中心点
 			let positionX = centerX;
 			let positionY = centerY;
-			// let rotationY = Math.PI / 2
+			let rotationY = Math.PI / 2;
 			let scaleX = 1;
 			let scaleY = 1;
-
+	
 			// 空间尺寸
 			let spaceWidth = curSpace.spaceWidth;
 			let spaceHeight = curSpace.spaceHeight;
 			// 模型尺寸
 			let modelWidth = cubeInfo.modelWidth;
 			let modelHeight = cubeInfo.modelHeight;
-
-			// // 判断旋转
-			// if (parseFloat(cubeInfo.rotation) == 90) {
-			// 	rotationY = 0;
-			// 	// 交换尺寸
-			// 	// modelWidth = cubeInfo.modelHeight;
-			// 	// modelHeight = cubeInfo.modelWidth;
-			// }
-			// if (parseFloat(cubeInfo.rotation) == 180) {
-			// 	rotationY = -Math.PI / 2;
-			// 	// modelWidth = cubeInfo.modelHeight;
-			// 	// modelHeight = cubeInfo.modelWidth;
-			// }
-
-			// if (parseFloat(cubeInfo.rotation) == -90) {
-			// 	rotationY = -Math.PI;
-			// 	// 交换尺寸
-			// 	// modelWidth = cubeInfo.modelHeight;
-			// 	// modelHeight = cubeInfo.modelWidth;
-			// }
+	
+			// 判断旋转
+			if (parseFloat(cubeInfo.rotation) == 90) {
+				rotationY = 0;
+				// 交换尺寸
+				// modelWidth = cubeInfo.modelHeight;
+				// modelHeight = cubeInfo.modelWidth;
+			}
+			if (parseFloat(cubeInfo.rotation) == 180) {
+				rotationY = -Math.PI / 2;
+				// modelWidth = cubeInfo.modelHeight;
+				// modelHeight = cubeInfo.modelWidth;
+			}
+	
+			if (parseFloat(cubeInfo.rotation) == -90) {
+				rotationY = -Math.PI;
+				// 交换尺寸
+				// modelWidth = cubeInfo.modelHeight;
+				// modelHeight = cubeInfo.modelWidth;
+			}
 			// 判断靠墙
 			if (cubeInfo.isStepAsideLeft == 'true') {
 				positionX = centerX - (spaceWidth / 2 - modelWidth / 2);
@@ -346,7 +385,7 @@ export default {
 				positionX += curSpace.spaceWallInfo.wallW ? 10 : 0;
 			}
 			if (cubeInfo.isStepAsideRight == 'true') {
-				positionX = centerX + (spaceWidth / 2 - modelHeight / 2);
+				positionX = centerX + (spaceWidth / 2 - modelWidth / 2);
 				if (parseFloat(cubeInfo.rotation) == 90 || parseFloat(cubeInfo.rotation) == -90) {
 					positionX = centerX + (spaceWidth / 2 - modelWidth / 2);
 				}
@@ -354,7 +393,7 @@ export default {
 				positionX -= curSpace.spaceWallInfo.wallE ? 10 : 0;
 			}
 			if (cubeInfo.isStepAsideTop == 'true') {
-				positionY = centerY - (spaceHeight / 2 - modelWidth / 2);
+				positionY = centerY - (spaceHeight / 2 - modelHeight / 2);
 				if (parseFloat(cubeInfo.rotation) == 90 || parseFloat(cubeInfo.rotation) == -90) {
 					positionY = centerY - (spaceHeight / 2 - modelHeight / 2);
 				}
@@ -378,6 +417,10 @@ export default {
 					return layoutModelData.id == parseInt(cubeInfo.referenceModelTop) && layoutModelData
 						.spaceId == cubeInfo.spaceId && layoutModelData.layoutId == cubeInfo.layoutId;
 				})
+				if(!referenceModel){
+					console.warn("***no-data***",cubeInfo.referenceModelTop,cubeInfo)
+					return false
+				}
 				positionY = referenceModel.position.z * 100 + (referenceModel.userData.modelHeight / 2 + cubeInfo
 					.modelHeight / 2);
 				positionY = positionY + parseFloat(cubeInfo.marginTop);
@@ -388,6 +431,10 @@ export default {
 					return layoutModelData.id == parseInt(cubeInfo.referenceModelBottom) && layoutModelData
 						.spaceId == cubeInfo.spaceId && layoutModelData.layoutId == cubeInfo.layoutId;
 				})
+				if(!referenceModel){
+					console.warn("***no-data***",cubeInfo.referenceModelBottom,cubeInfo)
+					return false
+				}
 				positionY = referenceModel.position.z * 100 - (referenceModel.userData.modelHeight / 2 + cubeInfo
 					.modelHeight / 2);
 				positionY = positionY - parseFloat(cubeInfo.marginBottom);
@@ -398,6 +445,10 @@ export default {
 					return layoutModelData.id == parseInt(cubeInfo.referenceModelLeft) && layoutModelData
 						.spaceId == cubeInfo.spaceId && layoutModelData.layoutId == cubeInfo.layoutId;
 				})
+				if(!referenceModel){
+					console.warn("***no-data***",cubeInfo.referenceModelLeft,cubeInfo)
+					return false
+				}
 				positionX = referenceModel.position.x * 100 + (referenceModel.userData.modelWidth / 2 + cubeInfo
 					.modelWidth / 2);
 				positionX = positionX + parseFloat(cubeInfo.marginLeft);
@@ -408,18 +459,22 @@ export default {
 					return layoutModelData.id == parseInt(cubeInfo.referenceModelRight) && layoutModelData
 						.spaceId == cubeInfo.spaceId && layoutModelData.layoutId == cubeInfo.layoutId;
 				})
+				if(!referenceModel){
+					console.warn("***no-data***",cubeInfo.referenceModelRight,cubeInfo)
+					return false
+				}
 				positionX = referenceModel.position.x * 100 - (referenceModel.userData.modelWidth / 2 + cubeInfo
 					.modelWidth / 2);
 				positionX = positionX - parseFloat(cubeInfo.marginRight);
 			}
-
+	
 			if (cubeInfo.isFixedWidth == "false" || cubeInfo.isFixedHeight == "false") { // 固定尺寸
 				// 靠墙拉伸
 				if (cubeInfo.isStepAsideTop == 'true' && cubeInfo.isStepAsideBottom == 'true') {
 					// console.log("高度拉伸", spaceHeight / modelHeight)
-
+	
 					positionY = centerY;
-
+	
 					if (curSpace.spaceWallInfo.wallN && curSpace.spaceWallInfo.wallS) {
 						spaceHeight -= 20 + parseFloat(cubeInfo.marginTop) + parseFloat(cubeInfo.marginBottom);
 					} else if (curSpace.spaceWallInfo.wallN) {
@@ -435,20 +490,20 @@ export default {
 						positionY += parseFloat(cubeInfo.marginTop) / 2 ;
 						positionY -= parseFloat(cubeInfo.marginBottom) / 2;
 					}
-
+	
 					// 计算缩放
 					if (parseFloat(cubeInfo.rotation) == 90 || parseFloat(cubeInfo.rotation) == -90) {
 						scaleY = spaceHeight / modelHeight;
 					} else {
 						scaleX = spaceHeight / modelHeight;
 					}
-
+	
 				}
-
+	
 				if (cubeInfo.isStepAsideLeft == 'true' && cubeInfo.isStepAsideRight == 'true') {
 					// console.log("宽度拉伸11111", spaceWidth / modelWidth)
 					positionX = centerX;
-
+	
 					if (curSpace.spaceWallInfo.wallW && curSpace.spaceWallInfo.wallE) {
 						spaceWidth -= 20 + parseFloat(cubeInfo.marginLeft) + parseFloat(cubeInfo.marginRight);;
 					} else if (curSpace.spaceWallInfo.wallW) {
@@ -471,9 +526,9 @@ export default {
 					} else {
 						scaleY = spaceWidth / modelWidth;
 					}
-
+	
 				}
-
+	
 				// 单个参照物和墙面拉伸
 				if (cubeInfo.isStepAsideTop == 'true' && parseInt(cubeInfo.referenceModelBottom) > 0) {
 					const referenceModel = this.gltfLayouts.find(item => {
@@ -485,7 +540,7 @@ export default {
 						.modelHeight / 2 - parseFloat(cubeInfo.marginBottom);
 					const wallPositionY = centerY - spaceHeight / 2 + (curSpace.spaceWallInfo.wallN ? 10 : 0) +
 						parseFloat(cubeInfo.marginTop);
-
+	
 					const newModelHeight = Math.abs(referenceModelPositionY - wallPositionY);
 					// console.log("上边拉伸", referenceModelPositionY, wallPositionY, newModelHeight)
 					if (Math.abs(parseFloat(cubeInfo.rotation)) == 90) {
@@ -495,9 +550,9 @@ export default {
 					}
 					positionY = wallPositionY + newModelHeight / 2;
 				}
-
+	
 				if (cubeInfo.isStepAsideBottom == 'true' && parseInt(cubeInfo.referenceModelTop) > 0) {
-
+	
 					const referenceModel = this.gltfLayouts.find(item => {
 						const layoutModelData = item.userData;
 						return layoutModelData.id == parseInt(cubeInfo.referenceModelTop) && layoutModelData
@@ -505,10 +560,10 @@ export default {
 					})
 					const referenceModelPositionY = referenceModel.position.z * 100 + referenceModel.userData
 						.modelHeight / 2 + parseFloat(cubeInfo.marginTop) + (curSpace.spaceWallInfo.wallN ? 10 : 0);
-
+	
 					const wallPositionY = centerY + spaceHeight / 2 - (curSpace.spaceWallInfo.wallS ? 10 : 0) -
 					parseFloat(cubeInfo.marginBottom);
-
+	
 					const newModelHeight = Math.abs(referenceModelPositionY - wallPositionY);
 					if (Math.abs(parseFloat(cubeInfo.rotation)) == 90) {
 						scaleY = newModelHeight / modelHeight;
@@ -516,11 +571,11 @@ export default {
 						scaleX = newModelHeight / modelHeight;
 					}
 					positionY = wallPositionY - newModelHeight / 2;
-
+	
 				}
 				if (cubeInfo.isStepAsideLeft == 'true' && parseInt(cubeInfo.referenceModelRight) > 0) {
 					// console.log("左边拉伸")
-
+	
 					const referenceModel = this.gltfLayouts.find(item => {
 						const layoutModelData = item.userData;
 						return layoutModelData.id == parseInt(cubeInfo.referenceModelRight) && layoutModelData
@@ -530,7 +585,7 @@ export default {
 						.modelWidth / 2 - parseFloat(cubeInfo.marginLeft);
 					const wallPositionX = centerX - spaceWidth / 2 + (curSpace.spaceWallInfo.wallE ? 10 : 0) +
 						parseFloat(cubeInfo.marginRight);
-
+	
 					const newModelWidth = Math.abs(referenceModelPositionX - wallPositionX);
 					if (Math.abs(parseFloat(cubeInfo.rotation)) == 90) {
 						scaleX = newModelWidth / modelWidth;
@@ -538,11 +593,11 @@ export default {
 						scaleY = newModelWidth / modelWidth;
 					}
 					positionX = wallPositionX + newModelWidth / 2;
-
+	
 				}
-
+	
 				if (cubeInfo.isStepAsideRight == 'true' && parseInt(cubeInfo.referenceModelLeft) > 0) {
-
+	
 					const referenceModel = this.gltfLayouts.find(item => {
 						const layoutModelData = item.userData;
 						return layoutModelData.id == parseInt(cubeInfo.referenceModelLeft) && layoutModelData
@@ -552,63 +607,106 @@ export default {
 						.modelWidth / 2 + parseFloat(cubeInfo.marginLeft);
 					const wallPositionX = centerX + spaceWidth / 2 - (curSpace.spaceWallInfo.wallE ? 10 : 0) -
 						parseFloat(cubeInfo.marginRight);
-
+	
 					const newModelWidth = Math.abs(referenceModelPositionX - wallPositionX);
 					if (Math.abs(parseFloat(cubeInfo.rotation)) == 90) {
 						scaleX = newModelWidth / modelWidth;
 					} else {
 						scaleY = newModelWidth / modelWidth;
 					}
-
+	
 					positionX = wallPositionX - newModelWidth / 2;
-
+	
 					// console.log("右边拉伸", Math.abs(parseFloat(cubeInfo.rotation)))
 				}
-
+	
 			}
 			// console.log("模型计算位置--", positionX, positionY)
-			// console.log("模型计算位置", cubeInfo, centerX, centerY, spaceWidth, spaceHeight, modelWidth, modelHeight, spaceId, scaleX, scaleY, rotationY)
+			console.log("模型计算位置", cubeInfo, centerX, centerY, spaceWidth, spaceHeight, modelWidth, modelHeight, spaceId, scaleX, scaleY, positionX, positionY)
 			let oldPosition = new THREE.Vector3();//当前几何体的位置参数
 			oldPosition.copy(cube.position);
 			cube.position.x = positionX / 100;
 			cube.position.z = positionY / 100;
-			// cube.rotation.y = rotationY;
-			cube.scale.x = scaleX ;
+			cube.rotation.y = rotationY;
+			cube.scale.x = scaleX;
 			cube.scale.z = scaleY;
+			cube.scale.y = 1;
 			// if (!cube.parent) { //说明还没添加到场景中-旧版方法
 			// 	this.scene.add(cube); //处理完毕后在加入场景中
 			// }
 			// if(scaleX>1 || scaleY>1){
 			// 	console.warn("***scaleinfo***",cubeInfo.id,scaleX,scaleY,cubeInfo.modelName)
 			// }
-			this.updateInfo(cube,oldPosition,scaleX,scaleY);//实例化方法
+			if(this.type==2){//全局精简加载
+				let name = cubeInfo.modelName.substring(0, cubeInfo.modelName.length - 2);
+				if(globlShowModel.includes(name)){
+					if(cubeInfo.modelName=='BP_XSPACE_deng_01_C'){//灯光
+						this.lightHandle(cube)
+					}else{
+						this.updateInfo(cube,oldPosition,scaleX,scaleY);//实例化方法
+					}
+				}
+			}else{
+				if(cubeInfo.modelName=='BP_XSPACE_deng_01_C'){//灯光
+					this.lightHandle(cube)
+				}else{
+					this.updateInfo(cube,oldPosition,scaleX,scaleY);//实例化方法
+				}
+			}
 		},
 		//更新家具模型到页面中
 		updateInfo(cube,oldPosition,scaleX,scaleY){
 			let lay = this.gltfLayouts.find(it=>it.uniId==cube.uniId);
-			cube.instancedMeshIndexList.forEach(item=>{
-				let index = item.instancedMeshIndex;
-				let instancedMesh = this.instancedFurList[index];//网格实例对象
-				let curMeshIndex = item.instancedAtIndex;//当前家具模型在网格实例对象里面的序号
-				let stratMatrix = new THREE.Matrix4();//定义一个四维矩阵
-				instancedMesh.getMatrixAt(curMeshIndex,stratMatrix);//获取当前几何体的四维矩阵到stratMatrix里面
-				let scaleMatrix = new THREE.Matrix4();	//定义一个缩放变化矩阵
-				let panMatrix = new THREE.Matrix4();	//定义一个平移变化矩阵
-				if (!lay.loaded) { //说明还没添加到场景中
-					scaleMatrix.makeScale(scaleX,1,scaleY);	//获得缩放变化矩阵
-					panMatrix.makeTranslation(cube.position.x,0,cube.position.z);	//获得平移变化矩阵
-					stratMatrix.multiply(scaleMatrix).premultiply(panMatrix);//通过矩阵计算获得最终的形变矩阵
-					instancedMesh.instanceMatrix.needsUpdate = true;//更新之前,必须开启开关
-					instancedMesh.setMatrixAt(curMeshIndex,stratMatrix);//更新几何体的世界矩阵
-					this.scene.add(instancedMesh);
-				}else{//更新形变矩阵
-					panMatrix.makeTranslation(cube.position.x - oldPosition.x,0,cube.position.z - oldPosition.z);	//获得平移变化矩阵
-					stratMatrix.premultiply(panMatrix);//通过矩阵计算获得最终的形变矩阵
-					instancedMesh.instanceMatrix.needsUpdate = true;//更新之前,必须开启开关
-					instancedMesh.setMatrixAt(curMeshIndex,stratMatrix);//更新几何体的世界矩阵
-				}
-			})
-			lay.loaded = true;
+			if(cube.instancedMeshIndexList && cube.instancedMeshIndexList.length>0){
+				cube.instancedMeshIndexList.forEach(item=>{
+					let index = item.instancedMeshIndex;
+					let instancedMesh = this.instancedFurList[index];//网格实例对象
+					let curMeshIndex = item.instancedAtIndex;//当前家具模型在网格实例对象里面的序号
+					let stratMatrix = new THREE.Matrix4();//定义一个四维矩阵
+					instancedMesh.getMatrixAt(curMeshIndex,stratMatrix);//获取当前几何体的四维矩阵到stratMatrix里面
+					let scaleMatrix = new THREE.Matrix4();	//定义一个缩放变化矩阵
+					let panMatrix = new THREE.Matrix4();	//定义一个平移变化矩阵
+					if (!lay.loaded) { //说明还没添加到场景中
+						// scaleMatrix.makeScale(scaleX,1,scaleY);	//获得缩放变化矩阵
+						// panMatrix.makeTranslation(cube.position.x,0,cube.position.z);	//获得平移变化矩阵
+						// stratMatrix.multiply(scaleMatrix).premultiply(panMatrix);//通过矩阵计算获得最终的形变矩阵
+						// instancedMesh.instanceMatrix.needsUpdate = true;//更新之前,必须开启开关
+						// instancedMesh.setMatrixAt(curMeshIndex,stratMatrix);//更新几何体的世界矩阵
+						// this.scene.add(instancedMesh);
+					}else{//更新形变矩阵
+						panMatrix.makeTranslation(cube.position.x - oldPosition.x,0,cube.position.z - oldPosition.z);	//获得平移变化矩阵
+						stratMatrix.premultiply(panMatrix);//通过矩阵计算获得最终的形变矩阵
+						instancedMesh.instanceMatrix.needsUpdate = true;//更新之前,必须开启开关
+						instancedMesh.setMatrixAt(curMeshIndex,stratMatrix);//更新几何体的世界矩阵
+					}
+				})
+				lay.loaded = true;
+			}
+		},
+		// 空间处理光源
+		lightHandle(cube){
+			let light = this.gltfLayouts.find(it=>it.uniId==cube.uniId);
+			if(!light.loaded){
+				// 从一个点向各个方向发射的光源。一个常见的例子是模拟一个灯泡发出的光。
+				let pointLight = new THREE.PointLight(0xffd7b3, 1.5, 5, 1);
+				pointLight.position.set(cube.position.x, 1.5, cube.position.z); //default; light shining from top
+				this.scene.add(pointLight);
+				let sphereSize = 0.1;
+				let pointLightHelper = new THREE.PointLightHelper( pointLight, sphereSize );
+				this.scene.add( pointLightHelper);
+				
+				pointLight.castShadow = true; // default false
+				// 默认情况下光投影相机区域是一个长宽高为10x10x500的长方体区域,光源投射方向为通过坐标原点
+				pointLight.shadow.camera.left = -200; // default
+				pointLight.shadow.camera.right  = 200; // default
+				pointLight.shadow.camera.top  = 200; // default
+				pointLight.shadow.camera.bottom  = -200; // default
+				this.scene.add(pointLight);
+				
+				light.loaded = true;
+			}else{
+				
+			}
 		},
 		// 空间布局旋转镜像重置模型约束
 		resetModelParameters(curSpace, cubeInfo) {
@@ -635,25 +733,25 @@ export default {
 			}
 			for (let index = 0; index < count; index++) {
 				let oldCubeInfo = JSON.parse(JSON.stringify(cubeInfo))
-
-
+	
+	
 				oldCubeInfo.isStepAsideLeft = "false"
 				oldCubeInfo.isStepAsideTop = "false"
 				oldCubeInfo.isStepAsideRight = "false"
 				oldCubeInfo.isStepAsideBottom = "false"
-
+	
 				oldCubeInfo.referenceModelLeft = "0"
 				oldCubeInfo.referenceModelTop = "0"
 				oldCubeInfo.referenceModelRight = "0"
 				oldCubeInfo.referenceModelBottom = "0"
-
+	
 				oldCubeInfo.rotation = "0"
-
+	
 				oldCubeInfo.marginLeft = "0";
 				oldCubeInfo.marginTop = "0";
 				oldCubeInfo.marginRight = "0";
 				oldCubeInfo.marginBottom = "0";
-
+	
 				// 是否靠墙
 				if (cubeInfo.isStepAsideLeft == 'true') {
 					oldCubeInfo.isStepAsideTop = 'true'
@@ -680,7 +778,7 @@ export default {
 				if (parseInt(cubeInfo.referenceModelBottom) > 0) {
 					oldCubeInfo.referenceModelLeft = cubeInfo.referenceModelBottom;
 				}
-
+	
 				// 边距
 				oldCubeInfo.marginLeft = cubeInfo.marginTop;
 				oldCubeInfo.marginTop = cubeInfo.marginRight;
@@ -688,7 +786,7 @@ export default {
 				oldCubeInfo.marginBottom = cubeInfo.marginLeft;
 				oldCubeInfo.modelWidth = cubeInfo.modelHeight;
 				oldCubeInfo.modelHeight = cubeInfo.modelWidth;
-
+	
 				// 旋转
 				if (parseInt(cubeInfo.rotation) == 0 || parseInt(cubeInfo.rotation) == 90) {
 					oldCubeInfo.rotation = parseInt(cubeInfo.rotation) + 90;
@@ -699,14 +797,14 @@ export default {
 				if (parseInt(cubeInfo.rotation) == -90) {
 					oldCubeInfo.rotation = "0";
 				}
-
+	
 				// console.log("旋转前的模型参数X", cubeInfo, oldCubeInfo, defaultLayout)
-
+	
 				cubeInfo = oldCubeInfo;
-
+	
 				// console.log("旋转后的模型参数X", cubeInfo, oldCubeInfo, defaultLayout)
 			}
-
+	
 			return cubeInfo;
 		},
 	}

+ 68 - 0
src/mixins/touchHandle.js

@@ -0,0 +1,68 @@
+export default {
+    data(){
+        return {
+            startX:0,
+            startY:0,
+            clientX:0,
+            clientY:0,
+        }
+    },
+    methods:{
+        mytouchstart(e) {
+        	this.clientX = 0;
+        	this.clientY = 0;
+        	this.startX = e.changedTouches[0].clientX;
+        	this.startY = e.changedTouches[0].clientY;
+        },
+        mytouchmove(e) {
+        	let startX = this.startX // 开始x坐标 
+        	let startY = this.startY //开始y坐标
+        	let touchMoveX = e.changedTouches[0].clientx //滑动变化坐标 
+        	let touchMoveY = e.changedTouches[0].clientY //滑动变化坐标 
+        	this.clientX = touchMoveX - startX;
+        	this.clientY = touchMoveY - startY;
+        },
+        mytouchend(e) {
+        	let startX = this.startX; // 开始x坐标
+        	let startY = this.startY; //开始y坐标
+        	let touchMoveX = e.changedTouches[0].clientX; //滑动变化坐标 
+        	let touchMoveY = e.changedTouches[0].clientY; //滑动变化坐标 
+        	let angle = this.angle(
+        	{
+        		X: startX,
+        		Y: startY
+        	}, {
+        		X: touchMoveX,
+        		Y: touchMoveY
+        	})
+        	//滑动角度超过45retrun
+        	// console.log(Math.abs(angle), "Math.abs(angle)")
+        	if (Math.abs(angle) > 45){//上下滑动
+        		if (touchMoveY > startY && (touchMoveY - startY)>20) { //下滑
+        			console.warn("***touchend-下滑***",touchMoveY - startY);
+        			this.downScroll && this.downScroll()
+        		}
+        		if (startY > touchMoveY && (startY - touchMoveY)>20) { //上滑
+        			console.warn("***touchend-上滑***",startY - touchMoveY);
+        			this.upScroll && this.upScroll()
+        		}
+        		
+        	}else{//左右滑动
+				if (startX > touchMoveX && (startX - touchMoveX)>50) { //左滑
+					console.warn("***touchend***",startX - touchMoveX);
+					this.leftScroll && this.leftScroll()
+				}
+				if(touchMoveX > startX && (touchMoveX - startX)>50){//右滑
+					console.warn("***touchend***",touchMoveX - startX);
+					this.rightScroll && this.rightScroll()
+				}
+        	}
+        },
+        angle(start,end){
+        	let _X = end.X - start.X;
+        	let _Y = end.Y - start.Y;
+        	if(_X == 0) return 90;
+        	return 360 * Math.atan((_Y / _X) / (2*Math.PI))
+        },
+    }
+}

+ 6 - 1
src/mixins/wallMethod.js

@@ -410,6 +410,7 @@ export default {
 			// let cube = wallObj.obj;
 			let list = wallObj.wallData;//墙体列表
 			let scale = 100;
+			let spaceWallInfo = {wallN:false, wallS:false, wallW:false, wallE:false};
 			// console.log("computeWallHandle", spaceObj.spaceId, spaceObj.centerX, spaceObj.centerY,spaceObj.spaceWidth, spaceObj.spaceHeight);
 			list.forEach((item)=>{//空间下的四面墙壁
 				let lastWallPosition = 0;
@@ -425,12 +426,13 @@ export default {
 						wallPositionY = wallPositionY *-1 - spaceObj.spaceHeight / 2 / scale;
 						let wallHeight2 = wallHeight / 2 / scale;
 						wallPositionY = wallPositionY + wallHeight2;
-						
+						spaceWallInfo.wallN = true;
 					}
 					else if(wallDirection=="S"){
 						wallPositionY = wallPositionY *-1 + spaceObj.spaceHeight / 2 / scale;
 						let wallHeight2 = wallHeight / 2 / scale;
 						wallPositionY = wallPositionY - wallHeight2;
+						spaceWallInfo.wallS = true;
 					}
 					if(wallDirection=="E"){
 						// console.log("模型参数", wallPositionX, spaceObj.spaceWidth)
@@ -439,12 +441,14 @@ export default {
 						let wallHeight2 = wallHeight / 2 / scale; 
 						wallPositionX = wallPositionX - wallHeight2; // 减去墙体本身的厚度
 						wallRotateY = Math.PI/2; // 东西墙 模型旋转90度
+						spaceWallInfo.wallE = true;
 					}else if(wallDirection=="W"){
 						wallPositionY = wallPositionY *-1;
 						wallPositionX = wallPositionX - spaceObj.spaceWidth / 2 / scale;
 						let wallHeight2 = wallHeight / 2 / scale; 
 						wallPositionX = wallPositionX + wallHeight2; // 减去墙体本身的厚度
 						wallRotateY = Math.PI/2; // 东西墙 模型旋转90度
+						spaceWallInfo.wallW = true;
 					}
 					let wallScaleX = 1;
 					let wallScaleY = 1;
@@ -546,6 +550,7 @@ export default {
 						}
 					})
 				})
+				spaceObj.spaceWallInfo = spaceWallInfo;
 			})
 		},
 		// 新计算墙体逻辑

+ 17 - 4
src/pages/mainView/mainView.html

@@ -1,8 +1,21 @@
-<div class="mainView" v-if="showMainView">
-	<!-- log组件 -->
-	<!-- <elabComponet></elabComponet> -->
-	<!-- 底图组件 -->
+<!-- <div class="mainView" v-if="showMainView">
+
 	<mapComponent></mapComponent>
 
 	<router-view></router-view>
+</div> -->
+<div class="map" style="position: absolute;width: 100%;height: 100vh;z-index: 1;">
+	<!-- 提交按钮 -->
+	<div class="submit-btn" @click="submitHouse">提交</div>
+	
+    <div id="mapDiv" ref="webgl"></div>
+	<canvas id="glcanvas" width="100vw" height="100vh" ref="glcanvas">
+		你的浏览器似乎不支持或者禁用了 HTML5 <code>&lt;canvas&gt;</code> 元素。
+	</canvas>
+	<!-- 主要操作视图 -->
+	<viewShell pageType="1" :overChange="overChange" :houseList="houseList" :houseObj="curHouseObj" :curHouseType="curHouseType" @curSpaceChange="curSpaceChange" @curHouseTypeChange="curHouseTypeChange" @curHouseFloorChange="curHouseFloorChange"></viewShell>
+	
+	<!-- <div id="labels"></div> -->
+	<!-- 左侧操作区域 -->
+	<!-- <left-operate-comp @operateHandle="operateHandle"></left-operate-comp> -->
 </div>

+ 197 - 0
src/pages/mainView/mainView.scss

@@ -1 +1,198 @@
+#mapDiv{
+    width: 100%;
+    height: 100vh;
+    background: #181C28;
+}
+.map {
+  position: relative;  /* 作为子元素的相对定位元素 */
+  width: 100%;
+  height: 100%;
+  overflow: hidden;
+}
+#labels {
+  position: absolute;  /* 把Label定位在容器内 */
+  left: 0;             /* 默认定位在左上角 */
+  top: 0;
+  color: white;
+}
+#labels>div {
+  position: absolute;  /* 让我们的容器决定尺寸 */
+  left: 0;             /* 默认定位在左上角 */
+  top: 0;
+  cursor: pointer;     /* 当悬浮时,变为一个小手 */
+  font-size:12px;
+  user-select: none;   /* 不允许文字被选中 */
+  white-space: nowrap;
+  text-shadow:         
+    -1px -1px 0 #000,
+    0   -1px 0 #000,
+    1px -1px 0 #000,
+    1px  0   0 #000,
+    1px  1px 0 #000,
+    0    1px 0 #000,
+    -1px  1px 0 #000,
+    -1px  0   0 #000;
+}
+#labels>div:hover {
+  color: red;
+}
+canvas:focus {
+  outline:none;
+}
+canvas { width:100vw; height:calc(100vh - 200rem);z-index: 10; }
 
+page {
+    -webkit-user-select: none;
+    user-select: none;
+    width: 100%;
+	height:100vh;
+    overflow-x: hidden;
+    overflow-y: hidden;
+}
+#canvas_webgl{
+	/* background: url(resources/images/daikanyama.jpg) no-repeat center center; */
+	/* background:#6d0909;
+	background-size: cover; */
+	/* transition: height 1s; */
+}
+/* 生成截屏的画布对象 */
+#canvas {
+	width: 100vw;
+	z-index: -1;
+	position: absolute;
+	left:0rem;
+}
+.tran{
+	transition-timing-function: linear;
+	transition: height 1s;
+}
+.voice-mask{
+	position: fixed;
+	left:0rem;
+	top:0rem;
+	width: 100vw;
+	height:100vh;
+	z-index: 11;
+	background: rgba(0, 0, 0, 0.5);
+}
+.btn{
+	position:absolute;
+	width:300rem;
+	height:132rem;
+	bottom:60rem;
+	right:30rem;
+	border-radius: 10rem;
+	opacity:1;
+	z-index:10000;
+	color:red;
+	display: flex;
+	flex-direction:row;
+	align-items:center;
+	justify-content:center;
+	background-color: rgba(155, 155, 155, 0.6);
+}
+
+.changeSizebtn {
+	position:absolute;
+	width:300rem;
+	height:132rem;
+	bottom:60rem;
+	left:30rem;
+	border-radius: 10rem;
+	opacity:1;
+	z-index:10000;
+	color:red;
+	display: flex;
+	flex-direction:row;
+	align-items:center;
+	justify-content:center;
+	background-color: rgba(155, 155, 155, 0.6);
+}
+.canvas-view{
+	position:relative;
+}
+.lable-view{
+	position:absolute;
+	width:100vw;
+}
+.word-view{
+	position: absolute;  /* let us position them inside the container
+	left: 0;             /* make their default position the top left of the container */
+	top: 0;
+	user-select: none;   /* don't let the text get selected */
+	z-index: 12;
+	text-align: center;
+}
+.word{
+	font-family: "Verdana";
+	font-weight: 400;
+	height: 40rem;
+	line-height: 40rem;
+	padding:0rem 10rem;
+	border-radius: 20rem;
+	background: #fff;
+	font-size:26rem;
+	color: #1d1d1d;
+}
+.number-view{
+	width: 30rem;
+	height: 30rem;
+	line-height: 30rem;
+	background: #fff;
+	color: #121212;
+	font-weight: 700;
+	font-size: 28rem;
+	font-family: "DIN Alternate Bold";
+	border-radius: 30rem;
+}
+.number-more{
+	width: 40rem;
+	height: 40rem;
+	line-height: 40rem;
+	border-radius: 30rem;
+}
+.active{
+	background: #faad5c;
+	color: #fff;
+}
+.submit-btn{
+	position: absolute;
+	top:190rem;
+	right:20rem;
+	width: 140rem;
+	height: 64rem;
+	border-radius: 32rem;
+	backdrop-filter: blur(40rem);
+	background-color: rgba(255, 156, 56, 1);
+	font-family: "Verdana Bold";
+	font-weight: 700;
+	font-size: 28rem;
+	color: #fff;
+	text-align:center;
+	line-height:64rem;
+	z-index: 11;
+}
+.submit-btn1{
+	left:20rem;
+}
+.voice-view{
+	width: 614rem;
+	height: 312rem;
+	border-radius: 40rem;
+	background: #fff;
+	box-shadow: 0 -6rem 12rem #0000001f;
+	position: absolute;
+	left:50%;
+	top:50%;
+	transform: translate(-50%,-50%);
+	text-align:center;
+}
+.voice-tips{
+	font-size: 28rem;
+	color: rgba(36, 36, 36, 0.51);
+	margin-top:12rem;
+}
+.voice-gif{
+	width: 100%;
+	margin-top:56rem;
+}

Різницю між файлами не показано, бо вона завелика
+ 2454 - 110
src/pages/mainView/mainView.vue


+ 29 - 0
src/static/globlShowModel.js

@@ -0,0 +1,29 @@
+//需要精简加载的模型名称
+var globlShowModel = [
+	'BP_XSPACE_deng_01',
+	'BP_L_carpet01',
+	"BP_D_LongDiningTable_240CM",
+	"BP_D_DinnerChair01",
+	"BP_L_2Sofa01",
+	"BP_L_1Sofa01",
+	"BP_L_book01",
+	"BP_L_31TV01",
+	"BP_L_TeaRTable",
+	"BP_B_verysmallbed",
+	"BP_B_wardrobe01",
+	"BP_K_Kitchentable002",
+	"BP_K_cookerhood2",
+	"BP_K_icebox_2door002",
+	"BP_K_flue002",
+	"BP_K_caozuotai03",
+	"BP_K_caozuotai001",
+	"BP_K_cookerhood02",
+	"BP_K_shuipen01",
+	"BP_K_shuipen02",
+	"BP_T_matong",
+	"BP_T_1PeopleBasin01",
+	"BP_T_OpenShower01",
+	"BP_L_TeaTable02",
+];
+
+module.exports = globlShowModel;

+ 14 - 12
src/static/layoutModelData.js

@@ -1,6 +1,6 @@
 var layoutModel = [
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_B_Mbed.glb', name: '1.5m床',modelName: 'BP_B_Mbed01', type:1},
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_B_smallcabinet.glb', name: '床头柜',modelName: 'BP_B_smallcabinet01', type:1},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_B_smallcabin.glb', name: '床头柜',modelName: 'BP_B_smallcabinet01', type:1},
 	// {url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_195M_C.gltf', name: '1.95m',modelName: 'BP_AutoWall_195M_C', type:1},
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_B_bigbed.glb', name: '1.8m床',modelName: 'BP_B_bigbed01', type:1},
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_B_smallbed.glb', name: '1.2m床',modelName: 'BP_B_smallbed01', type:1},
@@ -25,14 +25,15 @@ var layoutModel = [
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_B_painting02.glb', name: '挂画02',modelName: 'BP_B_painting02', type:1},
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_L_bookshelf01.glb', name: '大书架01',modelName: 'BP_L_bookshelf01', type:1},
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_L_bookshelf02.glb', name: '大书架02',modelName: 'BP_L_bookshelf02', type:1},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_L_book01.glb', name: '小书架',modelName: 'BP_L_book01', type:1},
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_D_dinetable01.gltf', name: '大展架01',modelName: 'BP_L_exhibition01', type:1},
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_L_Exhibition02.gltf', name: '大展架02',modelName: 'BP_L_exhibition02', type:1},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_L_Exhibition02.glb', name: '大展架02',modelName: 'BP_L_exhibition02', type:1},
 	
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_L_exhibition04.gltf', name: '4m展架',modelName: 'BP_L_exhibition04', type:1},
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_L_exhibition05.gltf', name: '5m展架',modelName: 'BP_L_exhibition05', type:1},
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_L_exhibition06.gltf', name: '6m展架',modelName: 'BP_L_exhibition06', type:1},
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_L_exhibition07.gltf', name: '7m展架',modelName: 'BP_L_exhibition07', type:1},
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_L_3sofa01.glb', name: '3人沙发',modelName: 'BP_L_21sofa01', type:1},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_L_21sofa.glb', name: '3人沙发',modelName: 'BP_L_21sofa01', type:1},
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_L_facesofa02.gltf', name: '对坐沙发02',modelName: 'BP_D_facesofa02', type:1},
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_B_wardrobe01.glb', name: '1m衣柜',modelName: 'BP_B_wardrobe01', type:1},
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_B_wardrobe02.glb', name: '2m衣柜',modelName: 'BP_B_wardrobe02', type:1},
@@ -57,7 +58,7 @@ var layoutModel = [
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_K_shuipen02.glb', name: '水盆02',modelName: 'BP_K_shuipen02', type:1},
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_K_Kitchentable001.glb', name: '台面',modelName: 'BP_K_Kitchentable002', type:1},
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_L_2sofa.gltf', name: '2人沙发',modelName: 'BP_L_2sofa', type:1},
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_K_caozuotai01.gltf', name: '操作台01',modelName: 'BP_K_caozuotai001', type:1},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_K_caozuotai01.glb', name: '操作台01',modelName: 'BP_K_caozuotai001', type:1},
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_K_caozuotai02.glb', name: '操作台02',modelName: 'BP_K_caozuotai002', type:1},
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_K_caozuotai03.glb', name: '操作台03',modelName: 'BP_K_caozuotai03', type:1},
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_O_LightIndoorWall.gltf', name: '隔墙',modelName: 'BP_O_LightIndoorWall', type:1},
@@ -68,8 +69,8 @@ var layoutModel = [
 
 
 	
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_T_OpenShower01.glb', name: '开敞侧淋浴间',modelName: 'BP_T_OpenShower01', type:1},
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_T_matong.glb', name: '马桶',modelName: 'BP_T_matong', type:1},
+	// {url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_T_OpenShower01.glb', name: '开敞侧淋浴间',modelName: 'BP_T_OpenShower01', type:1},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_T_matong.gltf', name: '马桶',modelName: 'BP_T_matong', type:1},
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_T_1PeopleBasin01.glb', name: '1人台盆01',modelName: 'BP_T_1PeopleBasin01', type:1},
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_T_flue001.glb', name: '水井管道01',modelName: 'BP_T_flue001', type:1},
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_T_Locker01.glb', name: '储物柜01',modelName: 'BP_T_Locker01', type:1},
@@ -123,19 +124,20 @@ var layoutModel = [
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_G_tiles13.gltf', name: '地砖13',modelName: 'BP_G_tiles13', type:1},
 
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_X_OutdoorBar01.gltf', name: '户外酒吧台',modelName: 'BP_X_OutdoorBar01', type:1},
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_D_DinnerChair-red.glb', name: '单人餐椅01',modelName: 'BP_D_DinnerChair01', type:1},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_D_DinnerChair_red.glb', name: '单人餐椅01',modelName: 'BP_D_DinnerChair01', type:1},
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_D_LongDiningTable_240CM.glb', name: '2.4M长餐桌',modelName: 'BP_D_LongDiningTable_240CM', type:1},
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_D_DiningDecration01.glb', name: '桌面饰品01',modelName: 'BP_D_DiningDecoration01_C', type:1},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_D_DiningDecration01.glb', name: '桌面饰品01',modelName: 'BP_D_DiningDecoration01', type:1},
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_L_TeaTable02.glb', name: '茶几02',modelName: 'BP_L_TeaTable02', type:1},
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_L_TeaTable03.glb', name: '茶几03',modelName: 'BP_L_TeaTable03', type:1},
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_L_carpet01.glb', name: '地毯01',modelName: 'BP_L_carpet01_C', type:1},
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_L_2Sofa01.glb', name: '双人沙发',modelName: 'BP_L_2Sofa01_C', type:1},
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_L_1Sofa01.glb', name: '单人沙发',modelName: 'BP_L_1Sofa01_C', type:1},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_L_TeaTable03.glb', name: '茶几03',modelName: 'BP_L_Teatable03', type:1},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_L_carpet01.glb', name: '地毯01',modelName: 'BP_L_carpet01', type:1},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_L_2Sofa01.glb', name: '双人沙发',modelName: 'BP_L_2Sofa01', type:1},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_L_1Sofa01.glb', name: '单人沙发',modelName: 'BP_L_1Sofa01', type:1},
 	
 	
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_X_RelaxTable01.gltf', name: '单独休闲桌01',modelName: 'BP_X_RelaxTable01', type:1},
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_B_pillow01.glb', name: '枕头',modelName: 'BP_B_pillow01', type:1},
 	
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_XSPACE_deng_01.glb', name: '吊顶灯',modelName: 'BP_XSPACE_deng_01', type:2},
 ];
 
 module.exports = layoutModel;

+ 29 - 29
src/static/wallData.js

@@ -1,33 +1,33 @@
 
 // group :0 墙面 1 hu
 var wallType = [
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_Standard.gltf', name: '承重墙',type:0, width:10, group:0, level:0, total:1},
-	{url: 'https://dm.static.elab-plus.com/3d/model/230519/qiangti.gltf', name: '实体墙面',type:3, width:10, group:0, level:0, total:0}, // 暂未使用
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_Standard.glb', name: '承重墙',type:0, width:10, group:0, level:0, total:1},
+	// {url: 'https://dm.static.elab-plus.com/3d/model/230519/qiangti.gltf', name: '实体墙面',type:3, width:10, group:0, level:0, total:0}, // 暂未使用
 
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_OpenInternalDoor_0.8M.gltf', name: '关闭户内门-0.8M',type:1, width:80, group:1, level:0, total:1},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_OpenInternalDoor_0.8M.glb', name: '关闭户内门-0.8M',type:1, width:80, group:1, level:0, total:1},
 	// {url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_OpenInternalDoor_0.8M.gltf', name: '关闭户内门-1.2M',type:6, width:80, group:1, level:1, total:2},
 	
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_CLosedEntranceDoor_0.9M.gltf', name: '关闭入户门-0.9M',type:4, width:90, group:2, level:0, total:1},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_CLosedEntranceDoor_0.9M.glb', name: '关闭入户门-0.9M',type:4, width:90, group:2, level:0, total:1},
 	
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_CLosedFoldingWindow_0.6M.gltf', name: '关闭折叠窗-0.6M',type:2, width:60, group:3, level:0, total:5},
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_CLosedFoldingWindow_1.2M.gltf', name: '关闭折叠窗-1.2M',type:5, width:120, group:3, level:1, total:5},
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_CLosedFoldingWindow_2.4M.gltf', name: '关闭折叠窗-2.4M',type:8, width:240, group:3, level:2, total:5},
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_CLosedFoldingWindow_2.7M.gltf', name: '关闭折叠窗-2.7M',type:9, width:270, group:3, level:3, total:5},
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_CLosedFoldingWindow_3.6M.gltf', name: '关闭折叠窗-3.6M',type:10, width:360, group:3, level:4, total:5},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_CLosedFoldingWindow_0.6M.glb', name: '关闭折叠窗-0.6M',type:2, width:60, group:3, level:0, total:5},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_CLosedFoldingWindow_1.2M__1_.glb', name: '关闭折叠窗-1.2M',type:5, width:120, group:3, level:1, total:5},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_CLosedFoldingWindow_2.4M.glb', name: '关闭折叠窗-2.4M',type:8, width:240, group:3, level:2, total:5},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_CLosedFoldingWindow_2.7M.glb', name: '关闭折叠窗-2.7M',type:9, width:270, group:3, level:3, total:5},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_CLosedFoldingWindow_3.6M.glb', name: '关闭折叠窗-3.6M',type:10, width:360, group:3, level:4, total:5},
 
 	{url: 'https://dm.static.elab-plus.com/3d/model/20230606/langan/langan.gltf', name: '阳台栏杆',type:7, width:690, group:4, level:0, total:1},
 
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_CLosedFrenchWindow_2.1M.gltf', name: '关闭落地窗-2.1M',type:11, width:210, group:5, level:0, total:8},
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_CLosedFrenchWindow_2.7M.gltf', name: '关闭落地窗-2.7M',type:12, width:270, group:5, level:1, total:8},
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_CLosedFrenchWindow_3.6M.gltf', name: '关闭落地窗-3.6M',type:13, width:360, group:5, level:2, total:8},
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_CLosedFrenchWindow_3.9M.gltf', name: '关闭落地窗-3.9M',type:14, width:390, group:5, level:3, total:8},
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_CLosedFrenchWindow_5.1M.gltf', name: '关闭落地窗-5.1M',type:15, width:480, group:5, level:4, total:8},
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_CLosedFrenchWindow_6.3M.gltf', name: '关闭落地窗-6.3M',type:16, width:630, group:5, level:5, total:8},
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_CLosedFrenchWindow_7.8M.gltf', name: '关闭落地窗-7.8M',type:17, width:780, group:5, level:6, total:8},
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_CLosedFrenchWindow_8.7M.gltf', name: '关闭落地窗-8.7M',type:18, width:870, group:5, level:7, total:8},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_CLosedFrenchWindow_2.1M.glb', name: '关闭落地窗-2.1M',type:11, width:210, group:5, level:0, total:8},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_CLosedFrenchWindow_2.7M.glb', name: '关闭落地窗-2.7M',type:12, width:270, group:5, level:1, total:8},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_CLosedFrenchWindow_3.6M.glb', name: '关闭落地窗-3.6M',type:13, width:360, group:5, level:2, total:8},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_CLosedFrenchWindow_3.9M.glb', name: '关闭落地窗-3.9M',type:14, width:390, group:5, level:3, total:8},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_CLosedFrenchWindow_5.1M.glb', name: '关闭落地窗-5.1M',type:15, width:480, group:5, level:4, total:8},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_CLosedFrenchWindow_6.3M.glb', name: '关闭落地窗-6.3M',type:16, width:630, group:5, level:5, total:8},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_CLosedFrenchWindow_7.8M.glb', name: '关闭落地窗-7.8M',type:17, width:780, group:5, level:6, total:8},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_CLosedFrenchWindow_8.7M.glb', name: '关闭落地窗-8.7M',type:18, width:870, group:5, level:7, total:8},
 
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_CLosedLongWindow_0.9M.gltf', name: '关闭长条窗-0.9M',type:19, width:90, group:6, level:0, total:2},
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_CLosedLongWindow_2.4M.gltf', name: '关闭长条窗-2.4M',type:20, width:240, group:6, level:1, total:2},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_CLosedLongWindow_0.9M.glb', name: '关闭长条窗-0.9M',type:19, width:90, group:6, level:0, total:2},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_CLosedLongWindow_2.4M.glb', name: '关闭长条窗-2.4M',type:20, width:240, group:6, level:1, total:2},
 
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_Railing_1M.gltf', name: '扶手栏杆-1M',type:21, width:100, group:7, level:0, total:6},
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_Railing_2M.gltf', name: '扶手栏杆-2M',type:22, width:200, group:7, level:1, total:6},
@@ -37,16 +37,16 @@ var wallType = [
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_Railing_6M.gltf', name: '扶手栏杆-6M',type:26, width:600, group:7, level:5, total:6},
 
 
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_Standard.gltf', name: '实体墙面',type:27},
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_Standard.gltf', name: '实体墙面',type:28},
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_Standard.gltf', name: '实体墙面',type:29},
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_Standard.gltf', name: '实体墙面',type:30},
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_Standard.gltf', name: '实体墙面',type:31},
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_Standard.gltf', name: '实体墙面',type:32},
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_Standard.gltf', name: '实体墙面',type:33},
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_Standard.gltf', name: '实体墙面',type:34},
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_Standard.gltf', name: '实体墙面',type:35},
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_Standard.gltf', name: '实体墙面',type:36},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_Standard.glb', name: '实体墙面',type:27},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_Standard.glb', name: '实体墙面',type:28},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_Standard.glb', name: '实体墙面',type:29},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_Standard.glb', name: '实体墙面',type:30},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_Standard.glb', name: '实体墙面',type:31},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_Standard.glb', name: '实体墙面',type:32},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_Standard.glb', name: '实体墙面',type:33},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_Standard.glb', name: '实体墙面',type:34},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_Standard.glb', name: '实体墙面',type:35},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_AutoWall_Standard.glb', name: '实体墙面',type:36},
 ];
 
 module.exports = wallType;

+ 1 - 1
src/utils/rem.js

@@ -1,7 +1,7 @@
 (function(){
 	function resize(){
 		var baseFontSize = 1;
-		var designWidth = 1440;
+		var designWidth = 750;
 		var width = window.innerWidth;
 		var currentFontSize = (width/designWidth)*baseFontSize;
 		document.querySelector('html').style.fontSize = currentFontSize+'px';

+ 178 - 1
src/utils/util.js

@@ -140,7 +140,184 @@ const util = {
         var day = parseInt((a2-a1)/ (1000 * 60 * 60 * 24)) + 1;//核心:时间戳相减,然后除以天数
         return day
     },
-
+	trackRequest(para, app = getApp()) {
+	    if ((para.type && para.type.includes('Error'))) {
+	        //所有报错埋点以及曝光埋点不再发送至服务器
+	        return
+	    }
+		try {
+			if (JSON.stringify(para.clkParams) === '"{}"' || JSON.stringify(para.clkParams) === "{}") {
+				para.clkParams = '';
+			}
+			if (JSON.stringify(para.expand) === '"{}"' || JSON.stringify(para.expand) === "{}") {
+				para.expand = '';
+			}
+	
+			let _scene = (app.globalData.launchInfo && app.globalData.launchInfo.scene) ? app.globalData.launchInfo.scene : '';
+			// console.log("app.globalData.launchInfo:" + JSON.stringify(app.globalData.launchInfo));
+			let _fromParam = app.globalData.exchangedFromChannel ? JSON.parse(app.globalData.exchangedFromChannel) : {};
+			//上一个页面
+			let lastPage = getCurrentPages()[getCurrentPages().length-2] ? getCurrentPages()[getCurrentPages().length-2].$vm : null;
+			let _pvLastPageName = lastPage ? lastPage.pvCurPageName : '';//上一页面名称
+			let _pvLastPageParams =  (lastPage && lastPage.pvCurPageParams) ? lastPage.pvCurPageParams : '';//上一页面参数
+			let _pvLastPagePath = lastPage ? (lastPage.route || lastPage.__route__) : '';//上一页面路径
+			let currPage;
+			// #ifdef H5
+			if(para.pvId && para.pvId.includes('_close')){
+				currPage = app.globalData.pageData;
+			}
+			else{
+				currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm :null;
+			}
+			// #endif
+			// #ifndef H5
+			currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm :null;
+			// #endif
+			let _route = currPage ? (currPage.route || currPage.__route__) : "";
+			let _pvCurPageName = currPage ? currPage.pvCurPageName : '';//当前页面名称
+			let pvCurPageParams = "";//字符串string对象
+			if(para.pvCurPageParams){//调用的时候传递进来的-先转为对象
+				pvCurPageParams = typeof para.pvCurPageParams === 'object' ? para.pvCurPageParams : JSON.parse(para.pvCurPageParams)
+			}else{
+				let _tmp = (currPage && currPage.pvCurPageParams) ? currPage.pvCurPageParams : '{}';//获取当前页面的参数
+				pvCurPageParams = typeof _tmp === 'string' ? JSON.parse(_tmp) : JSON.parse(JSON.stringify(_tmp))
+			}
+			//在页面参数里面手动添加path参数
+			pvCurPageParams.brandId = config.brandId || "";
+			pvCurPageParams.path = _route;
+			pvCurPageParams.pageId = pvCurPageParams.pageId || currPage.pageId || "";
+			pvCurPageParams.mobile = app.globalData.phone || "";
+			pvCurPageParams.entryPageId = (lastPage && lastPage.pageId) ? lastPage.pageId : "";
+			pvCurPageParams.entryPagePath = _pvLastPagePath;
+			if(currPage && currPage.locusBehaviorName){//行为名称
+				pvCurPageParams.locusBehaviorName = currPage.locusBehaviorName;
+			}
+			
+			pvCurPageParams = JSON.stringify(pvCurPageParams);
+			// if(para.clkId==='clk_2cmina_18'){
+			// 	this.sendScoreShare()
+			// }
+			if (JSON.stringify(pvCurPageParams) === '"{}"' || JSON.stringify(pvCurPageParams) === "{}") {
+				pvCurPageParams = '';
+			}
+			_fromParam["scene"] = _scene;
+			_fromParam["appName"] = app.globalData.systemInfo ? app.globalData.systemInfo.appName : (app.$vm.$options.globalData.systemInfo.appName ||"");
+			_fromParam['eventtime'] = Date.now();
+			let houseID = "";
+			if (currPage && currPage.houseId) {
+				houseID = currPage.houseId;
+			}
+			if (currPage && (currPage.route == 'pages/shareCard/shareCard' || currPage.__route__ ==
+					'pages/shareCard/shareCard')) {
+				let enterPage = getCurrentPages()[getCurrentPages().length - 2] ? getCurrentPages()[getCurrentPages().length -
+						2].$vm :
+					null;
+				if (enterPage && enterPage.houseId) {
+					houseID = enterPage.houseId;
+				}
+			}
+			console.log("houseID:" + houseID);
+			let data = {
+				userAgent: '',
+				browserName: '',
+				browserVersion: app.globalData.systemInfo ? app.globalData.systemInfo.SDKVersion : app.$vm.$options.globalData.systemInfo.SDKVersion,
+				platform: 'miniapp', //是否来自小程序的标志
+				fromPlatform: '', //来源平台,需要汤勇提供接口解析fromChannel存放
+				reserve1: app.globalData.terminal, //来源平台,抖音百度微信
+				reserve2: app.globalData.selectCityName || app.globalData.defaultProductCityName, //当前所在城市
+				fromParam: JSON.stringify(_fromParam), //转发者秘钥
+				deviceType: app.globalData.systemInfo ? app.globalData.systemInfo.model : (app.$vm.$options.globalData.systemInfo.SDKVersion || ""), //设备系统信息
+				ip: app.globalData.ip || '', //ip地址
+				cookieId: '',
+				openId: app.globalData.openid || '', //openid
+				customerId: (app.globalData.single && app.globalData.single.id) ? app.globalData.single.id : '', //用户id
+				brandUserId: (app.globalData.single && app.globalData.single.id) ? app.globalData.single.id : '', //用户id
+				createTime: this.formatTime(new Date()), //发送埋点时间
+				uploadTime: this.formatTime(new Date()), //发送埋点时间
+				product: app.globalData.projectName, //当前所在项目中文名称
+				project: houseID, //当前项目id
+				eventId: para.eventId || '', //埋点ID
+				eventName: para.eventName || '', //埋点ID
+				expand: typeof para.expand === 'object' ? JSON.stringify(para.expand) : para.expand, //扩展字段
+				imTalkId: para.imTalkId || '', //IM对话编号
+				imTalkType: para.imTalkType || '', //IM对话类型
+				eventModuleDes: para.eventModuleDes || '', //模块描述信息
+				eventInnerModuleId: para.eventInnerModuleId || '', //事件内部模块信息
+				adviserId: para.adviserId || '', //顾问id
+				clkDesPage: para.clkDesPage || _pvCurPageName || '', //点击前往的页面名称
+				clkId: para.clkId || '', //点击ID
+				clkName: para.clkName || '',
+				pvId: para.pvId || '', //PV埋点ID
+				clkParams: typeof para.clkParams === 'object' ? JSON.stringify(para.clkParams) : para.clkParams, //点击参数
+				pvPageStayTime: para.pvPageStayTime || '',
+				pvCurPageName: para.pvCurPageName || _pvCurPageName || '', //当前页面名称
+				pvCurPageParams: pvCurPageParams, //当前页面参数
+				pvLastPageName: para.pvLastPageName || _pvLastPageName || '', //上一页页面名称
+				pvLastPageParams: para.pvLastPageParams || _pvLastPageParams || '', //上一页页面参数
+				pvPageLoadTime: para.pvPageLoadTime || '', //加载时间
+				type: para.type || '', //埋点类型
+				longitude: app.globalData.longitude || '', //经度
+				latitude: app.globalData.latitude || '', //纬度
+				brandId: config.brandId, //集团id,
+				reserve3: para.reserve3 || new Date().getTime(), //埋点触发时的时间戳
+				reserve4: app.globalData.systemInfo ? app.globalData.systemInfo.deviceId : app.$vm.$options.globalData.systemInfo.deviceId,
+			};
+			// // #ifdef H5
+			// data.openId = app.globalData.H5OpenId?app.globalData.H5OpenId:(app.globalData.openid||'');
+			// data.customerId = app.globalData.H5CustomerId?app.globalData.H5CustomerId:((app.globalData.single && app.globalData.single.id) ? app.globalData.single.id : '');
+			// data.brandUserId = data.customerId;
+			// // #endif
+			let timeNow = new Date().getTime();
+			let session = uni.getStorageSync('sessionNumber') || timeNow;//session具体的值
+			sessionTime = sessionTime || timeNow;//上一次发送埋点的时间
+			if(currPage && (currPage.pvCurPageName == 'webviewPage')){//如果进入了H5-则锁定session
+				sessionTime = timeNow;//上一次发送埋点的时间
+			}
+			if(currPage.pvCurPageName != 'liveRoom'){//页面不是直播,则有10分钟刷新逻辑
+				if (timeNow - sessionTime > (10*60*1000)) {//判断当前要发送的埋点跟上次已经发送的埋点之间的时间差距
+					session = timeNow;
+					uni.setStorage({
+						key: "sessionNumber",
+						data: session
+					})
+				} else {//如果 相差不到10分钟,则session不更新,还是原来的session;这里可以加个判断 session不存在才赋值
+					uni.setStorage({
+						key: "sessionNumber",
+						data: session
+					})
+				}
+			}
+			sessionTime = timeNow;//记录下当次埋点的发送时间
+			data.session = data.brandUserId + '_' + session;//给当前的埋点加上session
+			// #ifdef H5
+			data.session = data.customerId + '_' + (app.globalData.session||session);//给当前的埋点加上session
+			// #endif
+			// app.globalData.session_id = data.session
+			// app.globalData.sessionTime = timeNow;
+			requestConfig('upload', data, true);
+			// let param = ["SEND" +
+			// 	"\nproject:" + "elab-marketing-system" + 
+			// 	"\nmethod:" + 'POST' +
+			// 	"\npath:" + '/behavior/brandMiniWeb/upload' +
+			// 	"\ndestination:" + '/ws/remote/invoke' +
+			// 	"\n\n" + JSON.stringify(data) +
+			// 	"\u0000"
+			// ];
+			// app.wsSendOrder(param,data);//socket 消息发送
+			console.warn("***mook***",(data.pvId || data.clkId || data.eventId),data.reserve3)
+		} catch (e) {
+			console.warn("***util.js-onError***", e);
+		}
+	},
+	getSession(){//获取session
+		let timeNow = new Date().getTime();
+		let session = uni.getStorageSync('sessionNumber') || timeNow;//session具体的值
+		uni.setStorage({
+		    key: "sessionNumber",
+		    data: session
+		})
+		return session;
+	},
 };
 
 export default util;

webgl1/favicon.ico → webgl/favicon.ico


Різницю між файлами не показано, бо вона завелика
+ 33 - 0
webgl/gltf/draco_decoder.js


BIN
webgl/gltf/draco_decoder.wasm


Різницю між файлами не показано, бо вона завелика
+ 33 - 0
webgl/gltf/draco_encoder.js


Різницю між файлами не показано, бо вона завелика
+ 116 - 0
webgl/gltf/draco_wasm_wrapper.js


+ 18 - 0
webgl/index.html

@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html lang="">
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width,initial-scale=1.0">
+	<meta http-equiv="Access-Control-Allow-Origin" content="*">
+    <link rel="icon" href="favicon.ico">
+    <title>webgl</title>
+  <script defer src="static/js/chunk-vendors.js"></script><script defer src="static/js/app.js"></script></head>
+  <body>
+    <noscript>
+      <strong>We're sorry but webgl doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
+    </noscript>
+    <div id="app"></div>
+    <!-- built files will be auto injected -->
+  </body>
+</html>

webgl1/static/fonts/element-icons.f1a45d74.ttf → webgl/static/fonts/element-icons.f1a45d74.ttf


webgl1/static/fonts/element-icons.ff18efd1.woff → webgl/static/fonts/element-icons.ff18efd1.woff


webgl1/static/fonts/iconfont.962990fe.woff → webgl/static/fonts/iconfont.962990fe.woff


webgl1/static/fonts/iconfont.96f2aa87.ttf → webgl/static/fonts/iconfont.96f2aa87.ttf


webgl1/static/fonts/iconfont.9e5bae0e.woff2 → webgl/static/fonts/iconfont.9e5bae0e.woff2


Різницю між файлами не показано, бо вона завелика
+ 824 - 0
webgl/static/js/app.js


Різницю між файлами не показано, бо вона завелика
+ 8275 - 0
webgl/static/js/chunk-vendors.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 1
webgl1/index.html


Різницю між файлами не показано, бо вона завелика
+ 0 - 1
webgl1/static/css/app.cad3a579.css


Різницю між файлами не показано, бо вона завелика
+ 0 - 1
webgl1/static/css/chunk-vendors.911808b7.css


Різницю між файлами не показано, бо вона завелика
+ 0 - 1
webgl1/static/js/app.88c5ea02.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 46
webgl1/static/js/chunk-vendors.f9210246.js