zjs_project 1 سال پیش
والد
کامیت
4562cf329c

+ 1 - 1
src/components/mynavbar/mynavbar.html

@@ -1,4 +1,4 @@
-<div>
+<div v-if="!hide">
 	<div class="nav-wrap" :style="{'height': height?height:'64px'}">
 		<div v-if="barData.navBarColor" :style="{'position':'absolute','width':'100vw','height':height,'background-color':barData.navBarColor}"></div>
 		<div class="nav-title" :style="{'line-height':('calc('+height+' - '+statusBarHeight+')'),'color': (barData.titleColor || '#fff'),'top':statusBarHeight}">

+ 6 - 0
src/components/mynavbar/mynavbar.vue

@@ -83,11 +83,17 @@
 				specialPage: false,
 				baiduTitle: "",
 				currentSelectCity: '',
+				hide:false,
 			}
 		},
 		mounted: function() {
 			console.warn("***navbar***", this.height, this.statusBarHeight);
 			document.title = this.barData.title;
+			if (window.__wxjs_environment === 'miniprogram') {
+				this.hide = true;
+			}else{
+				this.hide = false;
+			}
 		},
 		methods: {
 			// 朋友页选择tab

+ 1 - 1
src/pages/webgl_rxdz_env/webgl_rxdz_env.scss

@@ -193,7 +193,7 @@ page {
 	bottom: 60px;
     background-image:linear-gradient(124deg, rgba(245, 201, 82, 0.5) 0%, rgba(253, 148, 41, 0.5) 100%);
     box-sizing: border-box;
-	z-index: 3;
+	z-index: 9;
 	font-family: "Verdana Bold";
 	font-weight: 700;
 	font-size: 30px;

+ 1 - 1
src/pages/webgl_rxdz_look/webgl_rxdz_look.vue

@@ -495,7 +495,7 @@
 			        id: this.id,
 			        brandId: $config.brandId,
 					houseId:this.houseId,
-					userId,
+					// userId,
 					type:'QIANCE',
 			    };
 			    const res = await requestConfig('getCustomizedRecord', params);

+ 24 - 5
src/pages/webgl_rxdz_text_customize/webgl_rxdz_text_customize.vue

@@ -65,6 +65,7 @@ export default {
 			proportion:50,	//显式比例
 			headList:[],
 			showUserInput:false,	//是否显示手机号留电弹窗
+			repeatFlag:false,	//防止重复请求
 			name:'',	//用户称呼
 			tel:'',	//手机号
 			verifyCode:'',//验证码
@@ -88,6 +89,7 @@ export default {
 			return false;
 		}else{
 			this.getIdData();
+			this.likeOrView()
 		}
     },
 	computed: {
@@ -257,7 +259,10 @@ export default {
 		},
 		share(){
 			if(window.__wxjs_environment === 'miniprogram'){
-				wx.miniProgram.navigateTo({url: '/pages/transfer/transfer?event=openCustomerServiceChat&houseId='+this.houseId})
+				Toast({
+					message: '请点击右上角发起分享',
+				});
+				// wx.miniProgram.navigateTo({url: '/pages/transfer/transfer?event=openCustomerServiceChat&houseId='+this.houseId})
 			}else{
 				// window.location.href = shottingImg;
 				var textArea = document.createElement("textarea");
@@ -285,11 +290,25 @@ export default {
 			}else if(type==2){//不喜欢
 				params.likeed = 0
 			}
+			if(this.repeatFlag){
+				return false
+			}
+			this.repeatFlag = true;
 			// params.userId = this.userId;
 			const res = await requestConfig('add', params);
-			if (res.success) {
+			if (res.success && type) {
 				this.layoutStruct.clickLike = params.likeed;
+				if(this.total){
+					if(type==1){
+						this.likeCount = this.likeCount + 1
+					}else{
+						this.unlikedCount = this.unlikedCount + 1
+					}
+					this.total ++;
+					this.proportion = parseInt((this.likeCount / (this.likeCount + this.unlikedCount))*100);
+				}
 			}
+			this.repeatFlag = false;
 		},
 		async getIdData(){
 			let userId = this.userId || '';
@@ -297,7 +316,7 @@ export default {
 				id: this.id,
 				brandId: $config.brandId,
 				houseId:this.houseId,
-				userId,
+				// userId,
 				type:'QIANCE',
 			};
 			if(this.shareUserId){//分享时 不带用户id
@@ -317,8 +336,8 @@ export default {
 				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);
+				if((this.likeCount + this.unlikedCount)>0){
+					this.proportion = parseInt((this.likeCount / (this.likeCount + this.unlikedCount))*100);
 				}
                 // this.number = single.landCode
                 this.form = single.layoutStruct[0];