zjs_project před 1 rokem
rodič
revize
24edf7941a

+ 3 - 1
src/App.vue

@@ -23,6 +23,7 @@
 		getStorage,
 		pxoveItem
 	} from '@/utils/localStorage';
+	const util = require('@/utils/util.js').default;
 	export default {
 		name: "App",
 		// provide() {
@@ -67,7 +68,8 @@
 					console.warn('监测到E1004错误' + error);
 				}
 			}, true)
-
+			// 开启websocket连接
+			util.initWebsocket();
 			// window.onerror = function(message,source,line,column,error) {
 			// };
 		},

+ 18 - 2
src/components/newBottomCom/viewCareful/viewCareful.vue

@@ -2,7 +2,7 @@
 
 </template>
 <script>
-	// const util = require('@/static/utils/util.js');
+	const util = require('@/utils/util.js').default;
 	const config = require('@/services/urlConfig.js');
 	import spaceTypes from '@/static/spaceTypesIE.js';
 	// import Bus from '@/common/bus';
@@ -142,6 +142,9 @@
 					clkName: 'zoomin_clk', //点击前往的页面名称
 					clkParams: {
 						locusName: "精细调整放大",
+						spaceId:item.spaceId,
+						area:Math.abs(_area),
+						isZoomIn:_area>0?true:false,
 					}
 				};
 				if(_area<0){//缩小
@@ -151,10 +154,13 @@
 						clkName: 'zoomout_clk', //点击前往的页面名称
 						clkParams: {
 							locusName: "精细调整缩小",
+							spaceId:item.spaceId,
+							area:Math.abs(_area),
+							isZoomIn:_area>0?true:false,
 						}
 					};
 				}
-				// util.trackRequest(param);
+				util.trackRequest(param);
 				console.log("发送消息-空间变化: ",data, JSON.stringify(item));
 				// this.selectItem = item;
 				item.area = value;
@@ -167,6 +173,16 @@
 			goRoam(){
 				let item = this.lastCareList[this.selectIndex];
 				this.$parent.$parent.goRoam1(item.spaceId);
+				let param = {
+					type: 'CLK', //埋点类型
+					clkId: 'clk_2cmina_24012901', //点击ID
+					clkName: 'AI_clk', //点击前往的页面名称
+					clkParams: {
+						locusName: "AI精软装",
+						carefulList:this.carefulList
+					}
+				};
+				util.trackRequest(param);
 			},
 			callBack(type){
 				console.warn("***callBack***",type)

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

@@ -267,6 +267,17 @@
 			//切换空间
 			changeSpace(item){
 				this.$parent.changeSpace(item.spaceId);
+				let param = {
+					type: 'CLK', //埋点类型
+					clkId: 'clk_2cmina_23080417', //点击ID
+					clkName: 'changeangle_clk', //点击前往的页面名称
+					clkParams: {
+						locusName: "视角切换",
+						spaceId:item.spaceId,
+						type:this.styleList[this.curStyleIndex].styleName
+					}
+				};
+				util.trackRequest(param);
 			},
 			//视角切换
 			switchActor(){

+ 1 - 0
src/components/payView/payView.scss

@@ -57,6 +57,7 @@
 				color: #848484;
 				height: 40px;
 				text-align: right;
+				background: transparent;
 			}
 			.wd1{
 				width: 280px;

+ 36 - 10
src/pages/webgl_rxdz_env/webgl_rxdz_env.vue

@@ -155,6 +155,7 @@
 					this.options = this.tabData[0].options; //选项数据
 					this.AIImg = this.tabData[0].options[0].imageUrl;//AI生成所需的垫图
 					this.aiImagesList = this.tabData[0].options[0].hardboundEffect;
+					this.submitAnswer()
 					//初始化待提交的数据对象
 					// list.forEach(it=>{
 					// 	let obj = {
@@ -204,18 +205,43 @@
 				//替换对应的队列为选中的选项的数组对象
 				this.aiImagesList = this.options[this.optionIndex].hardboundEffect;
 				console.warn("***changeOption***", this.tabData,this.AIImg,this.subDataList)
-				let param = {
-					type: 'CLK', //埋点类型
-					clkId: 'clk_2cmina_24012602', //点击ID
-					clkName: 'option_clk', //点击前往的页面名称
-					clkParams: {
-						type: this.options[this.optionIndex].content,
-						locusName: "选项选择",
-					}
+				// let param = {
+				// 	type: 'CLK', //埋点类型
+				// 	clkId: 'clk_2cmina_24012602', //点击ID
+				// 	clkName: 'option_clk', //点击前往的页面名称
+				// 	clkParams: {
+				// 		type: this.options[this.optionIndex].content,
+				// 		locusName: "选项选择",
+				// 	}
+				// };
+				// util.trackRequest(param);
+				this.submitAnswer()
+			},
+			submitAnswer(){
+				let userId = this.userId || '';
+				let params = {
+					"answerContent": [
+						{
+							"optionTitle": this.options[this.optionIndex].content,
+							"questionTitle": this.tabData[this.tabIndex].subContent,//问题标题
+							"subOptionId": this.options[this.optionIndex].id,
+							"subQuestionId": this.tabData[this.tabIndex].id,
+						}
+					],
+					brandId: $config.brandId,
+					houseId: this.houseId,
+					channel:this.$route.query.channel || '',
+					city:this.$route.query.city || '',
+					district:this.$route.query.district || '',
+					province:this.$route.query.province || '',
+					paperTitle:'',//试卷id
+					testThemeId:'',
+					testcaseId:this.id,
+					uuid:userId,
+					xcxCustomerId:userId,
 				};
-				util.trackRequest(param);
+				requestConfig('submitAnswer', params,true);
 			},
-
 			catchTouchMove: function() {
 				return false;
 			},

+ 47 - 7
src/pages/webgl_rxdz_houseList/webgl_rxdz_houseList.vue

@@ -74,22 +74,62 @@
 				}
 				this.tabData[idx].checkedIndex = idx1;
 				// console.warn("***changeOption***", this.tabData,this.allSelect)
+				// let param = {
+				// 	type: 'CLK', //埋点类型
+				// 	clkId: 'clk_2cmina_24012401', //点击ID
+				// 	clkName: 'option_clk', //点击前往的页面名称
+				// 	clkParams: {
+				// 		type: this.tabData[idx].options[idx1].content,
+				// 		locusName: "选项选择",
+				// 	}
+				// };
+				// util.trackRequest(param);
+				this.submitAnswer(idx,idx1);
+			},
+			submitAnswer(tabIndex,optionIndex){
+				let userId = this.userId || '';
+				let params = {
+					"answerContent": [
+						{
+							"optionTitle": this.tabData[tabIndex].options[optionIndex].content,
+							"questionTitle": this.tabData[tabIndex].subContent,//问题标题
+							"subOptionId": this.tabData[tabIndex].options[optionIndex].id,
+							"subQuestionId": this.tabData[tabIndex].id,
+						}
+					],
+					brandId: $config.brandId,
+					houseId: this.houseId,
+					channel:this.$route.query.channel || '',
+					city:this.$route.query.city || '',
+					district:this.$route.query.district || '',
+					province:this.$route.query.province || '',
+					paperTitle:'',//试卷id
+					testThemeId:'',
+					testcaseId:this.id,
+					uuid:userId,
+					xcxCustomerId:userId,
+				};
+				requestConfig('submitAnswer', params,true);
+			},
+			changeHouse(item,index){
+				this.curHouseObj = item;
+				this.selectIndex = index;
+				console.log("changeHouse: ", this.curHouseObj,this.selectIndex);
 				let param = {
 					type: 'CLK', //埋点类型
 					clkId: 'clk_2cmina_24012401', //点击ID
 					clkName: 'option_clk', //点击前往的页面名称
 					clkParams: {
-						type: this.tabData[idx].options[idx1].content,
-						locusName: "选项选择",
+						houseType: item.houseType,
+						name: item.name,
+						note: item.note,
+						area: item.houseArea,
+						id: item.id,
+						locusName: "空间选择",
 					}
 				};
 				util.trackRequest(param);
 			},
