<template>
	<view class="phone">
		<view class="phone-bd">
			<view class="item">
				<image v-if="userInfo.faceFlag == 1" src="/static/renzheng-shibai.png"></image>
				<image v-else src="/static/renzheng-zhong.png"></image>
			</view>
		</view>
		<!-- <view class="title">真人认证失败</view> -->
		<view class="title" v-if="userInfo.faceFlag == 0">请拍照</view>
		<!-- <view class="title">头像认证中，请稍后</view> -->
		<view class="tips"><text>提示：真人认证我们会比对实名认证的活体采集与头像\n信息是否匹配，若匹配，认证通过；\n若不匹配，认证失败</text></view>
		<view class="phone-fd">
			<view class="btn" v-if="userInfo.faceFlag == 0">重新上传头像</view>
			<!-- <view class="btn" v-if="userInfo.faceFlag == 1">确定</view> -->
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				userInfo: {},
			};
		},
		onReady() {
			this.getUserInfo();
		},
		methods: {
			async getUserInfo() {
				const { code, data , msg } = await this.$api.findUserInfo({userId: uni.getStorageSync("userInfo").id});
				if(code == 200){
					this.userInfo = data;
				}else{
					uni.showToast({
						title: mgs,
						position: "bottom",
						icon: "none",
					})
				}
			},
		}
	}
</script>

<style scoped lang="scss">
page{
	background-color: #FFFFFF;
}
.phone{
	padding: 25rpx;
	overflow: hidden;
	&-fd{
		width: 100%;
		position: fixed;
		left: 0;
		bottom: 50rpx;
		z-index: 22;
		.btn{
			width: 700rpx;
			line-height: 98rpx;
			background: linear-gradient(0deg, #000000, #3D3B38);
			border-radius: 98rpx;
			font-weight: 400;
			font-size: 34rpx;
			text-align: center;
			color: #FFFFFF;
			margin: 0 auto;
		}
	}
	
	.title{
		color: #222222;
		font-weight: 500;
		font-size: 30rpx;
		text-align: center;
		margin-top: 30rpx;
	}
	.tips{
		font-weight: 500;
		font-size: 24rpx;
		color: #999999;
		text-align: center;
		margin-top: 20rpx;
		line-height: 50rpx;
	}
	&-bd{
		padding-top: 140rpx;
		text-align: center;
		image{
			width: 353rpx;
			height: 252rpx;
		}
	}
}
</style>