<template>
	<view>

		<form>
			<view class="cu-form-group">
				<view class="title">头像</view>
				<view class="cu-avatar radius bg-gray">
					<avatar selWidth="640rpx" selHeight="640rpx" :avatarSrc="userinfo.avatar" noTab="true" avatarStyle="width: 75rpx; height: 75rpx; border-radius: 5%;"></avatar>
				</view>
			</view>
			
			<view class="cu-list menu margin-top">
				<view class="cu-item" data-title="昵称" data-infobox="input" data-field="nickname" :data-value="userinfo.nickname">
					<view class="content">
						<text>昵称</text>
					</view>
					<view class="action">
						<text class="text-grey">{{userinfo.nickname}}</text>
					</view>
				</view>
				<view class="cu-item">
					<view class="content">
						<text>手机号</text>
					</view>
					<view class="action">
						<text class="text-grey">{{userinfo.mobile}}</text>
					</view>
				</view>
			</view>
			
			<view class="cu-list menu margin-top" v-if="userinfo.authstatus==3">
				<view class="cu-item">
					<view class="content">
						<text>身份证号</text>
					</view>
					<view class="action">
						<text class="text-grey">{{userinfo.idcard}}</text>
					</view>
				</view>
				<view class="cu-item">
					<view class="content">
						<text>姓名</text>
					</view>
					<view class="action">
						<text class="text-grey">{{userinfo.realname}}</text>
					</view>
				</view>
				<view class="cu-item">
					<view class="content">
						<text>性别</text>
					</view>
					<view class="action">
						<text class="text-grey">{{userinfo.gender==1 ? "男" : "女"}}</text>
					</view>
				</view>
				<view class="cu-item">
					<view class="content">
						<text>出生日期</text>
					</view>
					<view class="action">
						<text class="text-grey">{{userinfo.birthday}}</text>
					</view>
				</view>
			</view>
			
			<view class="cu-list menu margin-top">
				<view class="cu-item" data-title="现居住地" data-infobox="input" data-field="address" :data-value="userinfo.address">
					<view class="content">
						<text>现居住地</text>
					</view>
					<view class="action">
						<text class="text-grey text-cut">{{userinfo.address}}</text>
					</view>
				</view>
				<view class="cu-item" data-title="学历" data-infobox="input" data-field="education" :data-value="userinfo.education">
					<view class="content">
						<text>学历</text>
					</view>
					<view class="action">
						<text class="text-grey">{{userinfo.education}}</text>
					</view>
				</view>
			</view>
			
			<view class="cu-list menu margin-top solid-bottom">
				<view class="cu-item" data-title="求职意向" data-infobox="textarea" data-field="jobintention" :data-value="userinfo.jobintention">
					<view class="content">
						<text>求职意向</text>
					</view>
				</view>
			</view>
			<view class="padding bg-white">
				<text>{{userinfo.jobintention}}</text>
			</view>
			
			<view class="cu-list menu margin-top solid-bottom">
				<view class="cu-item" data-title="工作经验" data-infobox="textarea" data-field="workexperience" :data-value="userinfo.workexperience">
					<view class="content">
						<text>工作经验</text>
					</view>
				</view>
			</view>
			<view class="padding bg-white">
				<text>{{userinfo.workexperience}}</text>
			</view>
			
			<view class="cu-list menu margin-top solid-bottom">
				<view class="cu-item" data-title="个人描述" data-infobox="textarea" data-field="eduexperience" :data-value="userinfo.eduexperience">
					<view class="content">
						<text>个人描述</text>
					</view>
				</view>
			</view>
			<view class="padding bg-white">
				<text>{{userinfo.eduexperience}}</text>
			</view>
			
			<view class="padding"></view>
		</form>
			
		
	</view>
</template>

<script>
	var _this;
	import avatar from "@/components/yq-avatar/yq-avatar.vue";
	export default {
		components: {
			avatar
		},
		data() {
			return {
				userinfo: {}
			}
		},
		onLoad: function(option) {
			_this = this;
			_this.checkLogin("/pages/my/myinfo");
			var userid = option.userid || 0;
			_this.$req.ajax({
				title: "获取报名人员信息",
				path: "worker/getuserinfobyuserid",
				data: {
					userid: userid
				}
			}).then((data) => {
				//console.log(data);
				_this.userinfo=data.userinfo;
				console.log(data);
				// uni.showModal({
				// 	title: '温馨提示',
				// 	content: "恭喜您，报名成功，请尽快提供就业人员。",
				// 	showCancel: false
				// });
			}).catch((err) => {
				uni.showModal({
					title: '温馨提示',
					content: err,
					showCancel: false
				});
			});
		},
		methods: {}
	}
</script>

<style>
</style>
