暖心人
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

269 lines
0 B

2 years ago
<template>
<view class="body-background"></view>
<u-navbar
:title="title"
:auto-back="true"
left-icon-size="40rpx"
:safe-area-inset-top="true"
:placeholder="true"
bgColor="#fff"
></u-navbar>
<u-swiper
:list="detail.images"
height="720"
></u-swiper>
<view class="detail-container">
<view class="detail-item price row ">
<view class="price-container row pad-26">
2 years ago
<u-text mode="price" size="48" color="#FF9545" custom-style="margin-right:5rpx;" :text="detail.price" :format="$u.priceFormat"></u-text>
2 years ago
<u-text size="28" color="#FF9545" text="元/月"></u-text>
</view>
<view class="street pad-26">
<u-text size="28" color="#178AF2" :text="detail.street"></u-text>
</view>
<view class="item-desc row pad-26">
<view class="item">
<view class="title">
<u-text align="center" size="36" color="#020B18" :text="detail.bedroom_number+'室'"></u-text>
</view>
<view class="desc">
<u-text align="center" size="28" color="#AFB5BE" text="整租"></u-text>
</view>
</view>
<view class="item">
<view class="title">
<u-text align="center" size="36" color="#020B18" :text="detail.area+'㎡'"></u-text>
</view>
<view class="desc">
<u-text align="center" size="28" color="#AFB5BE" text="使用面积"></u-text>
</view>
</view>
<view class="item">
<view class="title">
<u-text align="center" size="36" color="#020B18" :text="'朝'+detail.toward"></u-text>
</view>
<view class="desc">
<u-text align="center" size="28" color="#AFB5BE" text="朝向"></u-text>
</view>
</view>
<view class="item">
<view class="title">
<u-text align="center" size="36" color="#020B18" :text="detail.year+'年'"></u-text>
</view>
<view class="desc">
<u-text align="center" size="28" color="#AFB5BE" text="建设时间"></u-text>
</view>
</view>
</view>
<view class="tags row pad-26">
<view class="tag">{{detail.payment_cycle}}</view>
<view class="tag">{{detail.payment_type}}</view>
2 years ago
<view class="tag" v-for="tag in detail.rental_overview" v-show="tag.is_have">
{{ tag.text }}
2 years ago
</view>
</view>
<view class="hr"></view>
<view class="address row pad-26">
2 years ago
<u-text size="32" color="#020B18" :text="detail.address" custom-style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; "></u-text>
2 years ago
<view class="address-btn" @click="callLocation">
2 years ago
<u-image mode="widthFix" width="50" height="50" :src="staticImage.mapPosition"></u-image>
2 years ago
</view>
</view>
</view>
2 years ago
<view class="detail-item info">
<view class="cell-two-container row">
<view class="cell-border"></view>
<view class="cell-title">
公寓兑换说明
</view>
</view>
<view class="body">
<view class="item row" style="margin-bottom:20rpx;">
<u-text line-height="40" text="1、丰行侠需在小程序选定公寓后,在线下签订租房协议,并支付房租;" color="#020b18" size="28"></u-text>
</view>
<view class="item row" style="margin-bottom:20rpx;">
<u-text line-height="40" text="2、在小程序点击暖新币兑换,上传支付凭证和租赁协议提交审核;" color="#020b18" size="28"></u-text>
</view>
<view class="item row" style="margin-bottom:20rpx;">
<u-text line-height="40" text="3、街道对丰行侠提交的暖新币兑换进行审核;" color="#020b18" size="28"></u-text>
</view>
<view class="item row">
<u-text line-height="40" text="4、审核通过后,丰行侠可在每月指定时间(请留意小程序首页消息提醒)前往社区领取暖新币兑换金额;" color="#020b18" size="28"></u-text>
</view>
</view>
</view>
2 years ago
<view class="detail-item info">
<view class="cell-two-container row">
<view class="cell-border"></view>
<view class="cell-title">
租住概况
</view>
</view>
<view class="body">
<view class="item row">
2 years ago
<view class="check-item row col-6" v-for="item in detail.rental_overview">
2 years ago
<u-icon :name="item.is_have?'checkmark':'close'" size="40" :color="item.is_have?'#FF9545':'#AFB5BE'" custom-style="margin-right:20rpx;"></u-icon>
2 years ago
<u-text size="28" color="#020B18" :text="item.text"></u-text>
2 years ago
</view>
</view>
</view>
</view>
<view class="detail-item detail">
<view class="cell-two-container row">
<view class="cell-border"></view>
<view class="cell-title">
房屋详情
</view>
</view>
<view class="body">
<view class="item row">
2 years ago
<view class="sub-title col-12">家具情况</view>
<view class="check-item row col-6" v-for="item in detail.furniture">
2 years ago
<u-icon :name="item.is_have?'checkmark':'close'" size="40" :color="item.is_have?'#FF9545':'#AFB5BE'" custom-style="margin-right:20rpx;"></u-icon>
2 years ago
<u-text size="28" color="#020B18" :text="item.text"></u-text>
2 years ago
</view>
2 years ago
<view class="sub-title col-12">家电情况</view>
<view class="check-item row col-6" v-for="item in detail.jiadian">
2 years ago
<u-icon :name="item.is_have?'checkmark':'close'" size="40" :color="item.is_have?'#FF9545':'#AFB5BE'" custom-style="margin-right:20rpx;"></u-icon>
2 years ago
<u-text size="28" color="#020B18" :text="item.text"></u-text>
2 years ago
</view>
</view>
</view>
</view>
</view>
<view class="foot-button border-box row">
<follow :is_collect="detail.is_collect" :id="detail.id" type="house"></follow>
2 years ago
<view class="button-group">
<view class="button phone ">
<u-icon name="phone-fill" size="32" color="#000" custom-style="margin-right:10rpx;"></u-icon>
2 years ago
<u-text size="32" color="#020B18" text="电话联系" @click="callPhone"></u-text>
2 years ago
</view>
<view class="button exchange" v-if="(detail.is_vacant !== 2)">
2 years ago
<u-text size="32" color="#020B18" text="暖新币兑换" @click="navTo('/pages/Order/detail?type=create&id='+detail.id+'&rent='+detail.price,true)"></u-text>
2 years ago
</view>
</view>
</view>
</template>
<script>
import api from "@/utils/functions.js";
import {roomDetail} from "@/api/shop";
2 years ago
import {systemConfig} from "@/api/other";
2 years ago
import {imghost} from "@/config/host";
import follow from "@/components/Follow/index.vue";
2 years ago
export default {
computed: {
},
components: {
follow
2 years ago
},
2 years ago
data() {
return {
title: '公寓详情',
size:{
height:0
},
detail:{
id:'',
images:'',
price:'',
street:'',
bedroom_number:'',
area:'',
toward:'',
year:'',
payment_cycle :'',
payment_type:'',
address:'',
coordinate:'',
rental_overview:'',
jiadian:'',
furniture:'',
tel:'',
2 years ago
},
all:{
rental_overview:[],
furniture:[],
jiadian:[],
2 years ago
},
staticImage:{
mapPosition:imghost+'/map-position.png'
2 years ago
}
}
},
onLoad(option) {
this.getDetail(option.id)
},
onReady(){
this.size.height = api.navHeight().navigationBar + api.navHeight().systemBar
},
methods: {
2 years ago
navTo(url,token = false) {
if(token){
if(uni.getStorageSync('token')){
wx.navigateTo({
url: url
})
}else{
wx.navigateTo({
url: '/pages/Login/index'
})
}
}else{
wx.navigateTo({
url: url
})
}
2 years ago
},
2 years ago
getDetail(id){
roomDetail({
house_id:id
}).then(res => {
2 years ago
res.data.coordinate = res.data.coordinate.split(',')
2 years ago
this.detail = res.data;
});
2 years ago
},
getInfo(){
systemConfig({type:'rental_overview'}).then(res => {
this.all.rental_overview = res.data;
});
systemConfig({type:'furniture'}).then(res => {
this.all.furniture = res.data;
});
systemConfig({type:'jiadian'}).then(res => {
this.all.jiadian = res.data;
});
},
callPhone(){
uni.makePhoneCall({
phoneNumber: this.detail.tel?.toString()
});
},
callLocation(){
uni.openLocation({
2 years ago
latitude:parseFloat(this.detail.coordinate[1]),
longitude:parseFloat(this.detail.coordinate[0]),
2 years ago
name:this.detail.address,
})
2 years ago
console.log(this.detail)
2 years ago
},
2 years ago
},
onPageScroll(res) {
},
created() {
},
mounted() {
2 years ago
this.getInfo();
2 years ago
},
}
</script>
<style lang="scss">
@import './components/index.scss';
</style>