<template>
	<view class="page-wrap">
		<view class="tabs-panel">
			<view :class="{item:true, active: tabActive === item.value}" v-for="(item,index) in tabList" :key="index"
				@click="tabActive =item.value">
				{{item.label}}
			</view>
		</view>
		<!-- 企业认证 -->
		<view v-if="tabActive === 1" class="info-panel">
			<view class="space"></view>
			<view class="row">
				<view class="label">企业全称</view>
				<view class="text">天津超易达胜科技发展有限公司</view>
			</view>
			<view class="row">
				<view class="label">证件类型</view>
				<view class="text">统一信用代码</view>
			</view>
			<view class="row">
				<view class="label">证件号码</view>
				<view class="text">911201033006420997</view>
			</view>
			<view class="space"></view>
			<view class="row">
				<view class="label">法人</view>
				<view class="text">张无忌</view>
			</view>
			<view class="row">
				<view class="label">法人身份证号</view>
				<view class="text">610110199012310987</view>
			</view>
			<view class="space"></view>
			<view class="row">
				<view class="label">代表人</view>
				<view class="text">李四</view>
			</view>
			<view class="row">
				<view class="label">证件类型</view>
				<view class="text">大陆身份证</view>
			</view>
			<view class="row">
				<view class="label">证件号</view>
				<view class="text">610110199012310980</view>
			</view>
			<view class="row">
				<view class="label">手机号</view>
				<view class="text">18992804987</view>
			</view>
			<view class="row">
				<view class="label">验证码</view>
				<view class="text">6234</view>
				<view class="code">获取验证码</view>
			</view>
			<view class="row">
				<view class="label">邮箱</view>
				<view class="text">156306621@qq.com</view>
			</view>
			<button class="submit-btn">提交认证信息</button>
		</view>
		
		<!-- 个人认证 -->
		<view v-if="tabActive === 2" class="info-panel">
			<view class="space"></view>
			<view class="row">
				<view class="label">姓名</view>
				<view class="text">李四</view>
			</view>
			<view class="row">
				<view class="label">证件类型</view>
				<view class="text">大陆身份证</view>
			</view>
			<view class="row">
				<view class="label">证件号</view>
				<view class="text">610110199012310980</view>
			</view>
			<view class="row">
				<view class="label">手机号</view>
				<view class="text">18992804987</view>
			</view>
			<view class="row">
				<view class="label">验证码</view>
				<view class="text">6234</view>
				<view class="code">获取验证码</view>
			</view>
			<view class="row">
				<view class="label">邮箱</view>
				<view class="text">156306621@qq.com</view>
			</view>
			<button class="submit-btn">提交认证信息</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				tabActive: 1,
				tabList: [{
					label: '企业认证',
					value: 1
				}, {
					label: '个人认证',
					value: 2
				}]
			}
		},
		methods: {

		}
	}
</script>

<style lang="scss" scoped>
	.page-wrap {
		padding-top: 82.42rpx;
		min-height: 100%;
		background: #f3f3f3;
		box-sizing: border-box;
		overflow: hidden;
		.submit-btn{
			width: 549.45rpx;
			height: 75.55rpx;
			background: #00BCD2;
			font-size: 27.47rpx;
			color: #fff;
			border-radius: 8.24rpx;
			margin: 54.95rpx auto;
		}
	}

	.tabs-panel {
		position: fixed;
		left: 0;
		top: 0;
		right: 0;
		height: 82.42rpx;
		background: #fff;
		display: flex;
		padding: 0 41.21rpx;
		z-index: 1;

		&::before,
		&::after {
			content: '';
			position: absolute;
			left: 0;
			right: 0;
			height: 1rpx;
			background: #e0e0e0;
		}

		&::before {
			top: 0;
		}

		&::after {
			bottom: 0;
		}

		.item {
			padding: 0 9.62rpx;
			text-align: center;
			font-size: 27.47rpx;
			color: #999;
			line-height: 82.42rpx;
			position: relative;

			&+.item {
				margin-left: 27.47rpx;
			}
		}

		.active {
			color: #00BCD2;

			&::after {
				content: '';
				position: absolute;
				left: 0%;
				right: 0%;
				bottom: 0%;
				height: 5.49rpx;
				background: #00BCD2;
				z-index: 1;
			}
		}
	}

	.info-panel {
		font-size: 27.47rpx;

		.row {
			min-height: 96.15rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding: 20.6rpx 41.21rpx;
			box-sizing: border-box;
			background: #fff;
			position: relative;
			color: #515151;

			&:first-child::before,
			&+.row::before {
				content: '';
				position: absolute;
				left: 0;
				right: 0;
				top: 0;
				height: 1px;
				background: #e0e0e0;
				transform: scaleY(.5);
			}

			.label {
				white-space: nowrap;
				margin-right: 54.95rpx;
			}

			.text {
				flex: 1;
				text-align: right;
			}

			.arrow {
				width: 27.47rpx;
				height: 27.47rpx;
				margin-left: 6.87rpx;
			}

			.avatar {
				width: 82.42rpx;
				height: 82.42rpx;
				border-radius: 50%;
			}

			.code {
				font-size: 21.98rpx;
				color: #027DB4;
				margin-left: 27.47rpx;
			}
		}

		.title {
			color: #666666;
			padding: 0 41.21rpx;
			line-height: 82.42rpx;
		}

		.space {
			background: #f3f3f3;
			height: 13.74rpx;
			line-height: 27.47rpx;
		}
	}
</style>