<template>
	<view class="person_page page_padding font13">
		<view class="person_dataA contentboxsty">
			<view class="content_box logo_box">
				<view class="data_name">头像</view>
				<view class="">
					<button class="person_button" open-type="chooseAvatar" @chooseavatar='onChooseAvatar'>
					  <image class="person_logo" :src="avatarUrl"></image>
					</button>
				</view>
			</view>
			<view class="content_box">
				<view class="data_name">真实姓名</view>
				<view class="">
					>
				</view>
			</view>
			<view class="content_box noborbot">
				<view class="data_name">登录名</view>
				<view class="">
					
				</view>
			</view>
		</view>
		<view class="person_dataB contentboxsty">
			<view class="content_box" @click="toChangPhone()">
				<view class="data_name">手机号</view>
				<view class=""></view>
			</view>
			<view class="content_box noborbot">
				<view class="data_name">微信</view>
				<view class=""></view>
			</view>
		</view>
		<view class="person_dataC contentboxsty">
			<view class="content_box">
				<view class="data_name">设备故障通知</view>
				<view class="">
					
				</view>
			</view>
			<view class="content_box">
				<view class="data_name">出材率预警通知</view>
				<view class=""></view>
			</view>
			<view class="content_box noborbot">
				<view class="data_name">设备保修通知</view>
				<view class=""></view>
			</view>
		</view>
		<view class="person_dataD contentboxsty">
			<view class="content_box noborbot">
				<view class="data_name">清除缓存</view>
				<view class=""></view>
			</view>
		</view>
	</view>
</template>

<script>
	const defaultAvatarUrl = 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0';
	
	export default {
		data() {
			return {
				avatarUrl:defaultAvatarUrl
			}
		},
		methods: {
			onChooseAvatar(e) {
				
				uni.showToast({
					title:'成功',
					duration:1000
				})
				this.avatarUrl = e.detail.avatarUrl
			},
			//跳转更改手机号页面
			toChangPhone(){
				uni.navigateTo({
					url: '/pages/person/changePhone'
				  })
			}
		}
	}
</script>

<style lang="scss" >
.person_page{
	.person_dataA{
		padding: 0 14px;
		margin-bottom: 12px;
	}
	.person_dataB{padding: 0 14px;margin-bottom: 12px;}
	.person_dataC{padding: 0 14px;margin-bottom: 12px;}
	.person_dataD{padding: 0 14px;}
	.content_box{
		display: flex;align-items: center;height: 44px;border-bottom: 1px solid #2D3A6F;
	}
	.logo_box{height: 64px;
		.person_button{width: 40px;height: 40px;border-radius: 50%;padding: 0;}
		.person_logo{width: 40px;height: 40px;}
	}
	.data_name{flex: 1;}
}

 
</style>
