zjs_project vor 1 Jahr
Ursprung
Commit
373c30d41f

+ 23 - 96
src/App.vue

@@ -1,18 +1,19 @@
 <template>
 	<div id="app">
 		<!-- IOS机器会跳转两次到其他路由,当from路由被缓存时,原因未知 -->
-		<keep-alive include="webgl_rxdz" v-if="!isIOS">
-			<router-view></router-view>
+		<keep-alive >
+			<!-- <transition name="fade"> -->
+			<router-view v-if="$route.meta.keepAlive"></router-view>
+			<!-- </transition> -->
 		</keep-alive>
-		<router-view v-else></router-view>
-		<!-- <router-view v-if="$route.meta.keepAlive==false"></router-view> -->
+		<router-view v-if="!$route.meta.keepAlive"></router-view>
 		<div class="loadingShadow" v-show="loading">
 			<div class="loadData">
 				<img src="https://skyforest.static.elaber.cn/detail/loading.gif" alt="" />
 				<div class="loadingMsg">{{loadingMsg}}</div>
 			</div>
 		</div>
-		
+
 	</div>
 </template>
 
@@ -23,11 +24,11 @@
 	} from '@/utils/localStorage';
 	export default {
 		name: "App",
-		provide() {
-			return {
-				reload: this.reload,
-			};
-		},
+		// provide() {
+		// 	return {
+		// 		reload: this.reload,
+		// 	};
+		// },
 		data() {
 			return {
 				themeColor: "rgba(0,97,232,1)",
@@ -36,23 +37,24 @@
 				showAccountView: false, //是否显示用户账号列表
 				acountList: [], //弹出层账号列表数据
 				selectAccount: null, //选中的账号
-				isIOS:false,
+				isIOS: false,
+				include: []
 			};
 		},
 		created() {
-			let userId = this.$route.query.leavePhoneCustomerId?this.$route.query.leavePhoneCustomerId:'129130';
-			if(userId){//如果存在用户id
+			let userId = this.$route.query.leavePhoneCustomerId ? this.$route.query.leavePhoneCustomerId : '129130';
+			if (userId) { //如果存在用户id
 				this.$store.dispatch('setUserId', userId);
 			}
 			let isIOS = !!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
 			this.isIOS = isIOS;
 			window.addEventListener('error', (error) => {
-			    // 区分是否是js错误
-			    if (error.message) {
-			      alert("error"+message)
-			    } else {
-			      alert('监测到E1004错误');
-			    }
+				// 区分是否是js错误
+				if (error.message) {
+					alert("error" + message)
+				} else {
+					alert('监测到E1004错误' + error);
+				}
 			}, true)
 			// window.onerror = function(message,source,line,column,error) {
 			// };
@@ -64,7 +66,8 @@
 						this.$store.state.loadingMsg = ''
 					}
 				}
-			}
+			},
+			
 		},
 		computed: {
 			loading() {
@@ -87,83 +90,7 @@
 			});
 		},
 		methods: {
-			reload() {
-				this.isRouterAlive = false;
-				this.$nextTick(function() {
-					this.isRouterAlive = true;
-				});
-			},
-			//账号获取
-			accountHandle(type = false) {
-				var acountList = getStorage('acountList') ? JSON.parse(getStorage('acountList')) : null;
-				console.warn("***acountList***", acountList);
-				if (acountList) {
-					if (acountList.length > 1) {
-						this.selectAccount = null;
-						this.acountList = acountList;
-						this.showAccountView = true;
-					} else {
-						this.showAccountView = false;
-						this.selectAccount = acountList[0];
-						removeItem('acountList'); //移除待选择列表的账号数据
-						if (type) { //页面加载时触发
-							setTimeout(() => { //等待其他组件创建好对应的事件监听
-								window.$bus.$emit("projectUpdate", this.$route.query.projectId, this
-								.selectAccount);
-								window.$bus.$emit("setAccount", this.selectAccount);
-							}, 5000);
-						} else { //页面出现时触发-非初次加载
-							window.$bus.$emit("projectUpdate", this.$route.query.projectId, this.selectAccount);
-							window.$bus.$emit("setAccount", this.selectAccount);
-						}
 
-					}
-				} else {
-					this.showAccountView = false;
-				}
-			},
-			closeFun() {
-				this.showAccountView = false;
-			},
-			//账号选择
-			accountChange(item) {
-				if (!item) {
-					return false;
-				}
-				this.selectAccount = item;
-			},
-			//确认账号选择
-			async accountConfirm() {
-				if (!this.selectAccount) {
-					this.$message.warning("请选择关联账号!");
-					return false;
-				}
-				// let userInfo = window.userInfo;
-				// userInfo['userAccount'] = this.selectAccount;
-				removeItem('acountList'); //选择好后,移除待选择列表的账号数据
-				this.showAccountView = false;
-				let res = await requestConfig('bindAdvertiser', {
-					"advertiserId": this.selectAccount.advertiserId,
-					"companyId": window.userCompanyModel.companyId,
-					"name": this.selectAccount.name,
-					"platform": this.selectAccount.platform || '',
-					"oauthType": this.getAuthType(),
-				}, false, false)
-				if (res.success) {
-					// this.$store.dispatch('setAccount',this.selectAccount);
-					window.$bus.$emit("projectUpdate", this.$route.query.projectId, this.selectAccount);
-					window.$bus.$emit("setAccount", this.selectAccount);
-					removeItem("OAUTHTYPE");
-				}
-			},
-			getAuthType() {
-				const oauthType = JSON.parse(window.localStorage.getItem('OAUTHTYPE')) || '';
-				if (oauthType) {
-					return oauthType.accountType
-				} else {
-					return "2" //默认是2
-				}
-			},
 		},
 	};
 </script>

+ 8 - 8
src/components/newBottomCom/viewCareful/viewCareful.html

@@ -2,28 +2,28 @@
 <div class="careful-view">
 	<!-- 精细调整区域 -->
 	<div class="scroll-view">
-		<div class="careful-list">
-			<div class="careful-item rows rows-between" v-for="(carefulItem,index) in carefulList" :key="carefulItem.spaceId">
-				<div class="columns rows-between" style="width: 570rem;">
-					<div class="item-top rows rows-between">
+		<div class="careful-list grid">
+			<div class="careful-item" v-for="(carefulItem,index) in carefulList" :key="carefulItem.spaceId">
+				<div class="columns rows-between" >
+					<div class="item-top rows rows-between" :class="{active:selectIndex==index}">
 						<div class="rows">
 							<div class="index-view rows justify-center">{{carefulItem.index+1}}</div>
 							<div class="name-view">{{carefulItem.name}}</div>
+							<div class="percent-view">{{carefulItem.percent}}%</div>
 						</div>
 						<div class="rows">
 							<div class="area-view">{{carefulItem.area}}㎡</div>
-							<div class="percent-view">{{carefulItem.percent}}%</div>
 						</div>
 					</div>
-					<div class="item-slider">
+					<div class="item-slider" :class="{active:selectIndex==index}">
 						<el-slider style="margin:20rem 16rem" :disabled="overChange" v-model="carefulItem.area"
 							@change="sliderChange($event,index)" :step="0.1" :show-tooltip="false"
 							:min='carefulItem.minArea' :max='carefulItem.maxArea' ></el-slider>
 					</div>
 				</div>
