<template>
	<!-- 完善信息最大盒子 -->
	<view class="modify_revise">
		<view class="isok" style="margin-bottom: 40rpx;">
			<image src="https://api.yruibao.com/crmebimage/public/store/2024/03/13/890e232fe2134c59af708047981d905f3rcqj6uvey.png" mode=""></image>
			<div class="text">验证成功</div>
			
		</view>
		<view class="texts">
			<view class="point">
			</view>
			<view class="text">
				姓名
			</view>
			<view class="righttxt" style="font-size: 26rpx;" >
				{{userinfo.realName}}
			</view>
		</view>
		<view class="texts">
			<view class="point">
			</view>
			<view class="text">
				身份证号
			</view>
			<view class="righttxt" style="font-size: 26rpx;" >
				{{userinfo.idCardNumber}}
			</view>
		</view>
		<view class="texts">
			<view class="point">
			</view>
			<view class="text">
				手机号
			</view>
			<view class="righttxt" style="font-size: 26rpx;" >
				{{userinfo.commonPhoneNumber}}
			</view>
		</view>
		<view class="texts">
			<view class="point">
			</view>
			<view class="text">
				收货邮箱
			</view>
			<view class="righttxt" style="font-size: 26rpx;" >
				{{userinfo.email}}
			</view>
		</view>
		<view class="texts">
			<view class="point">
			</view>
			<view class="text">
				工作单位
			</view>
			<view class="righttxt" style="font-size: 26rpx;" >
				{{userinfo.company}}
			</view>
		</view>
		<view class="texts">
			<view class="point">
			</view>
			<view class="text">
				工资
			</view>
			<view class="righttxt" style="font-size: 26rpx;" >
				{{userinfo.salary}}
			</view>
		</view>
		<view class="texts">
			<view class="point">
			</view>
			<view class="text">
				五险一金
			</view>
			<view class="righttxt" style="font-size: 26rpx;" >
				{{userinfo.insurance}}
			</view>
		</view>
		<view class="texts">
			<view class="point">
			</view>
			
			<view class="righttxt" style="font-size: 26rpx;width: 12%;" >
				{{ getRelationship(userinfo.userEmergencyContactsList[0].relationship) }}
			</view>
			<view class="righttxt" style="font-size: 26rpx;width: 15%;" >
				{{userinfo.userEmergencyContactsList[0].contactName}}
			</view>
			<view class="righttxt" style="font-size: 26rpx;width: 50%;" >
				{{userinfo.userEmergencyContactsList[0].phoneNumber}}
			</view>
		</view>
		<view class="texts">
			<view class="point">
			</view>
			
			<view class="righttxt" style="font-size: 26rpx;width: 12%;" >
				{{ getRelationship(userinfo.userEmergencyContactsList[1].relationship) }}
			</view>
			<view class="righttxt" style="font-size: 26rpx;width: 15%;" >
				{{userinfo.userEmergencyContactsList[1].contactName}}
			</view>
			<view class="righttxt" style="font-size: 26rpx;width: 50%;" >
				{{userinfo.userEmergencyContactsList[1].phoneNumber}}
			</view>
		</view>
		<view class="texts">
			<view class="point">
			</view>
			
			<view class="righttxt" style="font-size: 26rpx;width: 12%;" >
				{{ getRelationship(userinfo.userEmergencyContactsList[2].relationship) }}
			</view>
			<view class="righttxt" style="font-size: 26rpx;width: 15%;" >
				{{userinfo.userEmergencyContactsList[2].contactName}}
			</view>
			<view class="righttxt" style="font-size: 26rpx;width: 50%;" >
				{{userinfo.userEmergencyContactsList[2].phoneNumber}}
			</view>
		</view>
		<view class="button" @click="topage()"> 
			返回
		</view>
		
	</view>
</template>

<script>
	
	import{
		getidentity
	}from '@/api/myapi.js';
	// import config from '@/config/app.js'
	// const baseUrl = config.domain
	export default {
		data() {
			return {
				userinfo:{},
				facetoken:''
			}
		},
		onLoad(option) {
			this.getidentityq()

		},
		methods: {
			topage(){
				uni.switchTab({
					url:'/pages/user/index'
				})
			},
			 getRelationship(value) {
			      console.log(value, 'valuevaluevaluevalue');
			      switch (value) {
			        case '0':
			          return '父母';
			        case '1':
			          return '子女';
			        case '2':
			          return '兄弟';
			        case '3':
			          return '姐妹';
			        case '4':
			          return '亲戚';
			        case '5':
			          return '朋友';
			        case '6':
			          return '配偶';
			        case '7':
			          return '同事';
			        default:
			          return '未知关系';
			      }
			    },
			getidentityq:function(){
				let data = {
					uid: this.$store.getters.uid
				}
				getidentity(data).then(res=>{
					if ( res.data != null) {
						
						this.userinfo = res.data
						console.log(this.userinfo,'this.userinfothis.userinfo');
					}
				})
			},
			
			




		}
	}
