<template>
	<view class="container_body">
		<view class="container">

			<div class="userAva">
				<image src="https://static.hshuishang.com/property-img-file/com_MsgImg1.png" alt="" mode="aspectFill" />
			</div>
			<div class="Name">MarrekoZhang</div>

			<view class="item">
				<view class="label">
					<view class="item_desc">房产</view>
				</view>
				<view class="item_right" @click="chooseMsg">
					<input :value="communityName" class="right_input" disabled type="text" placeholder="请选择您要入驻的房产" />
					<u-icon name="arrow-right"></u-icon>
				</view>
			</view>


			<view class="item">
				<view class="label">
					<view class="item_desc">姓名</view>
				</view>

				<input :value="name" @input="headerInputClick" data-name="name" class="right_input" type="text" placeholder="请输入您的姓名" />
			</view>

			<view class="item">
				<view class="label">
					<view class="item_desc">手机</view>
				</view>

				<input :value="mobile" @input="headerInputClick" data-name="mobile" class="right_input" type="text" placeholder="请选择您的手机号" />
			</view>

			<view class="item">
				<view class="label">
					<view class="item_desc">身份</view>
				</view>
				<view class="item_right" @click="changeShow" >
					<input :value="identity.text" class="right_input" disabled type="text" placeholder="请输入您的身份"/>
					<u-icon name="arrow-right"></u-icon>
				</view>
			</view>

			<view class="tips ">
				注意：业主为在物业登记在册的人员，需经过物业审
				核确认后，即可成为该房产的业主。如需帮助可与物
				业或平台联系。
			</view>
			<view class="btn" @click="submit">确定</view>
		</view>

		<u-picker :show="show" :columns="columns" keyName="text" @confirm='confirm' @close='onClose' @cancel='onClose'
			closeOnClickOverlay></u-picker>
			
	</view>
</template>

<script>
import { request, picUrl, NavgateTo } from '../../../utils';
import { apiArr } from '../../../api/community';
export default {
	data() {
		return {
			communityName: '',
			name: '',
			mobile: '',
			identity: {},
			show: false, //弹出层
			columns: [
				[
					{ text: "业主", type: 1 },
					{ text: "家属", type: 2 },
					{ text: "租户", type: 3 },
					{ text: "访客", type: 4 },
				]
			]
		}
	},
	methods: {
		changeShow() {
			this.show = !this.show;
		},

		onClose() {
			this.show = false;
		},

		confirm(e) {
			console.log('eee', e);
			this.identity = e.value[0];
			this.show = false;
		},

		headerInputClick(e) {
			const { name } = e.currentTarget.dataset;
			const { value } = e.detail;
			this[name] = value;
		},
		chooseMsg(){
			NavgateTo("../chooseMsg/index")
		},
		submit() {
			console.log('111', this);
		}

	},

	onLoad(options) {

	},

	onShow() {
	
	},
}
</script>

<style>
@import url("./index.css");
</style>