-				<div class="ai-btn rows justify-center" @click="goRoam(carefulItem.spaceId)">
+				<!-- <div class="ai-btn rows justify-center" @click="goRoam()">
 					美家
-				</div>
+				</div> -->
 			</div>
 			
 		</div>

+ 49 - 29
src/components/newBottomCom/viewCareful/viewCareful.scss

@@ -4,6 +4,12 @@
 	box-sizing: border-box;
 	z-index: 12;
 }
+.grid{
+	display: grid;
+	grid-template-columns: repeat(2, 1fr);;
+	grid-row-gap: 20rem;
+	grid-column-gap:50rem;
+}
 .careful-list{
 	width: 100%;
 	max-height:600rem;
@@ -15,38 +21,41 @@
 .scroll-view{
 	overflow-y: auto;
 }
-.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{
+.careful-item .item-top {
 	font-family: "Verdana Bold";
 	font-weight: 700;
 	font-size: 28rem;
 	color: #585858;
+	.index-view{
+		// width: 40rem;
+		// height: 40rem;
+		// background: #f0f0f0;
+		margin-right:10rem;
+	}
+	.name-view{
+		margin-right:15rem;
+	}
+	.percent-view{
+		font-family: "DIN Alternate Bold";
+		opacity: 0.3;
+	}
+	
+	.area-view{
+		font-family: "DIN Alternate Bold";
+		font-weight: 700;
+		font-size: 30rem;
+		color: #8D8D8D;
+	}
 }
-.area-view{
-	font-family: "DIN Alternate Bold";
-	font-weight: 700;
-	font-size: 28rem;
-	color: #e89848;
-	margin-right:50rem;
+.item-top.active {
+	color: #ff9f40;
+	.area-view{
+		color: #f5891c;
+	}
 }
-.percent-view{
-	font-family: "DIN Alternate Bold";
-	font-weight: 700;
-	font-size: 28rem;
-	color: #333;
+
+.item-slider{
+	width: 100%;
 }
 .ai-btn{
 	width: 80rem;
@@ -57,14 +66,25 @@
 	font-size: 24rem;
 	color: #f59d40;
 }
+
 /deep/ .el-slider__runway{
 	.el-slider__bar{
-		background-color: #FFAD5C;
+		background-color: #A3A3A3;
 	}
 	.el-slider__button{
-		background: #FF9B0A;
+		background: #A5A5A5;
 		border: 2px solid #fff;
 	}
 }
-
+.active{
+	/deep/ .el-slider__runway{
+		.el-slider__bar{
+			background-color: #FFAD5C;
+		}
+		.el-slider__button{
+			background: #FF9B0A;
+			border: 2px solid #fff;
+		}
+	}
+}
       

+ 7 - 3
src/components/newBottomCom/viewCareful/viewCareful.vue

@@ -16,6 +16,7 @@
 				selectItem:null,
 				carefulList:[],
 				lastCareList:[],//上一次的滑块值
+				selectIndex:0,
 			}
 		},
 		props:{
@@ -125,6 +126,8 @@
 					})
 					return false;
 				}
+				this.selectIndex = index;
+				this.$parent.$parent.selectSpaceId = item.spaceId;
 				let _area = value - parseFloat(item.area);
 				if(_area==0){
 					return false;
@@ -161,9 +164,10 @@
 				this.$parent.$parent.callBackFun = this.callBack;//向父页面注册通知回调函数
 				this.$emit("curSpaceChange",data);//通知父组件-空间面积变化
 			},
-			goRoam(spaceId){
-				// var currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
-				this.$parent.$parent.goRoam1(spaceId);
+			//去往详情页面
+			goRoam(){
+				let item = this.lastCareList[this.selectIndex];
+				this.$parent.$parent.goRoam1(item.spaceId);
 			},
 			callBack(type){
 				console.warn("***callBack***",type)

+ 27 - 10
src/components/newBottomCom/viewMask/viewMask.html

@@ -21,29 +21,39 @@
 			自动生成更多图片中{{random+'%'}}...
 	</div>
 	<!-- 切换视角 -->
-	<div class="change-angle columns" @click.stop="switchActor" v-if="aiImagesList && aiImagesList.length>0">
+	<div class="change-angle columns" @click.stop="switchActor" v-if="showAIImage==false">
 		<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="btn-view columns" v-else-if="aiImagesList && aiImagesList.length>0">
 		<!-- 下载 -->
 		<div class="compareBtn btn1" @click.stop="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.stop="showOrHideWebGl">
+		<div class="compareBtn btn1" @click.stop="showOrHideWebGl">
 			<img class="compareIcon" src="https://dm.static.elab-plus.com/miniProgram/space1/compareAI_btn.png" mode="widthFix" />
 		</div>
+		<!-- 点赞喜欢 -->
+		<div class="likeBtn columns" @click.stop="changeAIImg">
+			<div class="iconfont icon-qeuren" style="margin-bottom:10rem;font-size:30rem;"></div>
+			喜欢
+		</div>
+	</div>
+	<!-- 微信客服 -->
+	<div class="connect-view columns"
+		@click="mynavigateFuc" data-jumptype="50">
+		<img class="defaultHead" src="https://dm.static.elab-plus.com/miniProgram/iconfont/defaultHead.png" mode="widthFix"/>
+		联系定制
 	</div>
-	
 	<!-- 风格层主操作视图 -->
-	<div class="layout-view" :style="{'height':disableAble?'248rpx':'448rpx'}">
+	<div class="layout-view">
 		<!-- 手势区域 -->
-		<div class="signscoll-block"></div>
+		<!-- <div class="signscoll-block"></div> -->
 		<!-- 精装修 -->
 		<div class="aiEdit">
-			<div class="aiStyleList" :style="{'height':disableAble?'20rpx':'240rpx'}">
+			<div class="aiStyleList grid" :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}">
@@ -52,11 +62,10 @@
 					</div>
 				</div>
 			</div>
-			<div class="aiTool">
+			<!-- <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)"
@@ -68,6 +77,14 @@
 					<img class="magic-icon" src="https://dm.static.elab-plus.com/miniProgram/iconfont/magic.png" mode="widthFix"/>
 					AI生成精软装风格
 				</div>
+			</div> -->
+			<div class="btn-list rows rows-between" >
+				<div class="btn houseType rows justify-center up1" @click.stop="goback">
+					<div class="iconfont icon-danjiangongyu" style="margin-right:10rem;"></div>户型空间
+				</div>
+				<div class="btn AiBtn rows justify-center up2" @click.stop="aiSubmit(1)">
+					<div class="iconfont icon-chuangyilinggan" style="margin-right:10rem;"></div>{{aiImagesList && aiImagesList.length>0?'继续生成':'AI精软装'}}
+				</div>
 			</div>
 		</div>
 	</div>

+ 101 - 21
src/components/newBottomCom/viewMask/viewMask.scss

@@ -28,8 +28,8 @@
 	width: 72rem;
 	height: 160rem;
 	left:30rem;
