zjs_project 1 year ago
parent
commit
1de746ea7a

+ 5 - 15
src/pages/webgl_rxdz_env/webgl_rxdz_env.vue

@@ -150,24 +150,14 @@
 					});
 					let envData = getStorage('envData') ? JSON.parse(getStorage('envData')) : null;
 					this.tabData = list;
+					this.tabData[0].checkedIndex = 0;
+					this.optionIndex = 0;
+					this.options = this.tabData[0].options; //选项数据
+					this.AIImg = this.tabData[0].options[0].imageUrl;//AI生成所需的垫图
+					this.aiImagesList = this.tabData[0].options[0].hardboundEffect;
 					if(envData && envData.length>0){
-						envData.forEach((it,index)=>{
-							this.tabData[index].checkedIndex = it;
-						})
-						this.tabIndex = 0;
-						this.optionIndex = envData[0];
-						
-						this.options = this.tabData[this.tabIndex].options; //选项数据
-						this.AIImg = this.tabData[this.tabIndex].options[this.optionIndex].imageUrl;//AI生成所需的垫图
-						this.aiImagesList = this.tabData[this.tabIndex].options[this.optionIndex].hardboundEffect;
-						this.allSelect = !this.tabData.some(it=>it.checkedIndex==-1);
 						removeItem('envData');//用完后删除
 					}else{
-						this.tabData[0].checkedIndex = 0;
-						this.optionIndex = 0;
-						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()
 					}
 					

+ 8 - 5
src/pages/webgl_rxdz_text_customize/webgl_rxdz_text_customize.html

@@ -11,10 +11,6 @@
 					: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==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>
                         <!-- <c-img class="master-pic-img" :style="'background-color:#fff'" :src="img" mode="aspectFill"></c-img> -->
                     </el-carousel-item>
                 </el-carousel>
@@ -25,6 +21,10 @@
             </div>
 			<div class="mask"></div>
 			<img class="text-img" src="https://dm.static.elab-plus.com/miniProgram/text-img.png" mode="widthFix"/>
+			<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>
             <div class="tabList rows flex-start">
 				<div @click="changeTab(index)" class="tab-item columns" :class="{'tabActive': tabIndex == index}" 
 					v-for="(tab,index) in tabData" :key="index" >
@@ -47,7 +47,7 @@
 					<div class="font52 wiriting-text">{{layoutStruct.houseName || ''}}</div>
 				</div>
 			</div> -->
-			<div class="title">金融岛 · 我的梦想设计</div>
+			<div class="title">{{layoutStruct.houseName}} · 我的梦想设计</div>
             <!-- 文字信息区域 -->
             <div class="info-bar">
 				<div class="info-item" v-for="(item,index) in expand" :key="index">
@@ -158,6 +158,9 @@
 			<div class="btn rows justify-center" @click="sendPhone">确定</div>
 		</div>
 	</div>
+	<div class="pop-shareImg" v-if="showPopup">
+		<img class="share-img" @click="showPopup = false;" src="https://dm.static.elab-plus.com/miniProgram/shareImg.png" mode="widthFix" />
+	</div>
 	<!-- 添加企微弹出层 -->
     <!-- <div class="f-popup-bom-container" @click.stop.prevent="showPopup=false" v-show="showPopup">
 		<div class="f-popup-view">

+ 47 - 18
src/pages/webgl_rxdz_text_customize/webgl_rxdz_text_customize.scss

@@ -45,24 +45,6 @@ page {
                 display: block;
 				object-fit: cover;
             }
