|
@@ -4,7 +4,7 @@
|
|
|
<swiper class="swiper" circular :indicator-dots="true">
|
|
|
<swiper-item v-for="item in responsibility" :key="item.id">
|
|
|
<view class="swiper-item-box">
|
|
|
- <image class="image" :src="item.url" mode="aspectFill">
|
|
|
+ <image class="image" :src="item.url" mode="aspectFill" @click="openImage(item)">
|
|
|
</image>
|
|
|
<view class="open-video-icon" v-if="item.fileType === 'video'" @click="openVideo(item)">
|
|
|
<uni-icons type="icon-bofang" custom-prefix="iconfont" color="rgba(255, 255, 255, 0.6)"
|
|
@@ -64,7 +64,7 @@
|
|
|
</view>
|
|
|
<view class="information-box" style="margin-bottom: 0;">
|
|
|
<text class="information-title">产权证书:</text>
|
|
|
- <text class="information-text">{{detail.propertyCertificateNumber}}</text>
|
|
|
+ <text class="information-text">{{detail.propertyCertificateNumber?'有':'无'}}</text>
|
|
|
</view>
|
|
|
<view class="information-box" style="margin-bottom: 0;">
|
|
|
<text class="information-title">是否装修:</text>
|
|
@@ -74,13 +74,13 @@
|
|
|
<view class="content-title">房源简介</view>
|
|
|
<view class="desc-text" v-html="detail.introduce"></view>
|
|
|
<view class="people-tell">
|
|
|
- <image class="people-avatar" :src="detail.chargePersonPortrait" mode="aspectFill"
|
|
|
- @click="$navigateTo('/pages/person/person?userId='+detail.chargePersonId)"></image>
|
|
|
- <view class="people-text" @click="$navigateTo('/pages/person/person?userId='+detail.chargePersonId)">
|
|
|
+ <avatar class="people-avatar"
|
|
|
+ :user="{portrait:detail.chargePersonPortrait,name:detail.chargePersonName}"
|
|
|
+ @click="$navigateTo('/pages/person/person?userId='+detail.chargePersonId)" :size="34">
|
|
|
+ </avatar>
|
|
|
+ <view class="people-text" @click="$navigateTo('/pages/person/person?userId=' + detail.chargePersonId)">
|
|
|
<view class="people-name">{{detail.chargePersonName}}</view>
|
|
|
- <view class="people-organization">
|
|
|
- 组织名称
|
|
|
- </view>
|
|
|
+ <view class="people-organization">{{detail.organizationName||'-'}}</view>
|
|
|
</view>
|
|
|
<view class="people-icon" @click="tell">
|
|
|
<uni-icons type="phone-filled" color="#fff"></uni-icons>
|
|
@@ -107,6 +107,7 @@
|
|
|
<view class="visitor-item" v-for="(item,index) in visitorList" :key="index">
|
|
|
<image class="visitor-avatar" :src="item.userPortrait" mode="aspectFill">
|
|
|
</image>
|
|
|
+
|
|
|
<text class="visitor-label">{{item.userName}}访问了房源</text>
|
|
|
<uni-dateformat class="visitor-time" :date="item.date" :threshold="[60000,3600000 * 24 * 365]">
|
|
|
</uni-dateformat>
|
|
@@ -122,15 +123,18 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="hui-button-box">
|
|
|
- <view class="hui-button hui-button-light"
|
|
|
- @click="$navigateTo('/pages/reservation/reservation?houseId=' + houseId)">
|
|
|
- <uni-icons class="hui-button-icon" type="calendar" color="#08979c" size="22"></uni-icons> 预约看房
|
|
|
- </view>
|
|
|
- <view class="hui-button"
|
|
|
- @click="$navigateTo('/pages/chat/chat?userId='+detail.chargePersonId+'&userName='+detail.chargePersonName)">
|
|
|
- <uni-icons class="hui-button-icon" type="chat" color="#fff" size="22"></uni-icons>
|
|
|
- 在线联系
|
|
|
+ <view class="hui-button-view">
|
|
|
+ <view class="hui-button hui-button-light"
|
|
|
+ @click="$navigateTo('/pages/reservation/reservation?houseId=' + houseId)">
|
|
|
+ <uni-icons class="hui-button-icon" type="calendar" color="#08979c" size="22"></uni-icons> 预约看房
|
|
|
+ </view>
|
|
|
+ <view class="hui-button"
|
|
|
+ @click="$navigateTo('/pages/chat/chat?userId='+detail.chargePersonId+'&userName='+detail.chargePersonName)">
|
|
|
+ <uni-icons class="hui-button-icon" type="chat" color="#fff" size="22"></uni-icons>
|
|
|
+ 在线联系
|
|
|
+ </view>
|
|
|
</view>
|
|
|
+ <uv-safe-bottom></uv-safe-bottom>
|
|
|
</view>
|
|
|
<uni-popup ref="popup" type="bottom" mask-background-color="rgba(0,0,0,0.8)">
|
|
|
<video id="myVideo" v-if="videoUrl" :src="videoUrl" controls autoplay>
|
|
@@ -143,7 +147,7 @@
|
|
|
<script>
|
|
|
import {
|
|
|
dayjs
|
|
|
- } from '../../uni_modules/iRainna-dayjs/js_sdk/dayjs.min';
|
|
|
+ } from '@/uni_modules/iRainna-dayjs/js_sdk/dayjs.min';
|
|
|
import {
|
|
|
getHouseDetailById,
|
|
|
insertVisitor,
|
|
@@ -153,6 +157,7 @@
|
|
|
getHouseEvaluateListByPage,
|
|
|
insertEvaluate
|
|
|
} from '@/request/api/house.js'
|
|
|
+ import avatar from '@/components/common/avatar.vue';
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -177,6 +182,9 @@
|
|
|
videoUrl: ''
|
|
|
}
|
|
|
},
|
|
|
+ components: {
|
|
|
+ avatar
|
|
|
+ },
|
|
|
onLoad(body) {
|
|
|
if (body.houseId) this.houseId = body.houseId;
|
|
|
this.coordinates = this.$store.getters.coordinates;
|
|
@@ -257,6 +265,19 @@
|
|
|
this.videoUrl = item.videoUrl;
|
|
|
this.$refs.popup.open('center');
|
|
|
},
|
|
|
+ openImage(item) {
|
|
|
+ if (item.fileType !== 'image') return;
|
|
|
+ let imageList = this.responsibility.filter(node => node.fileType === 'image');
|
|
|
+ let current = imageList.findIndex(node => node.id == item.id);
|
|
|
+ uni.previewImage({
|
|
|
+ urls: imageList.map(node => node.url),
|
|
|
+ current: current,
|
|
|
+ longPressActions: {
|
|
|
+ success: function(data) {},
|
|
|
+ fail: function(err) {}
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
getTree(data) {
|
|
|
let result = [];
|
|
|
let map = {};
|
|
@@ -298,8 +319,9 @@
|
|
|
|
|
|
},
|
|
|
tell() {
|
|
|
+ if (!this.detail.chargePersonPhone) this.$toast('该用户暂未提供手机号');
|
|
|
uni.makePhoneCall({
|
|
|
- phoneNumber: '17601274604' //仅为示例
|
|
|
+ phoneNumber: this.detail.chargePersonPhone
|
|
|
});
|
|
|
},
|
|
|
roomCollection() {
|
|
@@ -516,6 +538,7 @@
|
|
|
height: 90rpx;
|
|
|
border-radius: 50%;
|
|
|
margin-right: 30rpx;
|
|
|
+ overflow: hidden;
|
|
|
}
|
|
|
|
|
|
.people-text {
|
|
@@ -603,6 +626,7 @@
|
|
|
width: 0;
|
|
|
overflow: hidden;
|
|
|
white-space: nowrap;
|
|
|
+ text-overflow: ellipsis;
|
|
|
font-weight: 300;
|
|
|
}
|
|
|
}
|