-	bottom:478rem;
-	border-radius: 12rem;
+	bottom:620rem;
+	border-radius: 36rem;
 	padding:20rem 10rem;
 	background: rgba(0, 0, 0, 0.5);
 	box-sizing: border-box;
@@ -48,8 +48,8 @@
 }
 .btn-view{
 	position: absolute;
-	bottom: 478rem;
-	right: 30rem;
+	bottom: 620rem;
+	left: 30rem;
 	width: 72rem;
 	z-index: 13;
 	pointer-events: auto;
@@ -65,6 +65,22 @@
 		width: 72rem;
 		height: 72rem;
 	}
+	.likeBtn{
+		width: 72rem;
+		height: 132rem;
+		border-radius: 36rem;
+		padding:30rem 10rem;
+		background: rgba(0, 0, 0, 0.5);
+		box-sizing: border-box;
+		font-family: "Verdana Bold";
+		font-weight: 700;
+		font-size: 26rem;
+		color: #fff;
+		text-align: center;
+		justify-content:unset;
+		z-index: 13;
+		pointer-events: auto;
+	}
 	.btn1{
 		margin-bottom:20rem;
 	}
@@ -83,12 +99,12 @@
 	bottom:0rem;
 	left:0rem;
 	width: 100vw;
-	height: 448rem;
+	height: 600rem;
 	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;
+	padding:0rem 60rem;
 	box-sizing: border-box;
 	pointer-events: auto;
 	.signscoll-block{
@@ -102,7 +118,12 @@
 		left:330rem;
 	}
 }
-
+.grid{
+	display: grid;
+	grid-template-columns: repeat(4, 1fr);;
+	grid-row-gap: 20rem;
+	grid-column-gap:50rem;
+}
 .aiEdit {
 	position: relative;
 	width: 100%;
@@ -112,45 +133,45 @@
 	margin-top:60rem;
 	.aiStyleList {
 		width: 100%;
-		height: 240rem;
+		// height: 220rem;
 		/* background: #333; */
 		flex-shrink: 0;
-		white-space: nowrap;
+		// white-space: nowrap;
 
 		.scrollViewItem {
-			width: 152rem;
-			height: 100%;
-			display: inline-block;
-			margin: 0rem 10rem;
+			width: 120rem;
+			height: 168rem;
+			// display: inline-block;
+			// margin: 0rem 10rem;
 		}
 
 		.scrollViewItem:first-child {
-			margin-left: 30rem;
+			// margin-left: 30rem;
 		}
 
 		.scrollViewItem:last-child {
-			margin-right: 30rem;
+			// margin-right: 30rem;
 		}
 
 		.styleItem {
 			position: absolute;
-			width: 144rem;
+			width: 120rem;
 			// height: 100%;
 			display: flex;
 			flex-direction: column;
 			align-items: center;
-
-			/* background: red; */
 			.styleIcon {
-				width: 144rem;
-				height: 144rem;
+				width: 120rem;
+				height: 120rem;
 				background: #5c5c5c;
 				border-radius: 12rem;
 				border: 2rem solid #fff;
+				box-sizing: border-box;
 			}
 
 			.styleTitle {
-				margin-top: 20rem;
+				margin-top: 8rem;
+				height:40rem;
 				font-family: "Verdana";
 				font-weight: 400;
 				font-size: 28rem;
@@ -240,6 +261,65 @@
 		}
 	}
 }
+.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;
+	}
+	.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%);
+	}
+	
+	.houseType{
+		width: 320rem;
+		margin-left: -14rem;
+		box-shadow: 0 6rem 20rem #f2980233;
+	}
+	.AiBtn{
+		width: 320rem;
+		margin-right: -14rem;
+		box-shadow: 0 6rem 20rem #f2980233;
+	}
+}
+.connect-view{
+	position: absolute;
+	width: 72rem;
+	height: 160rem;
+	border-radius: 36rem;
+	background: rgba(0, 0, 0, 0.4);
+	bottom: 600rem;
+	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;
+	.defaultHead{
+		width: 68rem;
+		height: 68rem;
+	}
+}
 .indicator-view{
 	position: absolute;
 	z-index: 12;

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

@@ -303,6 +303,24 @@
 				console.log("***leftScroll***",this.currentIndex,this.aiImagesList.length)
 				this.aiSubmit(2);//继续生成下一张
 			},
+			//返回上一页
+			goback(){
+				this.$router.go(-1);
+			},
+			mynavigateFuc(e) {
+				if (e) {
+					let param = {
+						type: 'CLK', //埋点类型
+						clkId: 'clk_2cmina_23080408', //点击ID
+						clkName: 'WeCom_clk', //点击前往的页面名称
+						clkParams: {
+							locusName: "联系定制",
+						}
+					};
+					util.trackRequest(param);
+					this.$message.warning("敬请期待");
+				}
+			},
 			catchTapEvent:function(){
 				return false;
 			},
@@ -316,6 +334,47 @@
 				this.styleList = [];
 				if (res.success) {
 					let list = res.list;
+					list.push({
+						id:1,
+						imgUrl:"https://dm.static.elab-plus.com/aiBeauty/AI3/exPic/livingroom02.png",
+						spaceName: "客厅",
+						styleName: "现代轻奢",
+					});
+					list.push({
+						id:2,
+						imgUrl:"https://dm.static.elab-plus.com/aiBeauty/AI3/exPic/livingroom02.png",
+						spaceName: "客厅",
+						styleName: "现代轻奢",
+					});
+					list.push({
+						id:3,
+						imgUrl:"https://dm.static.elab-plus.com/aiBeauty/AI3/exPic/livingroom02.png",
+						spaceName: "客厅",
+						styleName: "现代轻奢",
+					});
+					list.push({
+						id:4,
+						imgUrl:"https://dm.static.elab-plus.com/aiBeauty/AI3/exPic/livingroom02.png",
+						spaceName: "客厅",
+						styleName: "现代轻奢",
+					});
+					list.push({
+						id:5,
+						imgUrl:"https://dm.static.elab-plus.com/aiBeauty/AI3/exPic/livingroom02.png",
+						spaceName: "客厅",
+						styleName: "现代轻奢",
+					});
+					list.push({
+						id:6,
+						imgUrl:"https://dm.static.elab-plus.com/aiBeauty/AI3/exPic/livingroom02.png",
+						spaceName: "客厅",
+						styleName: "现代轻奢",
+					});
+					// list.push(res.list[1]);
+					// list.push(res.list[1]);
+					// list.push(res.list[1]);
+					// list.push(res.list[1]);
+					// list.push(res.list[1]);
 					this.styleList = list;
 				}
 				if(!this.styleList || this.styleList.length==0){

+ 7 - 7
src/components/newBottomCom/viewShell/viewShell.html

@@ -8,23 +8,23 @@
 		</div>
 	</div>
 	<!-- 提示 -->
-	<div class="tips-view">
+	<!-- <div class="tips-view">
 		{{pageType==1?'点击进入空间':'单击圆点切换视角'}}
-	</div>
+	</div> -->
 	<!-- 放大缩小操作区域 -->
-	<div class="zoom-view" @click.stop="zoomInOut" v-if="pageType==1 && (styleType==2 || styleType==3)">
+	<div class="zoom-view" @click.stop="zoomInOut" v-if="styleType==2">
 		<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">
+	<div class="connect-view columns"
+		@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 v-if="showSignscoll" class="shell-signscoll rows justify-center" @click="upScrollOrDown" @touchstart="mytouchstart" @touchmove="mytouchmove" @touchend="mytouchend">
 		<div class="signscoll-block"></div>
-	</div>
+	</div> -->
 	<!-- 精细化视图 -->
 	<viewCareful ref="viewCareful" v-show="styleType==2" @curSpaceChange="curSpaceChange" :overChange="overChange" :curHouseObj="houseObj"></viewCareful>
 	<!-- 种子户型视图 -->

+ 3 - 3
src/components/newBottomCom/viewShell/viewShell.css

@@ -11,7 +11,7 @@
 	background: #fff;
 	box-shadow: 0 -6rem 12rem #0000001f;
 	box-sizing: border-box;
-	z-index: 15;
+	z-index: 315;
 	padding:0rem 40rem;
 	padding-top:30rem;
 	padding-bottom:60rem;
@@ -74,8 +74,8 @@
 }
 
 .zoom-view{
-	position: absolute;
-	top:-82rem;
+	position: fixed;
+	top:82rem;
 	right:30rem;
 	width: 52rem;
 	height: 52rem;

+ 6 - 6
src/components/newBottomCom/viewShell/viewShell.vue

@@ -4,7 +4,7 @@
 <script>
 	const util = require('@/utils/util.js').default;
 	// import commonMethod from '@/common/commonMethod.js';
-	import touchHandle from '@/mixins/touchHandle.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';
@@ -116,7 +116,7 @@
 			viewCareful,
 			// viewStyle,
 		},
