<template>
	<view class="certinfo">
		<!-- 认证第一步 -->
		<view class="ce-frist">
			<view class="cert-title">我的认证</view>
			<!-- 机构认证 -->
			<view class="ce-tit">机构认证</view>
			<view class="ce-fbox">
				<view class="fbicon fbjg"></view>
				<view class="fbtit">机构认证</view>
				<view class="fbdesc">
					含企业、政府、事业单位、团体、组织
				</view>
				<view class="fbbtn" @click="orgverify()">立即认证</view>
			</view>
			<!-- 个人认证 -->
			<view class="ce-tit">个人认证</view>
			<view class="ce-fbox">
				<view class="fbicon fbgr"></view>
				<view class="fbtit">个人认证</view>
				<view class="fbdesc">
					适用于个人用户
				</view>
				<view class="fbbtn" @click="personverify()">立即认证</view>
			</view>
		</view>
	
	</view>
</template>

<script>
	import { checkLogin } from '@/core/app'
	
	export default {
		data() {
			return {
				// 是否已登录
				isLogin: false,
			}
		},
		onShow() {
			// 判断是否已登录
			this.isLogin = checkLogin()
			if(!this.isLogin){
				uni.navigateTo({
					url:"/pages/login/index"
				})
			}
		},
		methods: {
			//机构认证
			orgverify(){
				this.$navTo("pages/user/mycertinfo/orgverify")
			},
			//个人认证
			personverify(){
				this.$navTo("pages/user/mycertinfo/personverify")
			},
		}
	}
</script>

<style lang="scss" scoped>
.certinfo{
	min-height: 100%;
	background: #fff;
	height: 100vh;
	// 认证的类型
	.ce-frist{
		background: #fff;
		padding-left: 22rpx;
		
		.cert-title{
			font-size: 26rpx;
			padding: 32rpx;
		}
		.ce-tit{
			text-align: left;
			margin: 0 26rpx 16rpx;
		}
		.ce-fbox{
			text-align: center;
			border: 2rpx solid #AAAAAA;
			border-radius: 3%;
			width: 80%;
			padding: 12rpx;
			min-height: 60rpx;
			margin: 24rpx auto ;
			
			.fbicon{
				background-image: url("../../../static/icons.png");
				background-size: cover;
				height: 80rpx;
				width: 80rpx;
				margin: 30px auto;
			}
			// 机构图标
			.fbjg{
				background-position: 0 -490rpx;
			}
			// 个人图标
			.fbgr{
				background-position: 0 -590rpx;
			}
			
			.fbdesc{
				margin:0 22rpx;
			}
			
			.fbbtn{
				color: #4A90E2;
			}
		}
	}
}
</style>
