<template>
	<view class="page">
		<view class="status-bar"></view>
		<!-- 头像与名称 -->
		<view class="avatar">
			<image :src="userIcon" mode="aspectFill" class="icon"></image>
			<view class="text">
				<view class="name">{{userName}}</view>
				<view class="btn">
					<image src="../../static/images/ic_edit_icon.png"></image>
					<text style="margin-left: 10rpx;">完善个人资料</text>
				</view>
			</view>
		</view>
		<!-- 资料 -->
		<view class="amount">
			<view class="item" @click="openPage('/pages/user/mine_certif_search')">
				<view class="num">3333</view>
				<view>累计捐赠</view>
			</view>
			<view class="item">
				<view class="num">3333</view>
				<view>我的证书</view>
			</view>
			<view class="item">
				<view class="num">3333</view>
				<view>尽责参与</view>
			</view>
		</view>
		<!-- 功能 -->
		<view class="func-box">
			<view class="item" @click="openPage('/pages/user/mine_duty_certif')">
				<view class="item-content">
					<image src="../../static/images/ic_table_icon.png" mode="aspectFill"></image>
					<text>义务植树尽责证书</text>
				</view>
				<image src="../../static/images/ic_arrow_right.png" mode="aspectFill"></image>
			</view>
			<view class="item" @click="openPage('/pages/user/mine_honour_certif')">
				<view class="item-content">
					<image src="../../static/images/ic_from_icon.png" mode="aspectFill"></image>
					<text>国土绿化荣誉证书</text>
				</view>
				<image src="../../static/images/ic_arrow_right.png" mode="aspectFill"></image>
			</view>
			<view class="line"></view>
			<view class="item" @click="openPage('/pages/user/minejoin')">
				<view class="item-content">
					<image src="../../static/images/ic_order_icon.png" mode="aspectFill"></image>
					<text>我的劳动参与</text>
				</view>
				<image src="../../static/images/ic_arrow_right.png" mode="aspectFill"></image>
			</view>
			<view class="item">
				<view class="item-content">
					<image src="../../static/images/ic_print_icon.png" mode="aspectFill"></image>
					<text>我的捐赠尽责</text>
				</view>
				<image src="../../static/images/ic_arrow_right.png" mode="aspectFill"></image>
			</view>

		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				userIcon: "../../static/images/ic_user_default.png",
				userName: "昵称"
			}
		},
		methods: {
			openPage(url) {
				uni.navigateTo({
					url: url
				})
			}
		}
	}
</script>

<style lang="scss">
	page {
		height: 100%;

	}

	.page {
		display: flex;
		flex: 1;
		flex-direction: column;
		overflow: hidden;
		height: 100%;
		background: #F2F2F2;
	}

	.avatar {
		width: 95%;
		display: flex;
		flex-direction: row;
		align-self: center;
		align-items: center;
		margin-top: 50rpx;

		.icon {
			width: 130rpx;
			height: 130rpx;
			border-radius: 50%;
		}

		.text {
			display: flex;
			flex-direction: column;
			margin-left: 20rpx;

			.name {
				font-size: 40rpx;
				font-weight: 200;
				color: black;
				margin-left: 10rpx;
			}


			.btn {
				display: flex;
				flex-direction: row;
				padding: 8rpx 35rpx;
				background: #fff;
				box-shadow: 0 4rpx 8rpx 0 rgba(0, 0, 0, 0.05), 0 6rpx 20rpx 0 rgba(0, 0, 0, 0.03);
				border-radius: 30rpx;
				align-items: center;

				image {
					width: 30rpx;
					height: 30rpx;
				}
			}
		}
	}

	.amount {
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: center;
		padding: 30rpx;
		margin-top: 20rpx;

		.item {
			display: flex;
			flex-direction: column;
			justify-content: center;
			align-items: center;
			flex: 1;

			.num {
				font-weight: bold;
				font-size: 40rpx;
				color: black;
			}
		}
	}

	.func-box {
		display: flex;
		flex-direction: column;
		padding-top: 30rpx;
		border-top-left-radius: 40rpx;
		border-top-right-radius: 40rpx;
		background-color: #fff;
		height: 100%;

		.item {
			display: flex;
			flex-direction: row;
			justify-content: space-between;
			padding: 20rpx 40rpx;

			.item-content {
				display: flex;
				flex-direction: row;
				align-items: center;

				text {
					font-size: 30rpx;
					margin-left: 20rpx;
				}

				image {
					width: 40rpx;
					height: 40rpx;
				}
			}

			image {
				width: 30rpx;
				height: 30rpx;
			}
		}
	}

	.line {
		display: bock;
		width: 100%;
		height: 1rpx;
		margin-top: 40rpx;
		background: #e8e8e8;
	}
</style>
