<template>
	<view class="page">
		<view class="top">
			<view class="box">
				<view class="portrait">
					<img src="../../static/logo.png" alt="">
				</view>
				<view class="information">
					<view class="name">
						{{list.name}}
					</view>
					<view class="organization">
						{{list.organizationName}}
					</view>
				</view>
			</view>
		</view>
		<view class="items">
			<view class="item">
				<view style="flex: 1;" class="text" @tap="changePassword()">
					修改密码
				</view>
				<img src="../../static/arrow.png" alt="">
			</view>
		</view>
		<view @tap="tuichu()" class="tuichudenglu">
			退出登录
		</view>
		<tabbar :selected="3"></tabbar>
	</view>
</template>

<script>
	import tabbar from '../../components/tabbar.vue'
	export default {
		components: {
			tabbar
		},
		data() {
			return {
				list: {}
			}
		},
		onLoad() {
			this.list = uni.getStorageSync("user")
			console.log(this.list);
		},
		methods: {
			changePassword() {
				uni.navigateTo({
					url: "/pages/changePassword/changePassword"
				})
			},
			tuichu() {
				this.$auth.logout()
			}
		}
	}
</script>

<style lang="scss">
	.page {
		box-sizing: border-box;
		padding-bottom: 100rpx;

		.top {
			background: linear-gradient(180deg, #317AFF 0%, #ACD1FF 100%);
			height: 250rpx;
			padding: 10rpx 66rpx;

			.box {
				display: flex;

				.portrait {
					width: 130rpx;
					height: 130rpx;
					border-radius: 130rpx;
					border: 3rpx solid #fff;
					overflow: hidden;
					img {
						width: 100%;
						height: 100%;
					}
				}

				.information {
					color: #fff;
					margin: 18rpx 25rpx;
					.name {
						font-size: 35rpx;
						margin-bottom: 12rpx;
					}
					.organization{
						font-size: 30rpx;
					}
				}
			}
		}

		.items {
			width: 100%;
			margin-top: -50rpx;

			.item {
				display: flex;
				background-color: #fff;
				width: 90%;
				margin: 0 auto;
				height: 110rpx;
				line-height: 110rpx;
				border-radius: 8rpx;
				box-sizing: border-box;
				padding: 0 20rpx;
				font-size: 30rpx;
				img {
					height: 40rpx;
					margin-top: 38rpx;
					width: 40rpx;
				}
			}

		}

		.tuichudenglu {
			width: 100%;
			color: gray;
			margin-top: 40rpx;
			text-align: center;
		}
	}
</style>