-		mixins: [touchHandle],
+		// mixins: [touchHandle],
 		async mounted() {
 			// await this.getCityHouseList();
 			if(this.pageType==2){
@@ -192,8 +192,8 @@
 			//放大缩小
 			zoomInOut(){
 				if(this.styleType == 2){
-					this.styleType = 3;//变更为最小状态
-				}else if(this.styleType == 3){
+					this.styleType = 1;//变更为最小状态
+				}else if(this.styleType == 1){
 					this.styleType = 2;//变更为最大状态
 				}
 			},
@@ -264,7 +264,7 @@
 		}
 	}
 </script>
-<style lang="css" scoped>
-    @import "./viewShell.css";
+<style lang="scss" scoped>
+    @import "./viewShell.scss";
 	/* @import "@/common/css/common.css"; */
 </style>

+ 8 - 37
src/components/newBottomCom/viewlayout/viewlayout.css

@@ -72,42 +72,13 @@
 	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;
+
+.houseType{
+	/* width: 546rem; */
+	width: 320rem;
+	box-shadow: 0 6rem 20rem #f2980233;
 }
-.voice-gif{
-	width: 100%;
-	margin-top:-20rem;
+.AiBtn{
+	width: 320rem;
+	box-shadow: 0 6rem 20rem #f2980233;
 }

+ 11 - 2
src/components/newBottomCom/viewlayout/viewlayout.html

@@ -3,11 +3,20 @@
 <div class="layout-view">
 	<!-- 种子区域 -->
 	<div>
-		<div class="btn-list rows rows-between">
+		<div class="btn-list rows rows-between" v-if="styleType==1 || styleType==3">
 			<!-- <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 class="btn rows up justify-center" @click="upCom" :class="styleType==1?'up1':'up2'">开始定制户型 ></div>
+			
+		</div>
+		<div class="btn-list rows rows-between" v-else-if="styleType==2">
+			<div class="btn houseType rows justify-center up2" >
+				<div class="iconfont icon-danjiangongyu" style="margin-right:10rem;"></div>户型空间
+			</div>
+			<div class="btn AiBtn rows justify-center up1" @click="goRoam">
+				<div class="iconfont icon-chuangyilinggan" style="margin-right:10rem;"></div>AI精软装
+			</div>
 		</div>
 	</div>
 </div>

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

@@ -207,6 +207,9 @@
 				};
 				// util.trackRequest(param);
 			},
+			goRoam(){
+				this.$parent.$refs.viewCareful.goRoam();
+			},
 			//获取录音权限
 			getRecordAuth: function() {
 				uni.getSetting({

+ 1 - 1
src/main.js

@@ -14,7 +14,7 @@ import '@/assets/common.css'; //公共样式
 import "@/assets/font/iconfont.css"; //引用公共icon库
 // import popUpComponent from "@/components/popUpComponent/popUpComponent.js"; // 公共弹框样式
 // import previewComponent from "@/components/previewComponent/previewComponent.js"; // 公共图片视频预览
-import "@/utils/command.js"; // 自定义指令
+// import "@/utils/command.js"; // 自定义指令
 import {message} from "@/utils/resetMessage";
 
 import mynavbar from '@/components/mynavbar/mynavbar.vue'

+ 4 - 4
src/mixins/loadModel.js

@@ -28,10 +28,10 @@ export default {
 	watch: {},
 	mounted() {
 		console.warn("***loadmodel-mounted****")
-		this.dracoLoader = new DRACOLoader();
-		this.dracoLoader.setDecoderPath('/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: {
 		// 设置空间数组的墙体信息 

+ 0 - 22
src/pages/mainView/mainView.html

@@ -1,22 +0,0 @@
-
-<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"
-	 :style="{'height':canvasHeight+'px'}">
-		你的浏览器似乎不支持或者禁用了 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 v-show="showLables && gltf.text.length>0" v-for="(gltf,index) in lableItem" :key="index" class="word-view"
-	:style="{'transform':gltf.transform}" @click="goRoam(gltf)">
-		<div v-if="styleType==2" user-select="false" :class="['number-view ',(index+1)>9?'number-more':'',currentChangeSpaceId==gltf.spaceId?' active':'']">{{gltf.spaceIndex+1}}</div>
-		<div v-else user-select="false" class="word" :class="currentChangeSpaceId==gltf.spaceId?'active':''">{{gltf.text}}></div>
-	</div>
-	<!-- <div id="labels"></div> -->
-	<!-- 左侧操作区域 -->
-	<!-- <left-operate-comp @operateHandle="operateHandle"></left-operate-comp> -->
-</div>

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

@@ -1,191 +0,0 @@
-#mapDiv{
-    width: 100%;
-    height: 100vh;
-    background-color: #fff;
-}
-.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; }
-
-#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; 
-	left: 0;            
-	top: 0;
-	user-select: none;  
-	z-index: 12;
-	text-align: center;
-	border-radius: 5rem;
-}
-.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;
-}

Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 2495
src/pages/mainView/mainView.vue


+ 1 - 1
src/pages/webgl_rxdz/webgl_rxdz.html

@@ -1,7 +1,7 @@
 <div class="map" style="position: absolute;width: 100%;height: 100vh;z-index: 1;">
 	<mynavbar :barData='navbar'/>
 	<!-- 提交按钮 -->
-	<div class="submit-btn" @click="submitHouse">提交</div>
+	<div class="submit-btn" @click="submitHouse" v-if="styleType==1">提交</div>
 	
     <div id="mapDiv" ref="webgl"></div>
 	<canvas id="glcanvas" width="100vw" height="100vh" ref="glcanvas"

+ 17 - 20
src/pages/webgl_rxdz/webgl_rxdz.vue

@@ -119,7 +119,6 @@
 				isIos:false,	//是否ios手机。默认不是
 				currentChangeSpaceId:null,	//当前变化的空间id
 				styleType:1,
-				controls:null,
 			}
 		},
 		watch:{
@@ -144,25 +143,24 @@
 			cancelAnimationFrame(requestId, this.canvas)
 			this.worker && this.worker.terminate()
 			// setTimeout(() => {
-				if (this.renderer instanceof THREE.WebGLRenderer) {
-					this.renderer.dispose()
-					this.renderer.forceContextLoss()
-					this.renderer.context = null
-					this.renderer.domElement = null
-					this.renderer = null;
-					this.clearEvent()
-				}
-				this.gltfWalls = [];
-				this.gltfSpaces = [];
-				this.instancedMeshList = [];
-				this.instancedSpaceMeshList = [];
-				this.lableItem = [];
-				this.gltfLayouts = [];
-				this.instancedFurList = [];
-				this.wallList = [];
-				TWEEN && TWEEN.removeAll();//清除所有的tween;
+			if (this.renderer instanceof THREE.WebGLRenderer) {
+				this.renderer.dispose()
+				this.renderer.forceContextLoss()
+				this.renderer.context = null
+				this.renderer.domElement = null
+				this.renderer = null;
+				this.clearEvent()
+			}
+			this.gltfWalls = [];
+			this.gltfSpaces = [];
+			this.instancedMeshList = [];
+			this.instancedSpaceMeshList = [];
+			this.lableItem = [];
+			this.gltfLayouts = [];
+			this.instancedFurList = [];
+			this.wallList = [];
+			TWEEN && TWEEN.removeAll();//清除所有的tween;
 			// }, 0)
-			console.warn("***beforeDestroy-webgl_rxdz***");
 		},
         mounted() {
 			console.log("***onLoad-webgl_rxdz***", this.$route.query)
@@ -290,7 +288,6 @@
 						camera.position.y = 0;
 					}
 				});
