<template>
	<div class="center">
		<!-- 用户信息 -->
		<div class="user-info">
			<div class="user-box">
				<div class="user-img">
					<image src="@/static/logo.png" mode="widthFix"></image>
				</div>
				<div class="base">
					<div class="user-name">李知意</div>
					<div class="user-project">高新区项目一队项目1</div>
				</div>
			</div>
			<image class="user-bg" src="@/static/image/center/center-bg.png" mode="widthFix"></image>
		</div>

		<!-- 菜单 -->
		<div class="menus">
			<uv-cell-group :border="false">
				<uv-cell @click="clickMenu(1)" title="打卡记录" isLink arrow-direction="right" center>
					<template v-slot:icon>
						<image style="width: 30rpx;" src="@/static/image/center/menu1.png" mode="widthFix"></image>
					</template>
				</uv-cell>
				<uv-cell @click="clickMenu(2)" icon="setting-fill" isLink arrow-direction="right" title="实名认证" center>
					<template v-slot:icon>
						<image style="width: 30rpx;" src="@/static/image/center/menu2.png" mode="widthFix"></image>
					</template>
				</uv-cell>
				<uv-cell @click="clickMenu" icon="integral-fill" title="版本" value="版本1.0" center>
					<template v-slot:icon>
						<image style="width: 30rpx;" src="@/static/image/center/menu3.png" mode="widthFix"></image>
					</template>
				</uv-cell>
			</uv-cell-group>
		</div>

		<tabbar :select="1"></tabbar>
	</div>
</template>

<script>
	import tabbar from '../../components/base/tabbar.vue'
	export default {
		name: "Center",
		components: {
			tabbar
		},
		data() {
			return {

			}
		},
		methods: {
			clickMenu(index){
				if(index == 1){
					uni.navigateTo({
						url: "/pages_order/record/record"
					})
				}else if(index == 2){
					uni.navigateTo({
						url: "/pages/autonym/autonym"
					})
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.center {

		// 用户信息
		.user-info {
			display: flex;
			align-items: center;
			position: relative;
			height: 325rpx;
			overflow: hidden;
			padding-top: var(--status-bar-height);

			.user-box {
				display: flex;
				width: 90%;
				position: absolute;
				left: 50%;
				transform: translateX(-50%);
				z-index: 10;
				color: white;

				.user-img {
					width: 130rpx;
					height: 130rpx;
					overflow: hidden;

					image {
						width: 100%;
					}
				}

				.base {
					width: calc(100% - 150rpx);
					display: flex;
					flex-direction: column;
					justify-content: space-around;
					box-sizing: border-box;
					padding: 10rpx 0rpx 10rpx 10rpx;
					
					.user-name {
						font-size: 36rpx;
					}
					
					.user-project {
						font-size: 30rpx;
					}
				}
			}

			.user-bg {
				width: 750rpx;
				position: absolute;
				left: 0;
				top: 0;
			}
		}

		// 菜单
		.menus {
			width: 90%;
			margin: 0rpx auto;
		}
	}
</style>