<template>
	<!-- 加入志愿者 -->
	<view class="volunteer">
		<navbar title="加入志愿者" leftClick @leftClick="$utils.navigateBack" />
		<view class="volunteer-form">
			<view class="volunteer-form-title">
				<view>志愿者信息</view>
			</view>
			<view class="volunteer-form-sheet">
				<view class="volunteer-form-sheet-cell">
					<view>
						姓名
					</view>
					<input v-model="volunteerName" placeholder="请输入您的姓名" />
				</view>
				<view>
					<uv-picker ref="picker" :columns="columns" @confirm="confirm"></uv-picker>
					<view class="volunteer-form-sheet-cell">
						<view @click="openPicker">
							证件类型
						</view>
						<uv-cell :border="false" title="选择证件类型" :isLink="true" arrow-direction="right"
							@click="openPicker" />
					</view>
				</view>
				<view class="volunteer-form-sheet-cell">
					<view>
						证件号码
					</view>
					<input placeholder="请输入证件号码" v-model="volunteerCerNo" />
				</view>
				<view class="volunteer-form-sheet-cell">
					<view>
						手机号码
					</view>
					<uv-input placeholder="请输入手机号码" fontSize="24rpx" border="none"
						:custom-style="{backgroundColor: '#fff'}">
						<template #suffix>
							<view>
								<text class="yzm">获取验证码</text>
							</view>
						</template>
					</uv-input>
				</view>
				<view class="volunteer-form-sheet-cell">
					<view>
						验证码
					</view>
					<input placeholder="请输入验证码" />
				</view>
			</view>
			
			<view class="submit">
				<view>
					提交
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				columns: [
					['中国', '美国', '日本']
				],
				volunteerCerNo: "",
				volunteerName: "",
				volunteerPhone: ""

			}
		},
		methods: {
			openPicker() {
				this.$refs.picker.open();
			},
			confirm(e) {
				console.log('confirm', e);
			}
		}
	}
</script>

<style scoped lang="scss">
	.volunteer {
		.volunteer-form {
			width: 94%;
			margin-top: 40rpx;
			margin-left: 3%;


			.volunteer-form-title {
				color: #333;
				font-size: 36rpx;
				font-weight: 600;
				padding: 0rpx 0rpx 0rpx 8rpx;
				border-left: 8rpx solid #F6732D;
			}

			.volunteer-form-sheet {
				display: flex;
				height: 500rpx;
				flex-direction: column;
				justify-content: space-around;

				.volunteer-form-sheet-cell {
					display: flex;
					font-size: 28rpx;
					align-items: center;

					.yzm {
						display: inline-block;
						font-size: 22rpx;
						padding: 6rpx;
						border-radius: 20rpx;
						background-color: #ff0829;
						color: #fff;

					}

					/deep/ .uv-cell__title-text {
						font-size: 24rpx;
					}

					/deep/ .uv-cell__body {
						padding: 0;
					}

					/deep/ .uv-cell {
						flex: 1;
					}

					view {
						width: 140rpx;
						padding: 20rpx 0;
					}

					input {
						flex: 1;
						height: 100%;
						color: rgb(192, 196, 204);
						background-color: #fff;
						font-size: 24rpx;
					}
				}
			}
			.submit{
				position: fixed;
				bottom: 5%;
				background-color: #b12026;
				color: #fff;
				width: 94%;
				padding: 20rpx 0;
				text-align: center;
				border-radius: 40rpx;
			}
		}
	}
</style>