<template>
	<view class="container">
		<view class="pic-wrap" >
			<u-swiper height="460" @click="preview" :list="picList" :autoplay="true" mode="number" indicator-pos="bottomRight"></u-swiper>
		</view>
		<view class="house-info">
			<view class="top-cont">
				<view class="title" @click="tomap"><view class="u-line-1">莲竹花园8号楼1层莲竹花园8号楼1层莲竹花园8号楼1层</view>
					 <image class="map" src="/static/czDetail/map.png" mode="" /></view>
				<view class="call-info" @click="call">
					<image class="call" src="/static/czDetail/call.png" mode="" />杜鹏飞
				</view>
			</view>
			<view class="mid-cont">
				<view class="item">
					<view class="item-val">2改3</view>
					<view class="item-type">房型</view>
				</view>
				<view class="item">
					<view class="item-val">正规间</view>
					<view class="item-type">户型</view>
				</view>
				<view class="item">
					<view class="item-val">18㎡</view>
					<view class="item-type">面积</view>
				</view>
			</view>
			<view class="bot-cont">
				<view class="item-btn color1">改价历史</view>
				<view class="item-btn color2">改价审核</view>
				<view class="item-btn color3">成交合同</view>
			</view>
		</view>
		<view class="detail-info">
			<view class="info-item"><view class="label">台账号：</view>刘572A</view>
			<view class="info-item"><view class="label">区域：</view>空巷</view>
			<view class="info-item"><view class="label">部门：</view>二区五部</view>
			<view class="info-item"><view class="label">代理人：</view>杜鹏飞</view>
			<view class="info-item"><view class="label">剩余期限：</view>10个月</view>
			<view class="info-item"><view class="label">截止日期：</view>2023-03-20</view>
		</view>
		<!-- 房间信息 -->
		<view class="room-info">
			<view class="title">房间信息</view>
			<view class="item" v-for="(item,index) in roomList" :key="index">
				<view class="left">
					<image class="sex"  v-if="item.sex==0" src="/static/czDetail/man.png" mode="" />
					<image class="sex" v-else src="/static/czDetail/woman.png" mode="" />
					<view class="number">{{item.number}}</view>
					<view class="other-info">卧·宁371A｜{{item.area||0}}㎡｜{{item.direction||''}}</view>
				</view>
				<view class="right">
				{{item.sex==0?'男':'女'}}｜{{item.zhiye||''}}
				</view>
			</view>
		</view>
		<view class="bottom-box">
			<view class="item">
				<image class="item-icon" src="/static/czDetail/money.png" mode="" />
				<view class="item-text">改价申请</view>
			</view>
			<view class="line"></view>
			<view class="item">
				<image class="item-icon" src="/static/czDetail/lock.png" mode="" />
				<view class="item-text">门锁密码</view>
			</view>
			<view class="line"></view>
			<view class="item">
				<image class="item-icon" src="/static/czDetail/money1.png" mode="" />
				<view class="item-text">收定</view>
			</view>
			<view class="line"></view>
			<view class="item">
				<image class="item-icon" src="/static/czDetail/book.png" mode="" />
				<view class="item-text">带看历史</view>
			</view>
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				picList: [
						'https://cdn.uviewui.com/uview/swiper/1.jpg',
					 'https://cdn.uviewui.com/uview/swiper/2.jpg',
					'https://cdn.uviewui.com/uview/swiper/3.jpg',
				],
				roomList: [{
					area: '20',
					direction: '朝南',
					sex: '0',
					zhiye : '白领',
					number: '01'
				},{
					area: '13',
					direction: '朝南',
					sex: '0',
					zhiye : '学生',
					number: '02'
				},{
					area: '23',
					direction: '朝南',
					sex: '1',
					zhiye : '白领',
					number: '03'
				}],
				detailInfo: {
					account: '',

				}
			};
		},
		onLoad(options) {
		},
		onShow() {
		
		},
		methods: {
			topage(){
				// uni.navigateTo({
				// 	url: "/pages/merchant/merchant",
				// });
			},
			tomap(){
				const latitude = 39.9219
				const longitude = 116.44355
				wx.openLocation({
					latitude,
					longitude,
					name: '望京soho',
					scale: 18
				})
			},
			call(){
				wx.makePhoneCall(
					{
						phoneNumber: '18339694416'
					}
				)
			},
			preview(e){
				// console.log(e)
				let that = this
				wx.previewImage({
						current: that.picList[e], // 当前显示图片的http链接
						urls: that.picList // 需要预览的图片http链接列表
					})
			}
		},

		onLoad: function(options) {
		},
		onHide: function() {},
	};