-			changeHouse(item,index){
-				this.curHouseObj = item;
-				this.selectIndex = index;
-				console.log("changeHouse: ", this.curHouseObj,this.selectIndex);
-			},
 			//查询题目数据
 			async queryTestcaseSingle() {
 				let params = {

+ 5 - 3
src/pages/webgl_rxdz_look/webgl_rxdz_look.vue

@@ -6,7 +6,7 @@
 	import Stats from 'three/addons/libs/stats.module.js';
 	import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
 	import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
-	
+	import spaceTypes from '@/static/spaceTypesIE.js';
 	import TWEEN from 'three/addons/libs/tween.module.js';
 
 	var requestId = "";
@@ -496,6 +496,7 @@
 			        brandId: $config.brandId,
 					houseId:this.houseId,
 					userId,
+					type:'QIANCE',
 			    };
 			    const res = await requestConfig('getCustomizedRecord', params);
 			    if (res.success ) {
@@ -541,9 +542,10 @@
 				this.gltfSpaces.forEach((cube,index) =>{
 					// 给地板加上空间类型标注, 空间为链接空间的不显示
 					if(cube.spaceName && !cube.isSizeLock){
+						let name = spaceTypes[cube.spaceType - 1];
 						this.lableItem.push(
 							{
-								text:cube.spaceName,
+								text:name,
 								spaceId:cube.spaceId,
 								transform:'',
 								cubeIndex:index,
@@ -571,7 +573,7 @@
 				}
                 if(this.curHouseObj){
                     const spaceDetail = this.curHouseObj;
-                    const spaceList = spaceDetail.houseJson;
+                    const spaceList = spaceDetail.houseJson.filter(it=>it.spaceId);
                     // 交换centerX, centerY;上一页面已经处理过了,这里不在需要处理
                     for (let index = 0; index < spaceList.length; index++) {
                         var element = spaceList[index];

+ 35 - 20
src/pages/webgl_rxdz_role/webgl_rxdz_role.vue

@@ -143,16 +143,6 @@
 				this.tabIndex = id;
 				this.options = this.tabData[this.tabIndex].options; //选项数据
 				this.optionIndex = this.tabData[this.tabIndex].checkedIndex; //获取用户已经选中的选项
-				let param = {
-					type: 'CLK', //埋点类型
-					clkId: 'clk_2cmina_24012301', //点击ID
-					clkName: 'tab_clk', //点击前往的页面名称
-					clkParams: {
-						type: this.tabData[this.tabIndex].fatherContent,
-						locusName: "大类选择",
-					}
-				};
-				util.trackRequest(param);
 			},
 			//切换选项
 			changeOption(id) {
@@ -167,18 +157,43 @@
 				}
 				this.allSelect = !this.tabData.some(it=>it.checkedIndex==-1);
 				console.warn("***changeOption***", this.tabData,this.allSelect)
-				let param = {
-					type: 'CLK', //埋点类型
-					clkId: 'clk_2cmina_24012302', //点击ID
-					clkName: 'option_clk', //点击前往的页面名称
-					clkParams: {
-						type: this.options[this.optionIndex].content,
-						locusName: "选项选择",
-					}
+				// let param = {
+				// 	type: 'CLK', //埋点类型
+				// 	clkId: 'clk_2cmina_24012302', //点击ID
+				// 	clkName: 'option_clk', //点击前往的页面名称
+				// 	clkParams: {
+				// 		type: this.options[this.optionIndex].content,
+				// 		locusName: "选项选择",
+				// 	}
+				// };
+				// util.trackRequest(param);
+				this.submitAnswer();
+			},
+			submitAnswer(){
+				let userId = this.userId || '';
+				let params = {
+					"answerContent": [
+						{
+							"optionTitle": this.options[this.optionIndex].content,
+							"questionTitle": this.tabData[this.tabIndex].subContent,//问题标题
+							"subOptionId": this.options[this.optionIndex].id,
+							"subQuestionId": this.tabData[this.tabIndex].id,
+						}
+					],
+					brandId: $config.brandId,
+					houseId: this.houseId,
+					channel:this.$route.query.channel || '',
+					city:this.$route.query.city || '',
+					district:this.$route.query.district || '',
+					province:this.$route.query.province || '',
+					paperTitle:'',//试卷id
+					testThemeId:'',
+					testcaseId:this.id,
+					uuid:userId,
+					xcxCustomerId:userId,
 				};
-				util.trackRequest(param);
+				requestConfig('submitAnswer', params,true);
 			},
-
 			catchTouchMove: function() {
 				return false;
 			},

+ 0 - 17
src/pages/webgl_rxdz_test/webgl_rxdz_test.vue

@@ -632,23 +632,6 @@
 			voiceMaskChange(voiceMask){
 				this.voiceMaskShow = voiceMask;
 			},
-			//黄山数据处理
-			hushangHandle(param){
-				let expand = {};
-				expand.landImg = this.$route.query.landImg || '';
-				expand.baseImg = this.$route.query.baseImg || '';
-				expand.bgPrototypeImg = this.$route.query.bgPrototypeImg || '';
-				expand.landNo = this.$route.query.landNo || '';//地块
-				expand.landArea = this.$route.query.landArea || '';//地块面积
-				expand.buildingAreaPreference = this.$route.query.buildingAreaPreference || '';//建筑面积
-				expand.layer = this.$route.query.layer || '大平层';//层数
-				expand.structureName = this.$route.query.structureName || '';//结构-L形等
-				expand.landDescription = this.$route.query.landDescription || '';//地形地势
-				expand.scenery = this.$route.query.scenery || '';//景观
-				expand.structureDescription = this.$route.query.structureDescription || '';//空间特质-结构
-				param.expand = JSON.stringify(expand);
-				return param;
-			},
 			// async submitHouse(){
 			// 	if(this.overChange){
 			// 		this.$message.warning("空间正在调整");

+ 76 - 11
src/pages/webgl_rxdz_text_customize/webgl_rxdz_text_customize.html

@@ -11,7 +11,7 @@
 					:current="currImgIdx" ref="carousel">
                     <el-carousel-item v-for="(img,s) in tabData[tabIndex].hardboundEffect" :key="s" :item-id="s" class="master-pic-img">
                         <img @touchstart="mytouchstart" @touchmove="mytouchmove" @touchend="mytouchend" class="master-pic-img" :src="img" mode="aspectFill" />
-						<div class="lookHouseView rows justify-center" v-if="tabIndex==2 && (!shareUserId || shareUserId==userId)" @click="toMode">
+						<div class="lookHouseView rows justify-center" v-if="tabIndex==0 && (!shareUserId || shareUserId==userId)" @click="toMode">
 							<img class="icon-ai" src="https://dm.static.elab-plus.com/miniProgram/iconfont/icon-ai.png" mode="widthFix"/>
 							查看户型
 						</div>
@@ -55,25 +55,59 @@
 				</div>
             </div>
         </div>
+		
 		<!-- 底部按钮 -->
-		<div class="bottom-view columns justify-center">
+		<div class="info-view columns justify-center" v-if="layoutStruct && typeStatus">
 			<div class="bottom-title" :style="{'color':tabIndex==0?'#fff':'#000'}">
 				- 支持我的梦想家 -
 			</div>
 			<div class="bottom-tips" :style="{'color':tabIndex==0?'#fff':'#000'}">
 				喜欢我的设计吗,给我投一票吧~
 			</div>
-			<div class="rows rows-between">
-				<div class="bottom-btn btn-qw rows justify-center" @click="navigateFuc">
-				    加企微 · 定制服务
+			<!-- 支持率 -->
+			<div class="rows justify-center info-point">
+				<div class="left-word">{{proportion}}%</div>
+				<div class="line-view rows">
+					<div class="left-line" :style="{width:proportion+'%'}"></div>
+					<div class="right-line" :style="{width:(100 - proportion)+'%'}"></div>
+				</div>
+				<div class="right-word">{{100 - proportion}}%</div>
+			</div>
+			<div class="sub-view-result columns" v-if="layoutStruct.clickLike!=null">
+				<img class="img" :src="layoutStruct.clickLike?'https://dm.static.elab-plus.com/miniProgram/like.png':'https://dm.static.elab-plus.com/miniProgram/unlike.png'"></img>
+				<div class="text rows justify-center">感谢您的投票</div>
+			</div>
+			<div class="sub-view rows justify-center" v-else>
+				<div class="left rows justify-center" @click="likeOrView(1)">喜欢</div>
+				<div class="right rows justify-center" @click="likeOrView(2)">不喜欢</div>
+			</div>
+			
+			<div class="info-head columns rows-between" v-if="total && headList && headList.length>0">
+				<div class="head-list rows justify-center">
+					<img class="wg-head" v-for="(item,idx) in headList" :key="idx" 
+					:src="item?item:'https://dm.static.elab-plus.com/elabWepy/default-head.png'"></img>
 				</div>
-				<div class="bottom-btn btn-share rows justify-center" @click="optionChange(true)">
-					<i class="iconfont icon-Shared"></i>
-				    <!-- 立即分享 -->
-					去首页
+				<div class="text-sty">
+					已经有{{total}}人参与梦想家创建
 				</div>
 			</div>
-		    
+		</div>
+		<div class="bottom-view rows rows-between" v-if="typeStatus">
+			<div class="bottom-btn btn-qw rows justify-center" @click="toIndex">
+			    设计我的梦想家
+			</div>
+			<div class="bottom-btn btn-share rows justify-center" @click="share">
+				分享我的设计
+			</div>
+		</div>
+		<div class="bottom-view rows rows-between" v-else>
+			<div class="bottom-btn btn-qw rows justify-center" @click="conectUS">
+			    联系我们了解更多
+			</div>
+			<div class="bottom-btn btn-share rows justify-center" @click="share">
+				<!-- <i class="iconfont icon-Shared"></i> -->
+				分享我的设计
+			</div>
 		</div>
 		<!-- 高斯背景图 -->
 		<div class="swiper-img-gs-mh"  >
@@ -81,7 +115,38 @@
 		</div>
 		
     </div>
-	
+	<!-- 弹窗 -->
+	<div class="pop-view" v-if="showUserInput">
+		<div class="pop-main">
+			<i class="modelClose iconfont icon-close" @click="hidePop"></i>
+			<div class="title">提交我的梦想家</div>
+			<div class="content">
+				<div class="item" style="margin-bottom: 40px;">
+					<div class="item-title">姓名</div>
+					<div class="item-input">
+						<input class="input-real" type="text" autofocus placeholder="请填写您的姓名昵称" 
+						v-model="name" />
+					</div>
+				</div>
+				<div class="item" style="margin-bottom: 20px;">
+					<div class="item-title">手机号</div>
+					<div class="item-input">
+						<input class="input-real" type="number" autofocus placeholder="请填写您的手机号" 
+						v-model="tel" />
+						<div v-if="verifyText" class="input-tips rows justify-center" @click="getVerifyCode">{{verifyText}}</div>
+					</div>
+				</div>
+				<div class="item">
+					<div class="item-input rows">
+						<input class="input-real" type="number" autofocus placeholder="请填写验证码" 
+						v-model="verifyCode"/>
+						<div class="input-tips rows justify-center" @click="getVerifyCode">发送验证码</div>
+					</div>
+				</div>
+			</div>
+			<div class="btn rows justify-center" @click="sendPhone">确定</div>
+		</div>
+	</div>
 	<!-- 添加企微弹出层 -->
     <!-- <div class="f-popup-bom-container" @click.stop.prevent="showPopup=false" v-show="showPopup">
 		<div class="f-popup-view">

+ 259 - 32
src/pages/webgl_rxdz_text_customize/webgl_rxdz_text_customize.scss

@@ -20,6 +20,7 @@ page {
 .contentBox{
 	position: relative;
     width: 100vw;
+	min-height: 100vh;
     overflow: hidden;
     box-sizing: border-box;
 	background-color: white;
@@ -47,7 +48,7 @@ page {
 			.lookHouseView{
 				position: absolute;
 				left:276px;
-				bottom:138px;
+				bottom:160px;
 				width: 200px;
 				height: 76px;
 				border-radius: 38px;
@@ -268,35 +269,15 @@ page {
         }
     }
 }
-.swiper-img-gs-mh {
-	// width: 100vw;
-	// top:0px;
-	height: 100%;
-	top:750px;
+
+.info-view{
+	position: relative;
 	width: 100%;
-	opacity: 0.85;
-	position: absolute;
-	left: 0;
-	
-	z-index: 1;
-	overflow: hidden;
-	box-sizing: border-box;
-	.img{
-		width: 100%;
-		height: 100%;
-		filter: blur(20px);
-		transform: scale(1.2);
-		object-fit: cover;
-	}
-}
-.bottom-view{
-    position: relative;
-    width: 100%;
-	padding-top:128px;
+	padding: 0px 30px;
 	padding-bottom:300px;
-    box-sizing: border-box;
+	box-sizing: border-box;
 	z-index: 3;
-    .bottom-title{
+	.bottom-title{
 		font-family: "DIN Alternate Bold";
 		font-weight: 700;
 		font-size: 28px;
@@ -314,6 +295,89 @@ page {
 		margin-bottom:40px;
 		opacity: 0.6;
 	}
+	.info-point{
+		width: 100%;
+		margin-bottom: 50px;
+		height: 30px;
+		.left-word{
+			width: 60px;
+			font-family: "FontName";
+			font-weight: 400;
+			font-size: 30px;
+			color: #e38330;
+			margin-right: 20px;
+		}
+		.right-word{
+			width: 60px;
+			font-family: "FontName";
+			font-weight: 400;
+			font-size: 30px;
+			color: #fff;
+			margin-left: 20px;
+		}
+		.line-view{
+			width: calc(100% - 160px);
+			height: 8px;
+			.left-line{
+				height: 100%;
+				background: #e38330;
+				clip-path: polygon(0 0%, 100% 0, calc(100% - 4px) 100%, 0 100%);
+			}
+			.right-line{
+				height: 100%;
+				background: #fff;
+				opacity: 0.52;
+				clip-path: polygon(4px 0%, 100% 0, 100% 100%, 0 100%);
+			}
+		}
+	}
+	.sub-view-result{
+		margin-bottom: 180px;
+		.img{
+			width: 152px;
+			height: 60px;
+			margin-bottom: 10px;
+		}
+		.text{
+			font-family: "Verdana";
+			font-weight: 400;
+			font-size: 28px;
+			color:rgba(255, 255, 255, 0.55)
+		}
+	}
+	.sub-view{
+		width: 100%;
+		height: 80px;
+		font-family: "FontName";
+		font-weight: 400;
+		font-size: 40px;
+		color: #fff;
+		margin-bottom: 180px;
+		.left{
+			width: 268px;
+			height: 80px;
+			background: #e38330;
+			border-radius: 40px 0% 0% 40px;
+			margin-right: -10px;
+			clip-path: polygon(0 0%, 100% 0, calc(100% - 20px) 100%, 0 100%);
+		}
+		.right{
+			width: 268px;
+			height: 80px;
+			background: rgba(255, 255, 255, 0.33);
+			border-radius: 0px 40px 40px 0px;
+			clip-path: polygon(20px 0%, 100% 0, 100% 100%, 0 100%);
+		}
+	}
+}
+.bottom-view{
+    position: fixed;
+    width: 100%;
+	padding: 0px 30px;
+    box-sizing: border-box;
+	left: 0px;
+	bottom: 50px;
+	z-index: 3;
     .bottom-btn{
         width: 290px;
         height: 80px;
@@ -329,8 +393,8 @@ page {
         }
     }
 	.btn-qw{
-		background: rgba(246, 165, 83, 0.2);
-		color: #f6a553;
+		background: linear-gradient(130.79deg, #a0ed84 0%, #e8f4b7 100%);
+		color: #365d39;
 		margin-right:30px;
 	}
     .btn-share{
@@ -340,7 +404,170 @@ page {
     }
 	.icon-Shared{
 		color: #ffffff;
-		font-size:32px;
-		margin-right:20px;
+		font-size:24px;
+		margin-right:10px;
+	}
+}
+.info-head{
+	width: 100%;
+	.head-list{
+		width: 100%;
+		height: 48px;
+		font-size: 0px;
+		margin-bottom: 6px;
+		.wg-head{
+			width:48px;
+			height:48px;
+			border-radius: 50%;
+			box-sizing: border-box;
+			background-color:#fff;
+		}
+		.wg-head:nth-of-type(n+2){
+			margin-left:-8px;
+		}
+	}
+	.text-sty{
+		font-family: "Verdana";
+		font-weight: 400;
+		font-size: 26px;
+		color: #fff;
+	}
+}
+
+
+.swiper-img-gs-mh {
+	// width: 100vw;
+	// top:0px;
+	height: 100%;
+	top:750px;
+	width: 100%;
+	opacity: 0.85;
+	position: absolute;
+	left: 0;
+	
+	z-index: 1;
+	overflow: hidden;
+	box-sizing: border-box;
+	.img{
+		width: 100%;
+		height: 100%;
+		filter: blur(20px);
+		transform: scale(1.2);
+		object-fit: cover;
+	}
+}
+.pop-view{
+	position: fixed;
+	width: 100vw;
+	height: 100vh;
+	box-sizing: border-box;
+	left: 0px;
+	top: 0px;
+	background-color: rgba(112, 112, 112, 0.5);
+	z-index: 99;
+	.pop-main{
+		position: absolute;
+		left: 0px;
+		bottom: 0px;
+		width: 100%;
+		height: 832px;
+		padding: 60px 50px;
+		box-sizing: border-box;
+		border-radius: 40px 40px 0 0;
+		background: #fff;
+		.modelClose{
+			position: absolute;
+			right: 30px;
+			top: 30px;
+			font-size: 30px;
+		}
+		.title{
+			position: relative;
+			font-family: "Verdana Bold";
+			font-weight: 700;
+			font-size: 32px;
+			color: #000;
+			margin-bottom: 50px;
+		}
+		.content{
+			position: relative;
+			width: 100%;
+			.item-title{
+				font-size: 28px;
+				color: #2b2525;
+				margin-bottom: 10px;
+			}
+			.item-input{
+				position: relative;
+				width: 630px;
+				height: 88px;
+				border-radius: 12px;
+				background: #f7f7f7;
+				padding: 0px 30px;
+				.input-real{
+					font-family: "Helvetica Neue";
+					font-weight: 400;
+					font-size: 26px;
+					color: #848484;
+					height: 40px;
+					background-color: transparent;
+				}
+				.input-tips{
+					position: absolute;
+					right: 20px;
+					top: 16px;
+					width: 158px;
+					height: 56px;
+					border-radius: 12px;
+					background: transparent;
+					border: 2px solid #f9870f;
+					font-family: "Helvetica Neue";
+					font-weight: 400;
+					font-size: 26px;
+					color: #f9870f;
+				}
+			}
+			
+		}
+		.btn{
+			position: absolute;
+			left: 50px;
+			bottom: 60px;
+			width: 650px;
+			height: 88px;
+			border-radius: 44px;
+			box-sizing: border-box;
+			background: rgba(18, 18, 18, 1);
+			font-family: "Verdana Bold";
+			font-weight: 700;
+			font-size: 30px;
+			color: #fff;
+		}
 	}
-}
+}
+textarea::-webkit-scrollbar{
+    display:none;
+}
+textarea::-webkit-input-placeholder{
+    color: rgba(43, 37, 37, 0.3);
+	font-size: 28px;
+}
+input::-webkit-input-placeholder{
+    color: rgba(132, 132, 132, 0.6);
+	font-size: 26px;
+}
+@font-face{
+	font-family: DINCondensed-Bold;
+	src: url('https://dm.static.elab-plus.com/miniprogram/DINAlternateBold.ttf');
+}
+input,textarea{
+	border: none;
+	outline: none;
+	appearance: none;
+	cursor:pointer;
+}
+input:focus,textarea:focus{
+	border: none;
+	outline: none;
+	appearance: none;
+}

+ 195 - 16
src/pages/webgl_rxdz_text_customize/webgl_rxdz_text_customize.vue

@@ -4,6 +4,9 @@
 <script>
     const util = require('@/utils/util.js').default;
 	const config = require('@/services/urlConfig.js');
+	import {
+		Toast
+	} from 'mint-ui';
 	import router from "@/router";
 	import touchHandle from '@/mixins/touchHandle.js';
 	import commonPageMethod from '@/mixins/commonPageMethod.js';
@@ -55,6 +58,18 @@ export default {
 			gsImage:'',
 			layoutStruct:null,
 			expand:null,
+			likeCount:0,//喜欢的人数
+			unlikedCount:0,//不喜欢人数
+			total:0,//总人数
+			typeStatus:1,//显示是否喜欢的视图 ,默认显示 0 不显示
+			proportion:50,	//显式比例
+			headList:[],
+			showUserInput:false,	//是否显示手机号留电弹窗
+			name:'',	//用户称呼
+			tel:'',	//手机号
+			verifyCode:'',//验证码
+			verifyText:'',	//验证码提示
+			isSend:false,
 		}
     },
     /**
@@ -64,10 +79,12 @@ export default {
         console.log("***onLoad-webgl_rxdz_customize***", this.$route.query)
         const that = this;
         this.houseId = this.$route.query.houseId?this.$route.query.houseId:'';
-        // this.spaceId = this.$route.query.spaceId?this.$route.query.spaceId:'';
         this.id = this.$route.query.id?this.$route.query.id:'6523d91af65c626211ee21c8';
+		this.typeStatus = this.$route.query.typeStatus?this.$route.query.typeStatus:0;
 		if(!this.id){
-			this.showToast("没有数据!");
+			Toast({
+				message: '没有数据!',
+			});
 			return false;
 		}else{
 			this.getIdData();
@@ -80,6 +97,121 @@ export default {
 	},
 
     methods: {
+		showPop() {
+			this.showUserInput = true;
+		},
+		hidePop() {
+			this.showUserInput = false;
+		},
+		getVerifyCode: function () { //验证码
+		    if (this.isSend) {
+		        return
+		    }
+		    this.isSend = true;
+		    if (!/^1\d{10}$/.test(this.tel)) {
+		        Toast({
+		        	message: '输入的手机号不合法',
+		        });
+		        this.isSend = false
+		        return;
+		    }
+		    this.querySendCode(); //发送验证码接口
+		},
+		// 发送验证码接口
+		async querySendCode() {
+		    let time = 60;
+		    let time1 = setInterval(() => {
+		        if (time > 0) {
+		            time = time - 1;
+		            this.verifyText = time + 's'
+		        } else {
+		            this.isSend = false;
+		            this.verifyText = '重新发送';
+		            clearInterval(time1)
+		        }
+		    }, 1000)
+		    const res = await requestConfig('send', {
+		        phoneNumber: this.tel,
+				"sign": "Elab未来人居",
+				"verifyType": 1,
+		        houseId: this.houseId || ''
+		    });
+		    if (res && res.success) {
+		
+		    } else {
+		        this.isSend = false;
+				Toast({
+					message: '系统提示:网络错误',
+				});
+		    }
+		},
+		async sendPhone() {
+		    console.log("sendPhone", this.verifyCode)
+		    if (!/^1\d{10}$/.test(this.tel)) {
+				Toast({
+					message: '输入的手机号不合法',
+				});
+		        return;
+		    }
+			if (!this.verifyCode) {
+				Toast({
+					message: '没有验证码',
+				});
+			    return;
+			}
+		    let codeData = {
+				mobile: this.tel,
+				code: this.verifyCode,
+				verifyType: 1,
+				
+				// mobile: this.tel,
+				// type: 'verification.code',
+				// verifycode: this.verifyCode
+		    };
+		    const validateCodeRes = await requestConfig('validate', codeData);
+		    if (validateCodeRes && !validateCodeRes.success) { //成功
+				Toast({
+					message: '验证码输入错误',
+				});
+		        return
+		    } else {
+		        this.fakeLeavePhone()
+		    }
+		},
+		async fakeLeavePhone(){
+			let signParam = {
+			    brandCustomerId: this.userId || '',
+			    brandId: $config.brandId,
+			    mobile: this.tel || '',
+			    shareRoute: '',
+			    houseId: this.houseId || '',
+			    attrs: ''
+			};
+			// 获取登录用户的shareToken
+			const signres = await requestConfig('generateShareSign', signParam, true);
+			if (signres && signres.success && signres.single) {
+			    let shareToken = signres.single;
+			    console.log('刷新分享秘钥,当前为:', shareToken)
+				let parm = {
+				    houseId: this.houseId || '',
+				    scene:  "",
+				    brandCustomerId: this.userId || '',
+				    brandId: $config.brandId,
+				    mobile: this.tel || '',
+				    shareSign: shareToken,
+					gdt_vid: "",
+					url: window.location.href,
+				};
+				requestConfig('authorizedMobile', parm, true);
+			}
+			
+		},
+		blurInput(e) {
+		    this.tel = e.detail.value || ''
+		},
+		blurCode(e) {
+		    this.verifyCode = e.detail.value || ''
+		},
 		swiperChangeImg(e){
             console.log("***swiperChangeImg***",e);
 			this.currImgIdx = e.detail ? e.detail.current : e;
@@ -97,46 +229,93 @@ export default {
 				}
 			}
 		},
-        navigateFuc(){
+		//去往首页
+		toIndex(){
+			if(window.__wxjs_environment === 'miniprogram'){
+				wx.miniProgram.redirectTo({url: '/pages/index/index?houseId='+this.houseId})
+			}else{
+				let url = $config.min_uri + "pages/index/index?houseId=" + this.houseId
+				// window.location.href = shottingImg;
+				window.open(url)
+			}
+		},
+		//联系我们
+        conectUS(){
 			if(window.__wxjs_environment === 'miniprogram'){
 				wx.miniProgram.navigateTo({url: '/pages/transfer/transfer?event=openCustomerServiceChat&houseId='+this.houseId})
 			}else{
-				this.$message.warning("敬请期待");
+				// this.$message.warning("敬请期待");
+				this.showPop();
 			}
 		},
-		optionChange(){
+		share(){
 			if(window.__wxjs_environment === 'miniprogram'){
-				wx.miniProgram.redirectTo({url: '/pages/index/index?houseId='+$config.xcxHouseId})
+				wx.miniProgram.navigateTo({url: '/pages/transfer/transfer?event=openCustomerServiceChat&houseId='+this.houseId})
 			}else{
-				this.$message.warning("敬请期待");
+				// window.location.href = shottingImg;
+				var textArea = document.createElement("textarea");
+				textArea.value = window.location.href;
+				document.body.appendChild(textArea);
+				textArea.select();
+				document.execCommand('copy');
+				document.body.removeChild(textArea);
+				Toast({
+					message: '链接已复制',
+				});
+			}
+		},
+		async likeOrView(type){
+			let userId = this.userId || '';
+			let params = {
+				busId: this.id,
+				brandId: $config.brandId,
+				houseId:this.houseId,
+				userId,
+				type:1,
+			};
+			if(type==1){//喜欢
+				params.likeed = 1
+			}else if(type==2){//不喜欢
+				params.likeed = 0
+			}
+			// params.userId = this.userId;
+			const res = await requestConfig('add', params);
+			if (res.success) {
+				this.layoutStruct.clickLike = params.likeed;
 			}
 		},
-        async getIdData(){
+		async getIdData(){
 			let userId = this.userId || '';
-            let params = {
-                id: this.id,
-                brandId: $config.brandId,
+			let params = {
+				id: this.id,
+				brandId: $config.brandId,
 				houseId:this.houseId,
 				userId,
 				type:'QIANCE',
-            };
+			};
 			if(this.shareUserId){//分享时 不带用户id
 				delete params.userId
 			}
-            // params.userId = this.userId;
-            const res = await requestConfig('getCustomizedRecord', params);
+			// params.userId = this.userId;
+			const res = await requestConfig('getCustomizedRecord', params);
             if (res.success && res.list && res.list[0]) {
                 let single = res.list[0];
 				this.tabIndex = 0;//表明是户型首图
 				this.tabData = [];
 				if(single.expand){
 					this.expand = JSON.parse(single.expand);
-					// this.tabDataHandle(single.expand)
 				}
 				this.layoutStruct = JSON.parse(JSON.stringify(single));
+				
+				this.likeCount = this.layoutStruct.liked;//喜欢的人数
+				this.unlikedCount = this.layoutStruct.unliked;//不喜欢人数
+				this.total = this.layoutStruct.total;//总人数
+				if(this.total){
+					this.proportion = parseInt((this.likeCount / this.total)*100);
+				}
                 // this.number = single.landCode
                 this.form = single.layoutStruct[0];
-
+				this.headList = this.layoutStruct.heads || [];
                 this.hardboundEffect = this.form.layoutImgCustomized? [this.form.layoutImgCustomized] : [];//赋值轮播图
 				let data = {
 					name : this.form.layoutName,

+ 6 - 0
src/services/requestConfig.js

@@ -45,6 +45,12 @@ const endpoints = {
 	addUserVirtural: 'elab-marketing-file/virtual/addUserVirtural', // 修改数字人信息
 	aliyunOpenapiUploadOss: "elab-marketing-sms/aliyun/openapi/uploadOss", // 上传文件到oss
 	queryTestcaseSingle: "elab-marketing-content/testcase/queryTestcaseSingle/v2", // 查询单个测试数据
+	add: "elab-marketing-file/browse/records/add", // 是否喜欢
+	send: 'elab-marketing-user/vcode/send/verifyCode', //发送短信验证码
+	validate: 'elab-marketing-user/vcode/verifyCode/validate',//短信验证码验证
+	authorizedMobile: 'elab-marketing-user/applet/auth_mobile', //解密手机号接口
+	generateShareSign: 'elab-marketing-user/brand/shareSign/generateShareSign',//用户信息加密 获取 秘钥
+	submitAnswer: 'elab-marketing-content/question/submitAnswer',//答题
 	// predictions: "https://api.replicate.com/v1/deployments/feathers-wing/spacely-realistic-style-softedge-a100/predictions", // 分享查看
 };
 // var source = CancelToken.source();

+ 9 - 1
src/services/urlConfig.js

@@ -9,6 +9,8 @@ var config = function(env) {
             uploadUrl: 'http://101.132.138.87:5555', //文件上传
             api_url: 'https://gatewaytest.elab-plus.vip/', //測試
             redirect_uri: 'https://h5test1.elab-plus.com/krpano/template', // 授权回调地址
+			min_uri: 'https://dm.static.elab-plus.com/miniProgram/webgl/test1/index.html#/', // H5小程序的地址
+			ws_url: 'wss://wstest3.skyforestcity.com/',
             themeColor1: '#FFD09F',
             themeColor2: '#FFAD5C',
             themeColor3: '#EF863F',
@@ -34,6 +36,8 @@ var config = function(env) {
             uploadUrl: 'http://106.14.187.241:5555', //文件上传
             api_url: 'https://gatewaytest1.elab-plus.com/', //測試
             redirect_uri: 'https://h5test1.elab-plus.com/krpano/template', // 授权回调地址
+            min_uri: 'https://dm.static.elab-plus.com/miniProgram/webgl/test1/index.html#/', // H5小程序的地址
+			ws_url: 'wss://wstest3.skyforestcity.com/',
             themeColor1: '#FFD09F',
             themeColor2: '#FFAD5C',
             themeColor3: '#EF863F',
@@ -59,7 +63,9 @@ var config = function(env) {
             uploadUrl: 'http://106.14.187.241:5555', //文件上传
             api_url: 'https://gatewaytest3.skyforestcity.com/', //測試
             redirect_uri: 'https://h5test3.elab-plus.net/krpano/template', // 授权回调地址
-            themeColor1: '#FFD09F',
+			min_uri: 'https://dm.static.elab-plus.com/miniProgram/webgl/test1/index.html#/', // H5小程序的地址
+            ws_url: 'wss://wstest3.skyforestcity.com/',
+			themeColor1: '#FFD09F',
             themeColor2: '#FFAD5C',
             themeColor3: '#EF863F',
             themeColor4: '#FFDF80',
@@ -180,6 +186,8 @@ var config = function(env) {
             uploadUrl: 'https://dm-api.elab-plus.cn', //文件上传
             api_url: 'https://dm-api.elab-plus.cn/', //接口地址
             redirect_uri: 'http://city.1949plus.com', // 授权回调地址
+			min_uri: 'https://dm.static.elab-plus.com/miniProgram/webgl/test1/index.html#/', // H5小程序的地址
+			ws_url: 'wss://websocket.elab-plus.cn/',
 			xcxHouseId: '11121',
             themeColor1: '#7AB47C',
             themeColor2: '#A7CE80',

+ 226 - 17
src/utils/util.js

@@ -3,23 +3,215 @@ import {
 	setStorage
 } from '@/utils/localStorage';
 window.sessionTime = new Date();
-var util = {
-	reformParam(methodName, para) {
-		var parameter = {}
-		parameter['merchantid'] = '1'
-		parameter['version'] = '1'
-		parameter['sign_type'] = 'RSA'
-		parameter['sign'] = '123'
-		parameter['charset'] = 'UTF-8'
-		parameter['method'] = methodName
-		var context = ''
-		for (var key in para) {
-			context += '&' + key + '=' + para[key]
-		}
-		parameter['context'] = context
-		return parameter
-	},
+/**
+ * websocket配置项
+ * @type {{serverTimeoutObj: null, timeoutObj: null, timeoutnum: null, lockReconnect: boolean, ws: null, params: {houseId: null, openid: null, userid: null}, timeout: number}}
+ */
+let wsConfig = {
+    ws: null,
+    lockReconnect: false,    //是否真正建立连接
+	interval: null,
+    timeoutObj: null,   //心跳心跳倒计时
+    serverTimeoutObj: null,   // 服务连接超时时间
+    timeoutnum: null,  // 断开重连倒计时
+    timeout: 58 * 1000,  // 58秒一次心跳
+    // 建立ws连接时,所需参数
+    params: {
+        openid: null,
+        userid: null,
+        houseId: null
+    }
+}
+/**
+ * 初始化websocket
+ */
+function initWebsocket() {
+    let str1 = parseInt(Math.random() * 10);
+    let str2 = parseInt(Math.random() * 10);
+    let str3 = parseInt(Math.random() * 10);
+    let str4 = "" + str1 + str2 + str3;
+    //初始化weosocket
+    let websocketUrl = $config.ws_url;
+    const wsuri =
+        `${websocketUrl}gs-guide-websocket/` +
+        str4 +
+        "/shi23jfrw" +
+        "/websocket";
+    wsConfig.ws = new WebSocket(wsuri);
+    // 连接建立时触发
+    wsConfig.ws.onopen = websocketonopen;
+    // 客户端接收服务端数据时触发
+    wsConfig.ws.onmessage = websocketonmessage;
+    // 通信发生错误时触发
+    wsConfig.ws.onerror = websocketonerror;
+    // 连接关闭时触发
+    wsConfig.ws.onclose = websocketclose;
+    return wsConfig.ws;
+}
+
+/**
+ * 连接建立时触发
+ */
+function websocketonopen() {
+	let data = initPage();
+    console.log('建立ws连接', data)
+    start();
+    //发送链接身份数据
+    connectSend(data.openId, data.userId, data.houseId);
+}
+
+/**
+ * 客户端接收服务端数据时触发
+ * @param e
+ */
+function websocketonmessage(e) {
+    console.log('客户端接收服务端数据时触发', e);
+    //收到服务器信息,心跳重置
+    reset();
+}
+
+/**
+ * 通信发生错误时触发
+ */
+function websocketonerror() {
+    console.log("出现错误");
+    reconnect();
+}
 
+/**
+ * 连接关闭时触发
+ * @param e
+ */
+function websocketclose(e) {
+    //关闭
+    console.log("断开连接", e);
+    //重连
+    reconnect();
+}
+
+function websocketsend(Data) {
+    console.log('ws状态', wsConfig.ws.readyState)
+	if(wsConfig.ws.readyState==1){
+		//数据发送
+		wsConfig.ws.send(Data);
+	}
+    
+}
+/**
+ * 解析页面路由参数
+ * @param name
+ * @returns {null}
+ */
+function getQueryString(name) {
+    let reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
+    let arr = window.location.href.split('?');
+    let result = null;
+    arr.forEach((item, index) => {
+        let res = item.match(reg);
+        if (res != null) {
+            result = unescape(res[2]);
+        }
+    })
+    return result
+}
+/**
+ * 初始进入页面参数
+ */
+function initPage(){
+	let queryObj = getStorage('queryObj') ? JSON.parse(getStorage('queryObj')) : null;
+	let urlObj = queryObj || util.getUrlParams(location.href) || {};
+	let brandId = urlObj.special_ID || $config.brandId || ''
+    return {
+        session: urlObj.session || '',
+        // 项目id,默认仙女山项目
+        houseId: urlObj.xcxHouseId || '',
+        userId: urlObj.leavePhoneCustomerId || '',
+        openId: urlObj.openid || '',
+        brandId: brandId || '',
+        product: urlObj.xcxHouseId || '',
+        fromPlatform: urlObj.fromProduce || '',
+        platform: urlObj.platform || '',
+        scene: urlObj.scene1 || '',
+		layoutName: urlObj.layoutName || '',
+    }
+}
+/**
+ * 发送ws连接请求
+ */
+function connectSend(openid, userid, houseId) {
+    console.log('建立ws通信', openid, userid, houseId)
+    const param = [
+        "CONNECT" +
+        "\nopenId:" +
+        openid +
+        "\nplatform:" +
+        "1" +
+        "\nhouseId:" +
+        houseId +
+        "\nuserId:" +
+        userid +
+        "\naccept-version:1.1,1.0\nheart-beat:5000,5000\n\n\u0000",
+    ];
+    websocketsend(JSON.stringify(param));
+}
+
+/**
+ * 重新连接ws
+ */
+function reconnect() {
+    console.log('重新连接ws');
+    //重新连接
+    if (wsConfig.lockReconnect) {
+        return;
+    }
+    wsConfig.lockReconnect = true;
+    //没连接上会一直重连,设置延迟避免请求过多
+    wsConfig.timeoutnum && clearTimeout(wsConfig.timeoutnum);
+    wsConfig.timeoutnum = setTimeout(() => {
+        //新连接
+        initWebsocket()
+        wsConfig.lockReconnect = false
+    }, 5000)
+}
+
+/**
+ *  重置ws连接
+ */
+function reset() {
+    console.log('重置ws', wsConfig)
+    //重置心跳
+    clearTimeout(wsConfig.timeoutObj);
+    //清除时间
+    clearTimeout(wsConfig.serverTimeoutObj);
+    //重启心跳
+    start();
+}
+
+/**
+ * 开启ws连接
+ */
+function start() {
+    let ws = wsConfig.ws;
+    //开启心跳
+    console.log("开启心跳", wsConfig);
+    wsConfig.timeoutObj && clearTimeout(wsConfig.timeoutObj);
+    wsConfig.serverTimeoutObj && clearTimeout(wsConfig.serverTimeoutObj);
+    wsConfig.timeoutObj = setTimeout(function() {
+        //这里发送一个心跳,后端收到后,返回一个心跳消息,
+        if (ws.readyState == 1) {
+            //如果连接正常
+            // websock.send("heartCheck"); //这里可以自己跟后端约定
+        } else {
+            //否则重连
+            reconnect();
+        }
+        wsConfig.serverTimeoutObj = setTimeout(function() {
+            //超时关闭
+            ws.close();
+        }, wsConfig.timeout);
+    }, wsConfig.timeout);
+}
+var util = {
 	dateFormat(date, fmt) {
 		let ret
 		const opt = {
@@ -225,7 +417,7 @@ var util = {
 			// return data;
 			// app.globalData.session_id = data.session
 			// app.globalData.sessionTime = timeNow;
-			requestConfig('upload', data, true);
+			// requestConfig('upload', data, true);
 			// let param = ["SEND" +
 			// 	"\nproject:" + "elab-marketing-system" + 
 			// 	"\nmethod:" + 'POST' +
@@ -236,6 +428,22 @@ var util = {
 			// ];
 			// app.wsSendOrder(param,data);//socket 消息发送
 			console.warn("***mook***", (data.pvId || data.clkId || data.eventId), data)
+			let param = [
+			    "SEND" +
+			    "\nproject:" +
+			    "elab-marketing-system" +
+			    "\nmethod:" +
+			    "POST" +
+			    "\npath:" +
+			    "/behavior/brandMiniWeb/upload" +
+			    "\ndestination:" +
+			    "/ws/remote/invoke" +
+			    "\n\n" +
+			    JSON.stringify(data) +
+			    "\u0000",
+			];
+			console.log("上报埋点数据", param);
+			websocketsend(JSON.stringify(param));
 		} catch (e) {
 			console.warn("***util.js-onError***", e);
 		}
@@ -249,6 +457,7 @@ var util = {
 		})
 		return session;
 	},
+	initWebsocket:initWebsocket,
 };
 window.from_session = util.getUrlParams(location.href).session || '';
 window.from_cookie = util.getUrlParams(location.href).cookie || '';