<template>
	<view class="renzheng_body">
		<view class="renzheng" v-if="approvalStatus==0">
			<text class="renzheng_title">认证审核中…</text>
			<view class="btn_back" @click="toHome">
				任务大厅
			</view>
			<image class="renzheng_img" src="../../static/icons/icon_renzhenging.png" mode=""></image>
		</view>
		<view class="renzheng" v-if="approvalStatus==1">
			<text class="renzheng_title">审核已通过！</text>
			<text class="renzheng_desc">可以点击下方“任务大厅”开始做任务啦</text>
			<view class="btn_back" @click="toHome">
				任务大厅
			</view>
			<image class="renzheng_img" src="../../static/icons/icon_renzheng_pass.png" mode=""></image>
		</view>
	</view>
</template>

<script>
	let app = getApp();
	export default {
		data() {
			return {
				approvalStatus:-1
			};
		},
		created() {
			this.getCertificationResult();
		},
		methods:{
			async getCertificationResult(){
				let ret = await this.$myRequest({
					url: "/user/regist/get",
					data: {
						"userId": app.globalData.userId,
					},
					method:"GET"
				})
				if (ret.data.success) {
					this.approvalStatus = ret.data.single.approvalStatus;//:0待审核1通过2拒绝
				}
			},
			toHome(){
				uni.reLaunch({
					url:'../homePage/homePage'
				})
			}
			
		}
	}
</script>

<style lang="scss">
   .renzheng_body{
	   .renzheng{
		   display: flex;
		   flex-direction: column;
		   justify-content: center;
		   align-items: center;
		   margin-top: 240rpx;
		   .renzheng_title{
			   font-size: 40rpx;
			   font-family: Verdana, Verdana-Bold;
			   font-weight: 700;
			   text-align: center;
			   color: #333333;
		   }
		   .renzheng_desc{
			   font-size: 32rpx;
			   font-family: Verdana, Verdana-Regular;
			   font-weight: 400;
			   text-align: center;
			   color: #6a6a6a;
			   margin-top: 40rpx;
		   }
		   .btn_back{
			   width: 410rpx;
			   height: 80rpx;
			   margin-top: 96rpx;
			   line-height: 80rpx;
			   background: #f07423;
			   font-size: 28rpx;
			   font-family: Verdana, Verdana-Bold;
			   font-weight: 700;
			   text-align: center;
			   color: #ffffff;
			   border-radius: 40rpx;
			   box-shadow: 0rpx 2rpx 12rpx 0rpx rgba(240,116,35,0.37); 
		   }
		   .renzheng_img{
			   width: 622rpx;
			   height: 302rpx;
			   margin-top: 117rpx;
		   }
	   }
   }
</style>
