<template>
	<view class="centerNothing">
		<view class="userBase" v-if="auth.realNameState === true">
			<view class="userBaseList">
				<view class="user_left">
					姓名
				</view>
				<view class="user_Right">
					{{ auth.authInfo.realName }}
				</view>
			</view>
			<view class="userBaseList">
				<view class="user_left">
					性别
				</view>
				<view class="user_Right">
					{{ auth.authInfo.sex === 1 ? '男' : '女' }}
				</view>
			</view>
			<view class="userBaseList">
				<view class="user_left">
					出生年月
				</view>
				<view class="user_Right">
					{{ birthday }}
				</view>
			</view>
			<view class="userBaseList">
				<view class="user_left">
					手机号
				</view>
				<view class="user_Right">
					{{ auth.authInfo.telphone }}
				</view>
			</view>
			<view class="userBaseList">
				<view class="user_left">
					身份信息
				</view>
				<view class="user_Right">
					<!-- <block v-if="auth.laborState">农村劳动力</block> -->
					{{ auth.nation }}
				</view>
			</view>
		</view>
		<!-- 没有认证的情况 -->
		<view v-else>
			<image src="../../static/img/pic_noid.svg" mode="" class="nothing"></image>
			<view class="nothingText" @click="goSetUserBase">
				暂无信息，请先<text>填写认证信息</text>
			</view>
		</view>
	</view>
</template>

<script>
import {
	userInfo
} from '@/api/resume.js';
import {
	dateFormat
} from "../../untils/format.js";
import {
	mapGetters
} from 'vuex'

export default {
	data() {
		return {
			userInfo: {}
		}
	},
	computed: {
		...mapGetters(['auth', 'authInfo']),
		birthday() {
			if (!!this.authInfo.birthday) {
				return dateFormat(new Date(this.authInfo.birthday.replace(/\-/g, "/").replace('T', ' ')), "yyyy-MM");
			} else {
				return "暂无"
			}
		}
	},
	onShow() { },
	methods: {
		goSetUserBase: function () {
			uni.navigateTo({
				url: '../setUserBase/index'
			})
		}
	}
}
</script>

<style>
.nothingText text {
	color: #1B66FF;
}

.nothingText {
	text-align: center;
	font-family: PingFangSC-Regular;
	font-size: 28rpx;
	color: #666666;
	margin-top: 20rpx;
}

.nothing {
	display: block;
	margin: 0 auto;
	width: 400rpx;
	height: 200rpx;
	margin-top: 50%;
}

.user_Right {
	font-family: PingFangSC-Regular;
	font-size: 28rpx;
	color: #999999;
}

.user_left {
	font-family: PingFangSC-Regular;
	font-size: 32rpx;
	color: #333333;
}

.userBaseList {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 30rpx;
	padding-left: 0;
	border-bottom: 1rpx solid #dddddd;
}

.userBase {
	background-color: #fefefe;
	padding-left: 30rpx;
	margin-top: 30rpx;
}

page {
	background-color: #fff;
}
</style>
