<template>
	<view>
		<view class="block">
			<view class="certified">
				<image class="icon" src="http://124.71.79.122/images/miniProgram/icon7.png" mode="widthFix" />
				<view class="text">您已经通过{{ info.platformSource === '5' ? '幼儿园' : '供应商' }}认证</view>
			</view>
			<view class="form-list">
				<view class="line">
					<view class="name">幼儿园名称</view>
					<view class="val">{{ info.companyName }}</view>
				</view>
				<view class="line">
					<view class="name">统一社会信用代码</view>
					<view class="val">{{ info.creditCode }}</view>
				</view>
				<view class="line">
					<view class="name">法人</view>
					<view class="val">{{ info.legalPerson }}</view>
				</view>
			</view>
		</view>
		
		<view class="btn-wrap">
			<view class="btn" @click="back">确定</view>
		</view>
	</view>
</template>

<script>
	import { enterpriseCertificationStatus } from '@/apis/modules/user.js'
	export default {
		data() {
			return {
				openId: uni.getStorageSync('openId'),
				info: {}
			}
		},
		onShow() {
			this.getInfo()
		},
		methods: {
			// 企业认证信息
			async getInfo() {
				const { data } = await enterpriseCertificationStatus(this.openId)
				this.info = data
			},
			// 返回
			back() {
				uni.navigateBack()
			}
		}
	}
</script>

<style scoped lang="scss">
.certified {
	padding: 100rpx 0;
	text-align: center;
	.icon {
		width: 80rpx;
		margin-bottom: 20rpx;
	}
	.text {
		font-size: 26rpx;
		color: #333;
	}
}
.form-list {
	.name {
		min-width: 250rpx;
	}
}
</style>
