<template>
	<dmDialog ref='popView' :isShowTitle="true" title="我的信息" :isShowClose="true" :isShowConfirm="false" >
		<view class="content">
			<image class="img_head" v-if="userInfo.head" :src="userInfo.head" mode=""></image>
			<image class="img_head" v-else src="../../static/icons/icon_default_head.png" mode=""></image>
			<view class="item_info">
				<text class="info_title" :style="{color:contentColor}">用户名</text>
				<text class="info_name" :style="{color:titleColor}">{{userInfo.name||'-'}}</text>
			</view>
			<view class="item_info">
				<text class="info_title" :style="{color:contentColor}">性别</text>
				<text class="info_name" :style="{color:titleColor}">{{userInfo.sex||'-'}}</text>
			</view>
			<view class="item_info">
				<text class="info_title" :style="{color:contentColor}">手机</text>
				<text class="info_name" :style="{color:titleColor}">{{userInfo.phone||'-'}}</text>
			</view>
			<view class="item_info">
				<text class="info_title" :style="{color:contentColor}">证件号</text>
				<text class="info_name" :style="{color:titleColor}">{{userInfo.cardNo||'-'}}</text>
			</view>
			<view class="item_info">
				<text class="info_title" :style="{color:contentColor}">房间信息</text>
				<text class="info_name" :style="{color:titleColor}">{{userInfo.room||'-'}}</text>
			</view>
			
		</view>
	</dmDialog>
</template>

<script>
	let app = getApp();
	import dmDialog from "./dmDialog.vue"
	export default{
		props:{
			userInfo:{
				"userId": "",
				"name": null,
				"head": null,
				"curlevel": null,
				"curIncome": null,
				"nextLevel": null,
				"nextIncome": null,
				"ownersUnion": false,
				"totalIncome": null,
				"taskCount": null,
				"surplusTaskAmount": null,
				"cardNo":"",
				"phone":"",
				"room":"",
				"sex":"",
			}
		},
		data(){
			return {
				contentColor:"",
				titleColor:"",
			}
		},
		methods:{
			show() {
				this.$refs.popView.show()
			},
			knowAction(){
				this.$refs.popView.hide()
			},
			
		},
		mounted() {
			this.titleColor = getApp().globalData.titleColor;
			this.contentColor = getApp().globalData.contentColor;
		},
		
		components:{
			dmDialog
		}
		
	}
</script>

<style scoped lang="scss">
	.content{
		width: 100%;
		margin-top: 30rpx;
		display: flex;
		flex-direction: column;
		align-items: center;
		
		.img_head{
			width: 168rpx;
			height: 168rpx;
			border-radius: 50%;
			margin-bottom: 76rpx;
			margin-top: 50rpx;
		}
		.item_info{
			width: 100%;
			display: flex;
			align-items: center;
			margin-bottom: 48rpx;
			padding-left: 60rpx;
			box-sizing: border-box;
			padding-right: 20rpx;
			.info_title{
				font-size: 28rpx;
				font-family: Verdana, Verdana-Regular;
				font-weight: 400;
				text-align: left;
				color: #b1b1b1;
				min-width: 200rpx;
			}
			.info_name{
				font-size: 28rpx;
				font-family: Verdana, Verdana-Regular;
				font-weight: 400;
				text-align: left;
				color: #262626;
			}
		}
	}

</style>