</script>

<style lang="scss" scoped>
.container{
	width: 750rpx;
	min-height: 100vh;
	background: #f8f8f8;
	padding-bottom: 210rpx;
	.pic-wrap{
		width: 750rpx;
		height: 460rpx;
	}
	.house-info{
		padding: 30rpx;
		margin-bottom: 20rpx;
		background: #fff;
		.top-cont{
			display: flex;
			justify-content: space-between;
			align-items: center;
			.title{
				max-width: 460rpx;
				height: 44rpx;
				font-size: 32rpx;
				font-family: PingFangSC-Medium, PingFang SC;
				font-weight: 500;
				color: #333333;
				line-height: 44rpx;
				letter-spacing: 1rpx;
				display: flex;
				align-items: center;
				.map{
					flex: 0 0 32rpx;
					width: 32rpx;
					height: 32rpx;
					margin-left: 12rpx;
				}
			}
			.call-info{
				height: 42rpx;
				font-size: 30rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #333333;
				line-height: 42rpx;
				display: flex;
				align-items: center;
				.call{
					width: 38rpx;
					height: 38rpx;
					margin-right: 12rpx;
				}
			}
		}
		.mid-cont{
			margin: 28rpx 0;
			display: flex;
			align-items: center;
			justify-content: space-around;
			.item{
				display: flex;
				flex-direction: column;
				align-items: center;
				justify-content: center;
				.item-val{
					height: 44rpx;
					font-size: 32rpx;
					font-family: PingFangSC-Medium, PingFang SC;
					font-weight: 500;
					color: #FF6D25;
					line-height: 44rpx;
					margin-bottom: 10rpx;
				}
				.item-type{
					height: 40rpx;
					font-size: 28rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #666666;
					line-height: 40rpx;
				}
			}
		}
		.bot-cont{
			display: flex;
			justify-content: space-around;
			align-items: center;
			.item-btn{
				width: 210rpx;
				height: 64rpx;
				line-height:64rpx;
				text-align: center;
				font-size: 28rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #FFFFFF;
				border-radius: 8rpx;
				&.color1{
					background: #2671E2;
				}
				&.color2{
					background: #07B79D;
				}
				&.color3{
					background: #FF6D25;
				}

			}
		}
	}
	.detail-info{
		background-color: #fff;
		margin-bottom: 20rpx;
		padding: 30rpx;
		.info-item{
			display: flex;
			align-items: center;
			font-size: 28rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #333333;
			margin-bottom: 24rpx;

			.label{
				width: 140rpx;
				color: #666666;
			}
		}

	}
	.room-info{
		width: 750rpx;
		padding: 30rpx;
		background: #fff;
		.title{
			height: 44rpx;
			font-size: 32rpx;
			font-family: PingFangSC-Medium, PingFang SC;
			font-weight: 500;
			color: #333333;
			line-height: 44rpx;
			margin-bottom: 24rpx;
		}
		.item{
			margin-bottom: 24rpx;
			width: 690rpx;
			height: 80rpx;
			line-height: 80rpx;
			background: #F8F8F8;
			border-radius: 8rpx;
			padding: 30rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;
			.left{
				height: 40rpx;
				font-size: 28rpx;
				color: #333333;
				line-height: 40rpx;
				display: flex;
				align-items: center;
				.sex{
				width: 40rpx;
				height: 40rpx;
				margin-right: 12rpx;
			}
			.number{
				font-weight: 500;
				
			}
			.other-info{
				font-weight: 400;
				font-family: PingFangSC-Regular, PingFang SC;
			}
			}
			.right{
			height: 40rpx;
			font-size: 28rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #333333;
			line-height: 40rpx;
			}
			
		}

}
.bottom-box{
	position: fixed;
	/* iphonex 等安全区设置，底部安全区适配 */
	bottom: constant(safe-area-inset-bottom); /* 兼容 iOS < 11.2 */
	bottom: env(safe-area-inset-bottom); /* 兼容 iOS >= 11.2 */
	// box-sizing: content-box;
	width: 750rpx;
	height: 122rpx;
	background: #FFFFFF;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20rpx 46rpx;
	.line{
		width: 1px;
			height: 50rpx;
			background: #E0E0E0;
	}
	.item{
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		.item-icon{
			width: 40rpx;
			height: 40rpx;
			margin-bottom: 10rpx;
		}
		.item-text{
			height: 32rpx;
			font-size: 24rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #333333;
			line-height: 32rpx;
		}
	}
}
	
}
</style>
