<template>
	<view class="container">
		<view class="title">身份选择</view>
		<view class="choose-identuty flex justify-between">
			<view class="item" :class="isDoctor ? 'border-color-custom' : 'border-unSelected' "
				@click="() => isDoctor = true">
				<view class="item-icon" :class="isDoctor ? 'bg-custom' : 'bg-unSelected' ">
					<u-icon name="checkmark" color="white" size="20"></u-icon>
				</view>
				<image class="item-content-icon1" src="@/static/images/phone/icon_doctor.png"></image>
				<view class="item-name">我是医生</view>
				<view class="item-desc">参与项目上传课件</view>
			</view>
			<view class="item" :class="!isDoctor ? 'border-color-custom' : 'border-unSelected' "
				@click="() => isDoctor = false">
				<view class="item-icon" :class="!isDoctor ? 'bg-custom' : 'bg-unSelected' ">
					<u-icon name="checkmark" color="white" size="20"></u-icon>
				</view>
				<image class="item-content-icon2" src="@/static/images/phone/icon_volunteer.png"></image>
				<view class="item-name">我是志愿者</view>
				<view class="item-desc">辅助医生上传课件</view>
			</view>
		</view>
		<u-button type="primay" class="btn" color="var(--phone-theme-color)" @click="next">下一步</u-button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				isDoctor: true
			}
		},
		onLoad() {
			this.isDoctor = this.$store.state.user.loginIdentity == 0
		},
		methods: {
			next() {
				let type = this.isDoctor ? '0' : '1'
				uni.navigateTo({
					url: '/pages/pc/info/info?loginIdentity=' + type
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.container {
		width: 100vw;
		height: 100vh;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;

		.title {
			font-size: 12.5rpx;
			font-style: normal;
			font-weight: 600;
			color: #1D2129;
			text-align: center;
		}

		.choose-identuty {
			margin-top: 9.38rpx;
			padding: 4.17rpx 8.33rpx;
			width: 195.31rpx;
			height: 112.5rpx;

			.item {
				display: flex;
				flex-direction: column;
				align-items: center;
				width: 85.94rpx;
				height: 104.17rpx;
				border-radius: 8px;
				border: 2px solid #F2F3F5;

				&-icon {
					align-self: flex-end;
					width: 15.63rpx;
					height: 15.63rpx;
					border-top-right-radius: 8px;
					border-bottom-left-radius: 8px;
					display: flex;
					justify-content: center;
					align-items: center;
				}

				&-content-icon1 {
					width: 38.54rpx;
					height: 38.54rpx;
					margin-top: 9.38rpx;
				}

				&-content-icon2 {
					width: 52.08rpx;
					height: 52.08rpx;
					margin-left: 10.42rpx;

				}

				&-name {
					margin-top: 10.42rpx;
					color: #1D2129;
					font-size: 8.33rpx;
					font-weight: 600;
					height: 12.5rpx;
					line-height: 12.5rpx;
				}

				&-desc {
					color: #86909C;
					font-size: 6.77rpx;
					height: 11.46rpx;
					line-height: 11.46rpx;

				}
			}
		}

		.btn {
			width: 178.13rpx;
			height: 22.92rpx;
			line-height:22.92rpx;
			text-align: center;
			border-radius: 4px;
			color: #FFF;
			font-size: 8.33rpx;
			font-weight: 400;
			margin-top: 20.83rpx;
		}
	}

	.border-unSelected {
		border-color: #F2F3F5 !important;
	}

	.bg-unSelected {
		background: #F2F3F5 !important;
	}
</style>
