<template>
	<view class="container my-index">
		<img class="user-header-image" :src="bgImage" alt="" />
		<!-- 用户信息 - 开始 -->
		<view class="user-info-box">
			<img class="img" :src="logoImage" alt="" />
			<view class="user-info-right">
				<view class="user-nickname" @click="goPage('/pages/login/login')">登录/注册</view>
			</view>
		</view>
		<!-- 用户信息 - 结束 -->
		<view class="user-activity-menu">
			<view class="menu-item">
				<view class="left">
					<uni-icons type="home" size="24" color="#535353"></uni-icons>
					<view class="menu-name">我的房源</view>
				</view>
				<uni-icons type="right" size="20" color="#717171"></uni-icons>
			</view>
			<view class="menu-item">
				<view class="left">
					<uni-icons type="wallet" size="24" color="#535353"></uni-icons>
					<view class="menu-name">缴费管理</view>
				</view>
				<uni-icons type="right" size="20" color="#717171"></uni-icons>
			</view>
			<view class="menu-item">
				<view class="left">
					<uni-icons type="calendar" size="24" color="#535353"></uni-icons>
					<view class="menu-name">发票管理</view>
				</view>
				<uni-icons type="right" size="20" color="#717171"></uni-icons>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				bgImage: require('@/static/image/my/banner.png'),
				logoImage: require('@/static/image/login/logo.png'),
			};
		},
		created() {},
		onShow() {},
		methods: {
			/* 跳转页面 */
			goPage(page) {
				uni.navigateTo({
					url: page
				})
			}
		}
	}
</script>

<style lang="scss">
	.my-index {
		position: relative;

		.user-header-image {
			width: 100%;
			height: 320rpx;
			object-fit: cover;
		}

		.user-info-box {
			background: #ffffff;
			padding: 30rpx;
			position: absolute;
			border-radius: 20rpx;
			display: flex;
			align-items: center;
			top: 250rpx;
			left: 30rpx;
			right: 30rpx;

			.img {
				width: 100rpx;
				height: 100rpx;
				border-radius: 10rpx;
			}

			.user-info-right {
				margin-left: 20rpx;
			}
		}

		.user-activity-menu {
			margin: 30rpx;
			margin-top: 120rpx;
			border-radius: 20rpx;
			background: #fff;

			.menu-item {
				display: flex;
				align-items: center;
				justify-content: space-between;
				height: 96rpx;
				padding: 0 30rpx;

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

					.menu-icon {
						width: 40rpx;
						height: 40rpx;
					}


					.menu-name {
						margin-left: 20rpx;
						color: #333;
					}
				}
			}
		}
	}
</style>