<template>
	<view class="">
		<view class="card">
				<u-form :label-style="labelStyle" label-width="180" :model="form" ref="uForm">
					<u-form-item label="姓名"><u-input v-model="form.name" placeholder="暂无信息" disabled/></u-form-item>
					<u-form-item label="性别">
						<text v-text="form.sex==1?'男':'女'"></text>
					</u-form-item>
					<u-form-item label="联系方式">
						<u-input v-model="form.tel"  placeholder="暂无信息" disabled></u-input>
					</u-form-item>
					<u-form-item label="住户类型">
						<view class='cu-tag radius bg-blue' >
							<text class="" v-if="form.type==0">业主</text>
							<text class="" v-else-if="form.type==1">成员</text>
							<text class="" v-else="form.type==2">租客</text>
						</view>
					</u-form-item>
					<u-form-item label="房屋信息">
						<text >{{form.residentialName}}-{{form.buildingName}}-{{form.unitName}}-{{form.roomName}}</text>
					</u-form-item>
					<u-form-item label="证件号码">
						<u-input v-model="form.idCard"  placeholder="暂无信息" disabled></u-input>
					</u-form-item>
					<u-form-item label="创建时间">
						<u-input v-model="form.createTime"  placeholder="暂无信息" disabled></u-input>
					</u-form-item>
					<u-form-item label="审核状态">
						<view class='cu-tag radius bg-orange' v-if="form.checkState==0">
							<text >待审核</text>
						</view>
						<view class='cu-tag radius bg-green' v-if="form.checkState==1">
							<text >审核通过</text>
						</view>
						<view class='cu-tag radius bg-red' v-if="form.checkState==2">
							<text >审核未通过</text>
						</view>
					</u-form-item>
					<u-form-item label="审核时间">
						<u-input v-model="form.checkDate"  placeholder="待审核" disabled></u-input>
					</u-form-item>
					<u-form-item label="审核人员">
						<u-input v-model="form.operatorName"  placeholder="暂无信息" disabled></u-input>
					</u-form-item>
					<u-form-item v-if="!$isEmpty(form.imageUri)" label="人脸照片:" label-position="top">
						<image  @click="$util.preview(faceImg)" style="width: 300rpx;height: 300rpx;" :src="faceImg" ></image>
					</u-form-item>
					<u-form-item v-else label="人脸照片" >
						<text>暂无</text>
					</u-form-item>
				</u-form>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				labelStyle:{
					"fontWeight":"600"
				},
				form:{},
				faceImg:''
			}
		},
		onShow() {
			this.form=getApp().globalData.userAuthData
			this.faceImg=this.$global.getImgBaseUrl()+this.form.imageUri
		},
		methods: {
			previewImg(){
				let img=this.$global.imgBaseUrl+this.form.imageUri
				this.$util.preview(img)
			},
		}
	}
</script>

<style lang="scss">
	page{
		background-color: #FFFFFF;
	}
	.card{
		background-color: #FFFFFF;
		margin:10rpx 50rpx;
		border-radius: 20rpx;
	}
</style>