</script>

<style lang="less">
	page {
		background: #FFFFFF !important;
	}



	.modify_revise {
		width: 100%;
		// height: 130vh;
		background: #FFFFFF;
		padding-bottom: 50rpx;
		// padding: 20rpx;
		box-sizing: border-box;
		font-size: 12px !important;
		.isok{
			width: 100%;
			display: flex;
			flex-wrap: wrap;
			justify-content: center;
			image{
				margin-top: 190rpx;
				width: 302rpx;
				height: 302rpx;
			}
			.text{
				margin-top: 58rpx;
				width: 100%;
				text-align: center;
				font-weight: 500;
				font-size: 48rpx;
				color: #279EFB;
			}
			.button{
				margin-top: 160rpx;
				display: flex;
				justify-content: center;
				align-items: center;
				width: 500rpx;
				height: 82rpx;
				background: #409EFF;
				border-radius: 10rpx 10rpx 10rpx 10rpx;
				
				font-weight: 500;
				font-size: 32rpx;
				color: #FFFFFF;
				line-height: 44rpx;
			}
			
		}
		.texts{
			margin-top: 20rpx;
			padding-left: 100rpx;
			display: flex;
			flex-wrap: nowrap;
			align-items: center;
			
			font-weight: 400;
			font-size: 32rpx;
			color: #3D3D3D;
			line-height: 44rpx;
			.point{
				margin-right: 18rpx;
				width: 10rpx;
				height: 10rpx;
				background: #279EFB;
				border-radius: 50%;
			}
			.text {
				margin-right: 0rpx;
				width: 160rpx;
				font-weight: 400;
				font-size: 26rpx;
				color: #212529;
				line-height: 36rpx;
			}
			
		}
		.button{
			margin-left: 120rpx;
			margin-top: 160rpx;
			display: flex;
			justify-content: center;
			align-items: center;
			width: 500rpx;
			height: 82rpx;
			background: #409EFF;
			border-radius: 10rpx 10rpx 10rpx 10rpx;
			
			font-weight: 500;
			font-size: 32rpx;
			color: #FFFFFF;
			line-height: 44rpx;
		}
		.rzpage {
			.btnbox {
				margin-top: 100rpx;
				width: 100%;
				display: flex;
				justify-content: center;

				.btn {
					display: flex;
					justify-content: center;
					align-items: center;
					width: 500rpx;
					height: 82rpx;
					background: #409EFF;
					border-radius: 10rpx 10rpx 10rpx 10rpx;

					font-weight: 500;
					font-size: 32rpx;
					color: #FFFFFF;
					line-height: 44rpx;
				}
			}

			.topbox {
				padding-bottom: 20rpx;
				display: flex;
				flex-wrap: wrap;
				justify-content: center;
				width: 750rpx;

				background: #FFFFFF;
				box-shadow: 0rpx 6rpx 16rpx 0rpx rgba(0, 0, 0, 0.16);
				border-radius: 0rpx 0rpx 0rpx 0rpx;

				.text {
					margin-top: 24rpx;
					width: 100%;
					text-align: center;
					font-weight: 400;
					font-size: 28rpx;
					color: #333333;
					line-height: 38rpx;
				}

				image {
					width: 374rpx;
					height: 376rpx;
				}
			}

			.uploadbox {
				padding: 0 46rpx;
				margin-top: 66rpx;
				width: 750rpx;
				padding-bottom: 20rpx;
				background: #FFFFFF;

				// box-shadow: 0rpx 6rpx 16rpx 0rpx rgba(0, 0, 0, 0.08);
				.box_tip {
					width: 100%;
					font-weight: 600;
					font-size: 32rpx;
					color: #333333;
				}

				border-radius: 0rpx 0rpx 0rpx 0rpx;

				.upimg {
					margin-top: 30rpx;
					display: flex;
					flex-wrap: nowrap;
					justify-content: space-between;

					.imgcont {
						width: 132rpx;
						display: flex;
						flex-wrap: wrap;
						justify-content: center;


						image {
							width: 132rpx;
							height: 78rpx;
						}

						.botimg {
							margin-top: 28rpx;
							display: flex;
							flex-wrap: nowrap;
							align-items: center;
							font-weight: 400;
							font-size: 20rpx;
							color: #A19C9C;
							line-height: 28rpx;

							image {
								margin-right: 8rpx;
								width: 25.14rpx;
								height: 25.25rpx;
							}
						}
					}

				}
			}
		}

		.infopage {
			.btnbox {
				margin-top: 50rpx;
				width: 100%;
				display: flex;
				justify-content: center;

				.btn {
					display: flex;
					justify-content: center;
					align-items: center;
					width: 500rpx;
					height: 82rpx;
					background: #409EFF;
					border-radius: 10rpx 10rpx 10rpx 10rpx;

					font-weight: 500;
					font-size: 32rpx;
					color: #FFFFFF;
					line-height: 44rpx;
				}
			}

			.info_box {
				margin-bottom: 24rpx;
				display: flex;
				flex-wrap: wrap;
				width: 748rpx;
				padding: 0 52rpx;
				background: #FFFFFF;
				box-shadow: 0rpx 6rpx 16rpx 0rpx rgba(0, 0, 0, 0.16);

				.info_li {
					width: 100%;
					height: 80rpx;

					display: flex;
					align-items: center;
					flex-wrap: nowrap;
					border-bottom: 2rpx solid #F0F0F0;

					.text {
						margin-right: 56rpx;
						width: 160rpx;
						font-weight: 400;
						font-size: 26rpx;
						color: #212529;
						line-height: 36rpx;
					}

					.tips {
						font-weight: 400;
						font-size: 22rpx;
						color: #808080;
					}

					.input {}
				}
			}
		}

		.top {
			padding: 20rpx;
		}

		.upidcard {

			.btnbox {
				margin-top: 50rpx;
				width: 100%;
				display: flex;
				justify-content: center;

				.btn {
					display: flex;
					justify-content: center;
					align-items: center;
					width: 500rpx;
					height: 82rpx;
					background: #409EFF;
					border-radius: 10rpx 10rpx 10rpx 10rpx;

					font-weight: 500;
					font-size: 32rpx;
					color: #FFFFFF;
					line-height: 44rpx;
				}
			}

			.tip {
				display: flex;
				padding-left: 40rpx;
				align-items: center;
				width: 750rpx;
				height: 64rpx;
				background: #FFEBEB;
				border-radius: 0rpx 0rpx 0rpx 0rpx;

				font-weight: 400;
				font-size: 28rpx;
				color: #EB8989;

				image {
					margin-right: 6rpx;
					width: 40rpx;
					height: 40rpx;
				}
			}

			.uploadbox {
				padding: 0 46rpx;
				margin-top: 66rpx;
				width: 750rpx;
				padding-bottom: 20rpx;
				background: #FFFFFF;
				box-shadow: 0rpx 6rpx 16rpx 0rpx rgba(0, 0, 0, 0.08);
				border-radius: 0rpx 0rpx 0rpx 0rpx;

				.showimg {
					margin-top: 40rpx;
					width: 100%;
					display: flex;
					justify-content: center;

					image {
						width: 572rpx;
						height: 314rpx;
					}
				}

				.uptip {
					display: flex;
					flex-wrap: wrap;

					.uptipli {
						margin-top: 24rpx;
						width: 100%;
						font-weight: 400;
						font-size: 24rpx;
						color: #A19C9C;
						line-height: 32rpx;
					}

				}

				.upself {
					margin-bottom: 60rpx;
					padding: 36rpx 44rpx;
					width: 678rpx;
					height: 478rpx;
					background: #FFFFFF;
					box-shadow: 0rpx 6rpx 16rpx 0rpx rgba(0, 0, 0, 0.16);
					border-radius: 30rpx 30rpx 30rpx 30rpx;

					.box_tip {
						width: 100%;
						font-weight: 600;
						font-size: 32rpx;
						color: #333333;
					}

					image {
						margin-top: 24rpx;
						width: 578rpx;
						height: 330rpx;
						border-radius: 14rpx;
					}
				}

				.upimg {
					margin-top: 30rpx;
					display: flex;
					flex-wrap: nowrap;
					justify-content: space-between;

					.imgcont {
						width: 132rpx;
						display: flex;
						flex-wrap: wrap;
						justify-content: center;
						font-weight: 400;
						font-size: 20rpx;
						color: #A19C9C;
						line-height: 28rpx;

						image {
							width: 132rpx;
							height: 91.25rpx;
						}
					}
				}

				.iptbox {
					display: flex;
					flex-wrap: wrap;

					.iptli {
						width: 100%;
						margin-top: 34rpx;
						display: flex;
						flex-wrap: nowrap;

						.left {
							margin-right: 78rpx;
							width: 112rpx;
							font-weight: 400;
							font-size: 28rpx;
							color: #A19C9C;
						}

						.right {
							font-weight: 400;
							font-size: 28rpx;
							color: #C8C7C7;
						}

						.act1 {
							color: #212529;
						}
					}
				}

				.box_tip {
					font-weight: 600;
					font-size: 32rpx;
					color: #333333;
				}

				.img_boxs {
					margin-top: 38rpx;
					margin-left: 24rpx;
					display: flex;
					flex-wrap: nowrap;
					align-items: center;

					.img_box {
						font-weight: 400;
						font-size: 24rpx;
						color: #C8C7C7;
						line-height: 32rpx;
						margin-right: 60rpx;
						width: 278rpx;
						display: flex;
						flex-wrap: wrap;
						justify-content: center;

						image {
							width: 278rpx;
							height: 188rpx;
						}
					}
				}
			}
		}
	}
</style>