-				// that.controls = controls;
 				// controls.target = new THREE.Vector3( that.controlStarPosition.x, that.controlStarPosition.y, that.controlStarPosition.z );;
 				stats = new Stats();
 				container.appendChild(stats.dom);

+ 6 - 44
src/pages/webgl_rxdz_roam/webgl_rxdz_roam.scss

@@ -1,8 +1,8 @@
-// .main-view{
-// 	width:100vw;
-// 	height:100vh;
-// 	overflow: hidden;
-// }
+.main-view{
+	width:100vw;
+	height:100vh;
+	overflow: hidden;
+}
 canvas { width:100vw; height:calc(100vh - 408rem);z-index: 10;}
 #mapDiv{
 	background-color: #fff;
@@ -15,51 +15,13 @@ page {
     overflow-x: hidden;
     overflow-y: hidden;
 }
-#canvas_webgl{
-	/* background: url(resources/images/daikanyama.jpg) no-repeat center center; */
-	/* background:#6d0909;
-	background-size: cover; */
-}
 /* 生成截屏的画布对象 */
 #canvas {
 	width: 100vw;
 	z-index: -1;
-	position: absolute;
+	// position: absolute;
 	left:0rem;
 }
-/* .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;
 }

+ 19 - 20
src/pages/webgl_rxdz_roam/webgl_rxdz_roam.vue

@@ -112,7 +112,7 @@
 			console.warn("***webgl_rxdz_roam-options***",this.$route.query)
 			// alert("***mounted-webgl_rxdz_roam***"+this.curHouseObj)
 			let unit = window.screen.width / 750;//单位rpm 对应 px 的值
-			this.canvasHeight = window.screen.height - (408 * unit) + (20 * unit);
+			this.canvasHeight = window.screen.height - (600 * unit) + (40 * unit);
 			this.houseId = this.$route.query.houseId?this.$route.query.houseId:'';
 			this.spaceId = this.$route.query.spaceId?this.$route.query.spaceId:'';
 			let container = this.$refs.webgl;
@@ -196,8 +196,8 @@
 					antialias:true,
 					preserveDrawingBuffer: true,
 				});
-				renderer.shadowMap.enabled = true;//产生阴影
-				renderer.shadowMap.type = THREE.PCFSoftShadowMap; // 阴影属性
+				// renderer.shadowMap.enabled = true;//产生阴影  IOS 下有阴影会导致渲染下重新执行挂载方法-页面会二次载入,不知原因
+				// renderer.shadowMap.type = THREE.PCFSoftShadowMap; // 阴影属性
 				renderer.outputEncoding = THREE.sRGBEncoding;
 				renderer.outputColorSpace = THREE.SRGBColorSpace;
 				// renderer.toneMappingExposure = 0.1;//色调映射的曝光级别。默认是1
@@ -622,23 +622,22 @@
 						presentY:chooseMesh.presentY,
 					}]
 				}
-				try{
-					boundary = new THREE.Box3(
-						new THREE.Vector3(chooseMesh.centerX/100 - chooseMesh.spaceWidth/100/2 + 0.1, 0, -chooseMesh.centerY/100 - chooseMesh.spaceHeight/100/2 + 0.1), // 边界框的最小点
-						new THREE.Vector3(chooseMesh.centerX/100 + chooseMesh.spaceWidth/100/2 - 0.1, 2.7, -chooseMesh.centerY/100 + chooseMesh.spaceHeight/100/2 - 0.1) // 边界框的最大点
-					);
-					initActor();//初始化视角
-					let data = roamPositionHandle();
-					let cameraNewPosition = data.cameraNewPosition;
-					let targetNewPosition = data.targetNewPosition;
-					creatMoveTip(cameraNewPosition);//创建移动的地标
-					camera.position.set(cameraNewPosition.x, cameraNewPosition.y, cameraNewPosition.z);
-					camera.lookAt(targetNewPosition.x,targetNewPosition.y,targetNewPosition.z);
-					controls.target.set(targetNewPosition.x,targetNewPosition.y,targetNewPosition.z);
-				}catch(e){
-					alert("***positionCamer-error***"+e)
-				}
-				
+				// try{
+				boundary = new THREE.Box3(
+					new THREE.Vector3(chooseMesh.centerX/100 - chooseMesh.spaceWidth/100/2 + 0.1, 0, -chooseMesh.centerY/100 - chooseMesh.spaceHeight/100/2 + 0.1), // 边界框的最小点
+					new THREE.Vector3(chooseMesh.centerX/100 + chooseMesh.spaceWidth/100/2 - 0.1, 2.7, -chooseMesh.centerY/100 + chooseMesh.spaceHeight/100/2 - 0.1) // 边界框的最大点
+				);
+				initActor();//初始化视角
+				let data = roamPositionHandle();
+				let cameraNewPosition = data.cameraNewPosition;
+				let targetNewPosition = data.targetNewPosition;
+				creatMoveTip(cameraNewPosition);//创建移动的地标
+				camera.position.set(cameraNewPosition.x, cameraNewPosition.y, cameraNewPosition.z);
+				camera.lookAt(targetNewPosition.x,targetNewPosition.y,targetNewPosition.z);
+				controls.target.set(targetNewPosition.x,targetNewPosition.y,targetNewPosition.z);
+				// }catch(e){
+				// 	alert("***positionCamer-error***"+e)
+				// }
 			}
 			// oldP  相机原来的位置
             // oldT  target原来的位置

+ 19 - 14
src/router/index.js

@@ -2,7 +2,7 @@ import Vue from 'vue'
 import Router from 'vue-router'
 
 // import Login from '@/pages/loginView/loginView.vue'
-import mainView from '@/pages/mainView/mainView.vue'
+// import mainView from '@/pages/mainView/mainView.vue'
 import webgl_rxdz from '@/pages/webgl_rxdz/webgl_rxdz.vue'
 import webgl_rxdz_roam from '@/pages/webgl_rxdz_roam/webgl_rxdz_roam.vue'
 import webgl_rxdz_look from '@/pages/webgl_rxdz_look/webgl_rxdz_look.vue'
@@ -10,7 +10,7 @@ import webgl_rxdz_customize from '@/pages/webgl_rxdz_customize/webgl_rxdz_custom
 
 Vue.use(Router)
 const router = new Router({
-    // mode: 'history',
+    mode: 'history',
     routes: [
         // 页面初始化
         {
@@ -52,17 +52,22 @@ const router = new Router({
 		
     ],
 })
-
-router.beforeEach((to, from, next) => {
-	console.warn("router:start-1", from,to);
-	//如果存在用户账号信息|| to.query.uid
-	next();
-	return 
-})
-//同一个路由跳转报错解决,NavigationDuplicated: Avoided redundant navigation to current location:
-const originalPush = Router.prototype.push
-Router.prototype.push = function push(location) {
-    return  originalPush.call(this,location).catch(err=>err)
-}
+// router.beforeRouteLeave = (to, from, next)=> {
+//     if (from.meta.keepAlive && !to.meta.keepAlive) {
+//       const cachedInstance = this.$refs.keepAlive.$refs.instance
+//       cachedInstance && cachedInstance.$options.beforeRouteLeave && cachedInstance.$options.beforeRouteLeave.call(cachedInstance, to, from, next)
+//     }
+//     next()
+// }
+// router.beforeEach((to, from, next) => {
+// 	// console.warn("router:start-1", from,to);
+// 	//如果存在用户账号信息|| to.query.uid
+// 	next();
+// })
+// //同一个路由跳转报错解决,NavigationDuplicated: Avoided redundant navigation to current location:
+// const originalPush = Router.prototype.push
+// Router.prototype.push = function push(location) {
+//     return  originalPush.call(this,location).catch(err=>err)
+// }
 
 export default router;

+ 0 - 40
src/services/request.js

@@ -1,7 +1,6 @@
 import store from "@/store";
 import axios from 'axios';
 import {getStorage, removeItem} from '@/utils/localStorage'
-import router from '@/router'
 var requestCount = 0; //记录下同时的请求数
 // import ElementUI from 'element-ui';
 var showToast = true;
@@ -60,45 +59,6 @@ axios.interceptors.response.use(function(response) {
 	if (requestCount < 1) {
 		store.state.loading = false;//不显示loading状态
 	}
-	//如果返回的状态码是401则需要返回到登录
-	if(error.response && error.response.status && error.response.status==401){
-		window.$bus.$off();//取消所有的订阅事件
-		removeItem('userInfoThing');
-		removeItem('currentConponent');
-		removeItem('setProgramComponetData');
-		for (let i = 0; i < window.localStorage.length; i++) {
-			let key = window.localStorage.key(i);
-			if (key.includes("currentProject")) {
-				removeItem(key);
-			}
-			if (key.includes("planItem")) {
-				removeItem(key);
-			}
-		}
-		window.$clearPermissionRole();//登出时重置权限里面记录的权限单元
-		store.dispatch('setCurrentProject',null);
-		router.push({
-			name: "Login"
-		});
-		if (showToast){
-			showToast = false;
-			// ElementUI.Message({
-			// 	message:"账号已失效",
-			// 	type:"error"
-			// });
-		}
-		error.response.message = "账号已失效";
-		error.response.data.message = "账号已失效";
-		// MessageBox.alert('账号已失效,无法登录', '提示', {
-		//           confirmButtonText: '确定',
-		//           callback: action => {
-		//               router.replace({
-		//                   name: 'Login',
-		//                   query: {redirect: router.currentRoute.fullPath} //登录后再跳回此页面时要做的配置
-		//               })
-		//           }
-		//       });
-	}
 	let result = error.response;
 	return result;
 });

+ 0 - 165
src/utils/command.js

@@ -1,165 +0,0 @@
-import Vue from 'vue';
-//
-// /**
-//  *  自定义指令
-//  */
-Vue.directive('title2',function (el, binding, vcode) {
-    el.title = el.innerText;
-})
-
-Vue.directive('title', {
-    // 钩子函数,被绑定元素插入父节点时调用 (父节点存在即可调用,不必存在于 document 中)。
-    inserted(el,binding,vcode){
-        el.focus()
-        el.title = el.innerText;
-        // console.log( 'inserted',el,binding,vcode );
-    },
-    // 只调用一次,指令第一次绑定到元素时调用,用这个钩子函数可以定义一个在绑定时执行一次的初始化动作。
-    bind(el,binding,vcode){
-        // el.title = el.innerText;
-        // console.log(el,binding,vcode);
-        // console.log( 'bind',el,binding,vcode );
-    },
-    // 所在组件的 VNode 更新时调用,但是可能发生在其孩子的 VNode 更新之前。
-    // 指令的值可能发生了改变也可能没有。但是你可以通过比较更新前后的值来忽略不必要的模板更新
-    update(el,binding,vcode){
-        // el.title = window.$(el).get(0).innerText;
-        // console.log( 'update',window.$(el), el,binding,vcode );
-    },
-    // 所在组件的 VNode 及其孩子的 VNode 全部更新时调用。
-    componentUpdated( el,binding,vcode ){
-        el.title = el.innerText;
-        // console.log( 'componentUpdated',el,binding,vcode  );
-    },
-    // 只调用一次,指令与元素解绑时调用。
-    unbind(){
-        console.log( 'unbind' );
-    }
-})
-
-/**
- * 当输入框获取到焦点时,
- * 为 show-focus 类 所在dom ,添加边框颜色类 el-focus
- * v-focus 指令必须和show-focus配合使用  否则无效
- */
-Vue.directive('focus',function (el, binding, vcode) {
-    let mtinputList = el.querySelectorAll('input')
-    if(!mtinputList){
-        mtinputList = el.querySelectorAll('textarea')
-    }
-    let mtinput = null;
-    if(!binding.value){
-        mtinput = mtinputList[0]
-
-        mtinput.onfocus = function () {
-            let dom = window.$(el).parents('.show-focus');
-            if(dom.length < 1){
-                window.$(mtinput).addClass('el-focus')
-            }else{
-                dom.addClass('el-focus');
-            }
-        }
-        mtinput.onblur = function () {
-            let dom = window.$(el).parents('.show-focus');
-            if(dom.length < 1){
-                window.$(mtinput).removeClass('el-focus')
-            }else{
-                dom.removeClass('el-focus');
-            }
-        }
-
-    }else{
-        for (let i=0; i < Number(binding.value) ; i++){
-            mtinput = mtinputList[i]
-            mtinput.onfocus = function () {
-                let dom = window.$(el).parents('.show-focus');
-                dom.addClass('el-focus');
-            }
-            mtinput.onblur = function () {
-                let dom = window.$(el).parents('.show-focus');
-                dom.removeClass('el-focus');
-            }
-        }
-    }
-
-})
-
-/**
- * 输入汉字为两个字符,英文为1个字符
- */
-Vue.directive('limitChineseMaxlength',{
-    // 钩子函数,被绑定元素插入父节点时调用 (父节点存在即可调用,不必存在于 document 中)。
-    inserted(el,binding,vcode){
-        limitCharsFun(el,binding,vcode);
-    },
-    // 只调用一次,指令第一次绑定到元素时调用,用这个钩子函数可以定义一个在绑定时执行一次的初始化动作。
-    bind(el,binding,vcode){
-        limitCharsFun(el,binding,vcode);
-    },
-    // 所在组件的 VNode 更新时调用,但是可能发生在其孩子的 VNode 更新之前。
-    // 指令的值可能发生了改变也可能没有。但是你可以通过比较更新前后的值来忽略不必要的模板更新
-    update(el,binding,vcode){
-    },
-    // 所在组件的 VNode 及其孩子的 VNode 全部更新时调用。
-    componentUpdated( el,binding,vcode ){
-        limitCharsFun(el,binding,vcode);
-    },
-    // 只调用一次,指令与元素解绑时调用。
-    unbind(){
-    }
-})
-const limitCharsFun = function (el,binding,vcode){
-    window.$(el).removeClass('is-exceed')
-    let element = el.querySelector('.el-input__count-inner');
-    let mtinputList = el.querySelectorAll('input')
-    if(!mtinputList){
-        mtinputList = el.querySelectorAll('textarea')
-    }
-    let mtinput = null;
-    mtinput = mtinputList[0]
-    let maxLength = vcode.data.attrs.maxlength;
-    if (!maxLength){
-        maxLength = 60;
-    }
-    mtinput.setAttribute('maxlength',maxLength*2)
-    // mtinput.setAttribute("style","border-color:var(--themeColor9_5)")
-    if (element){
-        element.setAttribute('style',"color:#909399")
-    }
-    let inputValue = mtinput.value || vcode.data.model.value;
-    if (common.wordLengthFilter(inputValue)> maxLength){
-        if (common.byteLengthFilter(inputValue)>maxLength * 2){
-            mtinput.value =  common.subinput(inputValue,maxLength*2);
-        }else{
-            mtinput.value =  common.subinput(inputValue,common.byteLengthFilter(inputValue));
-        }
-        mtinput.dispatchEvent(new Event("input"));//调用input事件使vue v-model绑定更新,下面相同
-    }
-    let innerText = inputValue;
-    if (element){
-        element.innerHTML = common.wordLengthFilter(innerText)+'/'+maxLength
-    }
-
-};
-
-/**
- *图片高度根据宽高比例自适应
- */
-Vue.directive('proportion', {
-    inserted: function (el, binding) {
-        var w = el.offsetWidth;
-        var h = w * binding.value;
-        el.style.height = h + 'px';
-        el.__resize = function () { update(el, binding); }
-        window.addEventListener('resize', el.__resize);
-    },
-
-    componentUpdated: function (el, binding) {
-        update(el, binding);
-    },
-
-    unbind: function (el) {
-        window.removeEventListener('resize', el.__resize);
-    }
-});
-

