<template>
	<view class="container">
		<view class="line">
			<view>联系人</view>
			<u-input :placeholderStyle="placeholderStyle" v-model="form.name" type="text" placeholder="请输入姓名" input-align="right" :border="false"></u-input>
		</view>
		<view class="sex">
			<view class="select">先生</view>
			<view>女士</view>
		</view>
		<view class="line">
			<view>电话</view>
			<u-input :placeholderStyle="placeholderStyle" v-model="form.mobile" type="text" placeholder="请输入电话" input-align="right"
				:border="false"></u-input>
		</view>
		<view class="line" @click="chooseAddress">
			<view>地址</view>
			<view class="address">
				<text>{{form.address?form.address:'请选择地址'}}</text>
				<u-icon name="arrow-right"></u-icon>
			</view>
		</view>
		<view class="line">
			<view>门牌号</view>
			<u-input :placeholderStyle="placeholderStyle" v-model="form.name" type="text" placeholder="如：8号楼1层102室" input-align="right"
				:border="false"></u-input>
		</view>
		<view class="btn">确认</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				form: {
					name: '',
					sex: '',
					mobile: '',
					address: '',
					num: ''
				},
				placeholderStyle:{
					color:'rgba(0,0,0,0.3)',
				}
			}
		},
		methods:{
			
			chooseAddress(){
				console.log("123")
				uni.chooseLocation({
					success: function (res) {
						console.log('位置名称：' + res.name);
						console.log('详细地址：' + res.address);
						console.log('纬度：' + res.latitude);
						console.log('经度：' + res.longitude);
					}
				});
			}
		}
	}
</script>

<style lang="scss" scoped>
	.container {
		width: 100vw;
		height: 100vh;
		background: #fff;
		overflow: scroll;
		font-family: Avenir, Helvetica, Arial, sans-serif;
		padding: 30rpx;

		.line {
			border: 1rpx solid #e9e9e9;
			border-radius: 60rpx;
			padding: 10rpx 30rpx;
			display: flex;
			justify-content: space-between;
			align-items: center;
			font-size: 28rpx;
			font-weight: 600;
			margin-bottom: 30rpx;
			.address{
				color:rgba(0,0,0,0.3);
				height:70rpx;
				line-height: 70rpx;
			}
		}

		.btn {
			background: #d90209;
			text-align: center;
			color: #fff;
			font-size: 28rpx;
			border-radius: 10rpx;
			padding: 20rpx 0;
		}

		.sex {
			display: flex;
			align-items: center;
			justify-content: end;
			margin-bottom: 30rpx;

			&>view {
				text-align: center;
				font-size: 28rpx;
				color: #000;
				border: 1rpx solid #e9e9e9;
				border-radius: 10rpx;
				padding: 10rpx 60rpx;
				margin-left: 20rpx;
			}

			.select {
				color: #d90209;
				border: 1rpx solid #d90209;
				background: #fdf0f0;
			}
		}
	}
</style>