<template>
	<view>
		<view class="mineBox">
			<view class="userInformation">
				<view class="userAvatar">
					<image :src="userAvatar ? userAvatar : '../../static/mine/Avatar_default.png'" mode="aspectFill">
					</image>
				</view>
				<view class="userInfo">
					<view class="infoTextone">
						<span>
							{{ username ? username : '未登录' }}
						</span>
						<span v-if="isManage" class="manage">管理员</span>
					</view>
					<view class="infoTexttwo">
						<span>个性签名</span>
					</view>
				</view>
			</view>
			<view class="userOptionsBox">
				<view class="optionsItemBox">
					<view class="optionItem">
						<view class="option_left">
							<span class="option_icon">
								<image src="../../static/mine/Subscribe.png" mode="aspectFill"></image>
							</span>
							<text class="option_text">
								我的订阅
							</text>
						</view>
						<view class="option_right">
							<image src="../../static/mine/arrow-right.png" mode="aspectFill"></image>
						</view>
					</view>
					<view class="optionItem">
						<view class="option_left">
							<span class="option_icon">
								<image src="../../static/mine/Collect.png" mode="aspectFill"></image>
							</span>
							<text class="option_text">
								我的收藏
							</text>
						</view>
						<view class="option_right">
							<image src="../../static/mine/arrow-right.png" mode="aspectFill"></image>
						</view>
					</view>
					<view class="optionItem">
						<view class="option_left">
							<span class="option_icon">
								<image src="../../static/mine/active.png" mode="aspectFill"></image>
							</span>
							<text class="option_text">
								我的活动
							</text>
						</view>
						<view class="option_right">
							<image src="../../static/mine/arrow-right.png" mode="aspectFill"></image>
						</view>
					</view>
					<view class="optionItem">
						<view class="option_left">
							<span class="option_icon">
								<image src="../../static/mine/myClass.png" mode="aspectFill"></image>
							</span>
							<text class="option_text">
								我的教研室
							</text>
						</view>
						<view class="option_right">
							<image src="../../static/mine/arrow-right.png" mode="aspectFill"></image>
						</view>
					</view>
				</view>
				<view class="optionsItemBox">
					<view class="optionItem">
						<view class="option_left">
							<span class="option_icon">
								<image src="../../static/mine/help.png" mode="aspectFill"></image>
							</span>
							<text class="option_text">
								反馈帮助
							</text>
						</view>
						<view class="option_right">
							<image src="../../static/mine/arrow-right.png" mode="aspectFill"></image>
						</view>
					</view>
					<view class="optionItem">
						<view class="option_left">
							<span class="option_icon">
								<image src="../../static/mine/setting.png" mode="aspectFill"></image>
							</span>
							<text class="option_text">
								我的设置
							</text>
						</view>
						<view class="option_right">
							<image src="../../static/mine/arrow-right.png" mode="aspectFill"></image>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				username: '情绪稳定的疯子',
				userAvatar: '../../static/mine/Avatar.png',
				isManage: true
			};
		}
	}
</script>

<style lang="scss" scoped>
	html {
		margin: 0;
		padding: 0;
		box-sizing: border-box;
	}

	.mineBox {
		width: 100%;

		// 头像信息
		.userInformation {
			width: 100%;
			height: 100px;
			padding: 0 18px;
			background-color: white;
			display: flex;
			justify-content: flex-start;
			align-items: center;

			.userAvatar {
				flex: 1;
				height: 80%;
				display: flex;
				align-items: center;

				image {
					width: 65px;
					height: 65px;
				}
			}

			.userInfo {
				margin-left: 10px;
				flex: 4;
				height: 80%;
				display: flex;
				flex-direction: column;
				justify-content: space-evenly;

				.infoTextone {
					display: flex;
					align-items: center;

					span {
						&:first-child {
							color: #000;
							font-size: 40rpx;
							font-weight: 600;
						}

						&.manage{
							width: 63rpx;
							padding: 2rpx;
							font-size: 20rpx;
							color: #FFA338;
							border: 1px solid #FFA338;
							border-radius: 4rpx;
							margin-left: 5px;
						}
					}
				}

				.infoTexttwo {
					span {
						color: rgb(153, 153, 153);
						font-size: 26rpx;
					}
				}
			}
		}

		// 个人资料选项
		.userOptionsBox {
			width: 100%;
			margin-top: 10px;

			.optionsItemBox {
				background-color: #fff;
				width: 100%;
				margin-bottom: 10px;
				padding: 5px 23px;

				.optionItem {
					display: flex;
					justify-content: space-between;
					align-items: center;
					height: 81rpx;
					font-size: 28rpx;

					.option_left {
						display: flex;
						align-items: center;
						height: 40rpx;

						.option_icon {
							height: 100%;
							width: 40rpx;

							image {
								width: 100%;
								height: 100%;
							}
						}

						.option_text {
							margin-left: 10px;
						}
					}

					.option_right {
						height: 40rpx;

						image {
							height: 32rpx;
							width: 32rpx;
						}
					}
				}
			}
		}
	}
</style>
