<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/user/changePassword/changePassword"
				})
			},
			tuichu() {
				this.$auth.logout()
			}
		}
	}
</script>

<style lang="scss">
	.page {


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

			.box {
				display: flex;

				.portrait {
					width: 150rpx;
					height: 150rpx;
					border-radius: 150rpx;
					border: 6rpx solid #fff;

					img {
						width: 100%;
						height: 100%;
						border-radius: 150rpx;
					}
				}

				.information {
					color: #fff;
					margin: 30rpx 20rpx;
					font-size: 36rpx;

					.name {
						margin-bottom: 20rpx;
					}
				}
			}
		}

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

			.item {
				display: flex;
				background-color: #fff;
				width: 90%;
				margin: 0 auto;
				height: 80rpx;
				line-height: 80rpx;
				border-radius: 10rpx;
				padding-left: 20rpx;

				img {
					height: 40rpx;
					margin-top: 20rpx;
					width: 40rpx;
				}
			}

		}

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