|
@@ -4,6 +4,9 @@
|
|
|
<script>
|
|
<script>
|
|
|
const util = require('@/utils/util.js').default;
|
|
const util = require('@/utils/util.js').default;
|
|
|
const config = require('@/services/urlConfig.js');
|
|
const config = require('@/services/urlConfig.js');
|
|
|
|
|
+ import {
|
|
|
|
|
+ Toast
|
|
|
|
|
+ } from 'mint-ui';
|
|
|
import router from "@/router";
|
|
import router from "@/router";
|
|
|
import touchHandle from '@/mixins/touchHandle.js';
|
|
import touchHandle from '@/mixins/touchHandle.js';
|
|
|
import commonPageMethod from '@/mixins/commonPageMethod.js';
|
|
import commonPageMethod from '@/mixins/commonPageMethod.js';
|
|
@@ -55,6 +58,18 @@ export default {
|
|
|
gsImage:'',
|
|
gsImage:'',
|
|
|
layoutStruct:null,
|
|
layoutStruct:null,
|
|
|
expand: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)
|
|
console.log("***onLoad-webgl_rxdz_customize***", this.$route.query)
|
|
|
const that = this;
|
|
const that = this;
|
|
|
this.houseId = this.$route.query.houseId?this.$route.query.houseId:'';
|
|
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.id = this.$route.query.id?this.$route.query.id:'6523d91af65c626211ee21c8';
|
|
|
|
|
+ this.typeStatus = this.$route.query.typeStatus?this.$route.query.typeStatus:0;
|
|
|
if(!this.id){
|
|
if(!this.id){
|
|
|
- this.showToast("没有数据!");
|
|
|
|
|
|
|
+ Toast({
|
|
|
|
|
+ message: '没有数据!',
|
|
|
|
|
+ });
|
|
|
return false;
|
|
return false;
|
|
|
}else{
|
|
}else{
|
|
|
this.getIdData();
|
|
this.getIdData();
|
|
@@ -80,6 +97,121 @@ export default {
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
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){
|
|
swiperChangeImg(e){
|
|
|
console.log("***swiperChangeImg***",e);
|
|
console.log("***swiperChangeImg***",e);
|
|
|
this.currImgIdx = e.detail ? e.detail.current : 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'){
|
|
if(window.__wxjs_environment === 'miniprogram'){
|
|
|
wx.miniProgram.navigateTo({url: '/pages/transfer/transfer?event=openCustomerServiceChat&houseId='+this.houseId})
|
|
wx.miniProgram.navigateTo({url: '/pages/transfer/transfer?event=openCustomerServiceChat&houseId='+this.houseId})
|
|
|
}else{
|
|
}else{
|
|
|
- this.$message.warning("敬请期待");
|
|
|
|
|
|
|
+ // this.$message.warning("敬请期待");
|
|
|
|
|
+ this.showPop();
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- optionChange(){
|
|
|
|
|
|
|
+ share(){
|
|
|
if(window.__wxjs_environment === 'miniprogram'){
|
|
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{
|
|
}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 userId = this.userId || '';
|
|
|
- let params = {
|
|
|
|
|
- id: this.id,
|
|
|
|
|
- brandId: $config.brandId,
|
|
|
|
|
|
|
+ let params = {
|
|
|
|
|
+ id: this.id,
|
|
|
|
|
+ brandId: $config.brandId,
|
|
|
houseId:this.houseId,
|
|
houseId:this.houseId,
|
|
|
userId,
|
|
userId,
|
|
|
type:'QIANCE',
|
|
type:'QIANCE',
|
|
|
- };
|
|
|
|
|
|
|
+ };
|
|
|
if(this.shareUserId){//分享时 不带用户id
|
|
if(this.shareUserId){//分享时 不带用户id
|
|
|
delete params.userId
|
|
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]) {
|
|
if (res.success && res.list && res.list[0]) {
|
|
|
let single = res.list[0];
|
|
let single = res.list[0];
|
|
|
this.tabIndex = 0;//表明是户型首图
|
|
this.tabIndex = 0;//表明是户型首图
|
|
|
this.tabData = [];
|
|
this.tabData = [];
|
|
|
if(single.expand){
|
|
if(single.expand){
|
|
|
this.expand = JSON.parse(single.expand);
|
|
this.expand = JSON.parse(single.expand);
|
|
|
- // this.tabDataHandle(single.expand)
|
|
|
|
|
}
|
|
}
|
|
|
this.layoutStruct = JSON.parse(JSON.stringify(single));
|
|
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.number = single.landCode
|
|
|
this.form = single.layoutStruct[0];
|
|
this.form = single.layoutStruct[0];
|
|
|
-
|
|
|
|
|
|
|
+ this.headList = this.layoutStruct.heads || [];
|
|
|
this.hardboundEffect = this.form.layoutImgCustomized? [this.form.layoutImgCustomized] : [];//赋值轮播图
|
|
this.hardboundEffect = this.form.layoutImgCustomized? [this.form.layoutImgCustomized] : [];//赋值轮播图
|
|
|
let data = {
|
|
let data = {
|
|
|
name : this.form.layoutName,
|
|
name : this.form.layoutName,
|