+ 0 - 37
src/utils/common.js

@@ -1,6 +1,5 @@
 import store from "@/store";
 import axios from 'axios';
-import router from "@/router";
 import {getStorage,setStorage} from "@/utils/localStorage";
 import '@/services/requestConfig.js'; //导入请求的拦截器
 // import emojiConfig from '@/components/emojiComponent/lib/js/config'
@@ -80,42 +79,6 @@ const common = {
 		console.warn("***account-userAccountChange0***",_account,project,uid);
 		this.userAccountChange(project,_account)
 	},
-	//切换账号,同时更新到全局变量中
-	userAccountChange(project,account){
-		if(!account){
-			console.warn("***account-userAccountChange2***",account,project);
-			window.userInfo['userAccount'] = null;//修改当前页面的
-			return false;
-		}
-		switch(account.platform){
-			case 1:
-				account['type'] = 'tencent';
-				account['typeName'] = '腾讯';
-				break;
-			case 2:
-				account['type'] = 'huge';
-				account['typeName'] = '巨量';
-				break;
-			case 3:
-				account['type'] = 'baidu';
-				account['typeName'] = '百度';
-				break;
-			default:
-				break;
-		}
-		// if((_account && account && _account.advertiserId == account.advertiserId) || (account==null && (!_account || !_account.advertiserId))){ //账号相同,则不需要更新
-		// 	console.warn("***账号相同,则不需更新***", _account,account);
-		// }
-		// else{//执行账号切换
-
-		// }
-		account.landId = project.id;//记录下当前选中账号 所属地块-因为不同地块可能有相同账号的情况
-		userInfo['userAccount'] = account;//修改当前页面的当前账号信息
-		// setStorage("userAccount", account);//更新到缓存里面-页面跳转时使用,window对象 不能跨页使用
-		console.warn("***account-userAccountChange1***",account,project);
-		//切换账号则切换路由中的uid
-		// window.mapVue.$router.push({ path: window.mapVue.$route.path, query: { uid: account.advertiserId || '' }})
-	},
 	async getLocationPOI(param) {
 		const res = await requestConfig("locationPOI", param);
 		if (res.success) {

+ 0 - 317
src/utils/interface.js

@@ -1,317 +0,0 @@
-
-/**
- * 打印错误信息
- * @param error: 错误内容
- */
-iError = function (error) {
-    Error.print(error);
-};
-
-/**
- * 注册点击事件
- * @param dom: Dom对象
- * @param handle: 处理函数
- * @param useCapture:冒泡顺序
- */
-iTapEvent = function (dom, handle, useCapture) {
-    dom && dom.addEventListener.call(dom, 'click', handle, useCapture);
-};
-
-/**
- * 取消事件冒泡
- * @param e: 事件对象
- */
-iCancelEvent = function (e) {
-    if (e && e.stopPropagation) {
-        e.stopPropagation();
-    } else {
-        window.event.cancelBubble = true;
-    }
-};
-
-/**
- * 动态创建CSS
- * @param text: CSS内容
- */
-iCreateCss = function (text) {
-    var domStyle = document.querySelector('style');
-    var domText = document.createTextNode(text);
-
-    if (domStyle) {
-        domStyle.appendChild(domText);
-    } else {
-        var domHead = document.head || document.getElementsByTagName('head')[0];
-
-        domStyle = document.createElement('style');
-        domStyle.type = 'text/css';
-
-        domStyle.appendChild(domText);
-        domHead.appendChild(domStyle);
-    }
-};
-
-/**
- * 判断是否为空
- * @param str: 字符串/对象
- * @return 是/否
- */
-iIsEmpty = function (obj) {
-    if (obj instanceof Object) {
-        for (var k in obj) {
-            return false;
-        }
-
-        return true;
-    } else {
-        return (obj == null || obj === '');
-    }
-};
-/**
- * 将JSON对象转换为JSON字符串
- * @param json: JSON对象
- * @return: JSON字符串
- */
-iJson2Str = function (json) {
-    return JSON.stringify(json);
-};
-
-/**
- * 将JSON字符串转换为JSON对象
- * @param str: JSON字符串
- * @return: JSON对象
- */
-iStr2Json = function (str) {
-    return JSON.parse(str);
-};
-
-/**
- * 打印日志
- * @param content: 日志内容
- */
-iLog = console.log.bind(console);
-/**
- * 判断是否微信浏览器
- */
-function isWeixinBrowser() {
-    var agent = navigator.userAgent.toLowerCase();
-    if (agent.match(/MicroMessenger/i) == 'micromessenger') {
-        return true;
-    } else {
-        return false;
-    }
-}
-/**
- * 验证邮箱
- * @param val: 邮箱字符串
- * @return: true(是)/false(否)
- */
-iIsEmail = function (val) {
-    var reg = /^([.a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/;
-    return reg.test(val);
-};
-/**
- * 验证是否手机号码
- * @param val: 手机号码字符串
- * @return: true(是)/false(否)
- */
-iIsPhone = function (val) {
-    var reg = /^1[\d]{10}$/;
-    return reg.test(val);
-};
-
-/**
- * 验证密码
- * @param {String} val: 密码字符串
- * @return: {Boolean} true(是)/false(否)
- */
-iIsPwd = function (val) {
-    var reg = /(?!^\d+$)(?!^[a-zA-Z]+$)[0-9a-zA-Z]{6,20}$/;
-    return reg.test(val);
-};
-/**
- * 将数字字符串转换为数字
- * @param str: 原字符串
- * @return: 数字
- */
-iInt = function (str) {
-    return parseInt(str, 10);
-};
-
-/**
- * 将浮点数字符串转换为浮点数
- * @param str: 浮点数字符串
- * @param precision: 精度(默认:2)
- * @return: 浮点数
- */
-iFloat = function (str, precision) {
-    var ret = parseFloat(str);
-
-    if (precision == null) {
-        precision = 2;
-    }
-
-    ret = ret.toFixed(precision);
-    return parseFloat(ret);
-};
-
-/**
- * 将整数格式化为指定位数的字符串
- * @param no: 整数
- * @param len: 位数
- * @return: 新字符串
- */
-iNoStr = function (no, len) {
-    var ret = String(no);
-
-    len -= ret.length;
-
-    if (len > 0) {
-        for (var i = 0; i < len; i++) {
-            ret = '0' + ret;
-        }
-    }
-
-    return ret;
-};
-/**
- * 遍历数组/对象
- * @param obj: 原数组/对象
- * @param callback: 回调函数(v:值,k:对象键字符串/数组索引)
- * @return: 回调函数返回true时的元素值
- */
-iEach = (function () {
-    var _isArrayLike = function (obj) {
-        var length = !!obj && 'length' in obj && obj.length,
-            type = iType(obj);
-
-        if (type === 'function' || obj != null && obj === obj.window) {
-            return false;
-        }
-
-        return type === 'array' || length === 0 ||
-            typeof length === 'number' && length > 0 && (length - 1) in obj;
-    };
-
-    return function (obj, callback) {
-        var k = 0;
-
-        if (!callback) {
-            return null;
-        }
-
-        if (_isArrayLike(obj)) {
-            var len = obj.length;
-
-            for (k = 0; k < len; k++) {
-                if (callback.call(obj[k], obj[k], k)) {
-                    return obj[k];
-                }
-            }
-        } else {
-            for (k in obj) {
-                if (callback.call(obj[k], obj[k], k)) {
-                    return obj[k];
-                }
-            }
-        }
-
-        return null;
-    };
-})();
-
-/**
- * 格式化日期字符串中的-为/
- * @param data: 日期(时间)字符串
- * @return: 新字符串
- */
-iFmtDate = function (data) {
-    return data.replace(/-/g, '/');
-};
-
-/**
- * 将日期时间对象转换为日期字符串
- * @param date: 日期时间对象
- * @param spt: 间隔符(默认:"-")
- * @return: 新字符串
- */
-iDate = function (date, spt) {
-    if (spt == null) {
-        spt = '-';
-    }
-
-    var year = date.getFullYear();
-    var month = date.getMonth() + 1;
-    var day = date.getDate();
-
-    return iNoStr(year, 4) + spt +
-        iNoStr(month, 2) + spt +
-        iNoStr(day, 2);
-};
-
-/**
- * 将日期时间对象转换为时间字符串
- * @param date: 日期时间对象
- * @param spt: 间隔符(默认:":")
- * @return: 新字符串
- */
-iTime = function (date, spt) {
-    if (spt == null) {
-        spt = ':';
-    }
-
-    var hour = date.getHours();
-    var minute = date.getMinutes();
-    var second = date.getSeconds();
-
-    return iNoStr(hour, 2) + spt +
-        iNoStr(minute, 2) + spt +
-        iNoStr(second, 2);
-};
-
-/**
- * 将日期时间对象转换为日期时间字符串
- * @param date: 日期时间对象
- * @param dateSpt: 日期间隔符(默认:"-")
- * @param timeSpt: 时间间隔符(默认:":")
- * @param connSpt: 日期、时间间隔符(默认:" ")
- * @return: 新字符串
- */
-iDateTime = function (date, dateSpt, timeSpt, connSpt) {
-    if (connSpt == null) {
-        connSpt = ' ';
-    }
-    return iDate(date, dateSpt) + connSpt +
-        iTime(date, timeSpt);
-};
-
-/**
- * 将当前日期时间转换为日期字符串
- * @param spt: 日期间隔符(默认:"-")
- * @return: 新字符串
- */
-iCurDate = function (spt) {
-    var date = new Date();
-    return iDate(date, spt);
-};
-
-/**
- * 将当前日期时间转换为时间字符串
- * @param spt: 时间间隔符(默认:":")
- * @return: 新字符串
- */
-iCurTime = function (spt) {
-    var date = new Date();
-    return iTime(date, spt);
-};
-
-/**
- * 将当前日期时间转换为日期时间字符串
- * @param dateSpt: 日期间隔符(默认:"-")
- * @param timeSpt: 时间间隔符(默认:":")
- * @param connSpt: 日期、时间间隔符(默认:" ")
- * @return: 新字符串
- */
-iCurDateTime = function (dateSpt, timeSpt, connSpt) {
-    var date = new Date();
-    return iDateTime(date, dateSpt, timeSpt, connSpt);
-};