-			.lookHouseView{
-				position: absolute;
-				left:276px;
-				bottom:160px;
-				width: 200px;
-				height: 76px;
-				border-radius: 38px;
-				background: rgba(0, 0, 0, 0.4);
-				font-family: "Verdana";
-				font-weight: 400;
-				font-size: 28px;
-				color: #fff;
-				.icon-ai{
-					width:46px;
-					height:46px;
-					margin-right:10px;
-				}
-			}
 
 			.indicator-view{
 				position: absolute;
@@ -104,6 +86,25 @@ page {
 		height: auto;
 		z-index: 9;
 	}
+	.lookHouseView{
+		position: absolute;
+		left:276px;
+		top:500px;
+		width: 200px;
+		height: 76px;
+		border-radius: 38px;
+		background: rgba(0, 0, 0, 0.4);
+		font-family: "Verdana";
+		font-weight: 400;
+		font-size: 28px;
+		color: #fff;
+		z-index: 9;
+		.icon-ai{
+			width:46px;
+			height:46px;
+			margin-right:10px;
+		}
+	}
     .tabList{
 		position: absolute;
 		width: 100%;
@@ -491,6 +492,16 @@ page {
 		object-fit: cover;
 	}
 }
+.pop-shareImg{
+	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-view{
 	position: fixed;
 	width: 100vw;
@@ -546,6 +557,7 @@ page {
 					color: #848484;
 					height: 40px;
 					background-color: transparent;
+					width: 70%;
 				}
 				.input-tips{
 					position: absolute;
@@ -580,6 +592,23 @@ page {
 		}
 	}
 }
+.pop-shareImg{
+	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;
+	.share-img{
+		position: absolute;
+		top: 0px;
+		right: 0px;
+		width: 454px;
+		height: 496px;
+	}
+}
 textarea::-webkit-scrollbar{
     display:none;
 }

+ 47 - 43
src/pages/webgl_rxdz_text_customize/webgl_rxdz_text_customize.vue

@@ -71,6 +71,7 @@ export default {
 			verifyCode:'',//验证码
 			verifyText:'',	//验证码提示
 			isSend:false,
+			showPopup:false,
 		}
     },
     /**
@@ -161,33 +162,31 @@ export default {
 				});
 			    return;
 			}
-		    let codeData = {
-				// mobile: this.tel,
-				// code: this.verifyCode,
-				// verifyType: 1,
+			let codeData = {
+				mobile: this.tel,
+				code: this.verifyCode,
+				verifyType: 1,
 				
 				// mobile: this.tel,
 				// type: 'verification.code',
 				// verifycode: this.verifyCode
 				
-				mobile: this.tel,
-				leavePhoneCustomerId:this.userId || '',
-				code: this.verifyCode,
-				houseId:this.houseId,
-				source:2,
-				fromPlatform:'前测',
-				terminal:'7',
-		    };
-		    const validateCodeRes = await requestConfig('leavephone', codeData);
-		    if (validateCodeRes && validateCodeRes.success) { //成功
+				// mobile: this.tel,
+				// leavePhoneCustomerId:this.userId || '',
+				// code: this.verifyCode,
+				// houseId:this.houseId,
+				// source:2,
+				// fromPlatform:'前测',
+				// terminal:'7',
+			};
+		    const validateCodeRes = await requestConfig('validate', codeData);
+		    if (validateCodeRes && !validateCodeRes.success) { //成功
 				Toast({
-					message: '留电成功',
+					message: '验证码输入错误',
 				});
 		        return
 		    } else {
-		        Toast({
-		        	message: '验证码输入错误',
-		        });
+		        this.fakeLeavePhone()
 		    }
 			this.isSend = false;
 		},
@@ -196,31 +195,35 @@ export default {
 			    brandCustomerId: this.userId || '',
 			    brandId: $config.brandId,
 			    mobile: this.tel || '',
-			    shareRoute: '',
 			    houseId: this.houseId || '',
-			    attrs: ''
+				source: 2,
+				type: 2,
+				terminal: 7
 			};
 			// 获取登录用户的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,
-				};
-				let result = await requestConfig('authorizedMobile', parm, true);
-				if(result && result.success){
-					Toast({
-						message: '留电成功',
-					});
-				}
+			const signres = await requestConfig('leavephone', signParam, true);
+			if (signres && signres.success) {
+				// 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,
+				// };
+				// let result = await requestConfig('authorizedMobile', parm, true);
+				// if(result && result.success){
+				// 	Toast({
+				// 		message: '留电成功',
+				// 	});
+				// }
+				Toast({
+					message: '留电成功',
+				});
 				this.showUserInput = false;
 			}
 			
@@ -269,9 +272,10 @@ export default {
 		},
 		share(){
 			if(window.__wxjs_environment === 'miniprogram'){
-				Toast({
-					message: '请点击右上角发起分享',
-				});
+				// Toast({
+				// 	message: '请点击右上角发起分享',
+				// });
+				this.showPopup = true;
 				// wx.miniProgram.navigateTo({url: '/pages/transfer/transfer?event=openCustomerServiceChat&houseId='+this.houseId})
 			}else{
 				// window.location.href = shottingImg;

+ 1 - 1
src/services/requestConfig.js

@@ -54,7 +54,7 @@ const endpoints = {
 	authorizedMobile: 'elab-marketing-user/applet/auth_mobile', //解密手机号接口
 	generateShareSign: 'elab-marketing-user/brand/shareSign/generateShareSign',//用户信息加密 获取 秘钥
 	submitAnswer: 'elab-marketing-content/question/submitAnswer',//答题
-	leavephone: 'elab-marketing-user/contact/leavephone/web/insert',//web留电
+	leavephone: 'elab-marketing-user/brandXcx/leavePhone',//web留电
 	// predictions: "https://api.replicate.com/v1/deployments/feathers-wing/spacely-realistic-style-softedge-a100/predictions", // 分享查看
 };
 /**