<template>
	<view class="container">
		
		<view class="navigation-bar">燃脂功能训练帮手</view>
		<view class="bg">
			<image class="bg-img" src="../../static/login/Bg.png" mode="aspectFit"></image>
			
			<view class="boy">
				<image class="logo" src="/static/login/Beard.png" mode="aspectFit" @click="onClick(0, $event)"></image>
				<view class="boy-title">我是男生</view>
			</view>
			<view class="girl" >
				<image class="logo" src="/static/login/Lips.png" mode="aspectFit" @click="onClick(1, $event)"></image>
				<view class="girl-title">我是女生</view>
			</view>
		</view>
		<!-- <view class="gender">
			<view class="boy" @click="onClick(0, $event)">
				<image class="logo" src="/static/login/Beard.png" mode="aspectFit"></image>
			</view>
			<view class="girl" @click="onClick(1, $event)">
				<image class="logo" src="/static/login/Lips.png" mode="aspectFit"></image>
			</view>
		</view> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		onLoad() {
	
		},
		methods: {
			onClick: function(id,e) {
				getApp().globalData.gender = id;
			
				uni.navigateTo({
					url: '/pages/home/home',
					animationType: 'slide-in-left',
					/*
					slide-in-right 右侧
					slide-in-left 左侧
					slide-in-top 顶部
					slide-in-bottom 底部
					pop-in 新窗体从左侧进入，且老窗体被挤压而出
					fade-in 新窗体从透明到不透明逐渐显示
					zoom-out 新窗体从小到大缩放显示
					zoom-fade-out 新窗体从小到大逐渐放大并且从透明到不透明逐渐显示
					none 无动画
					*/
					animationDuration: 2000,
					success: res => {},
					fail: () => {},
					complete: () => {}
				});
			}
		}
	}
</script>

<style lang="scss">
	.container {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		
		width:100%;
		height: 100vh; 
		
		// testing
		//border: 1px solid rgb(0,0,0);
	}
	
	.navigation-bar
	{
		display: flex;
		align-items: center;
		justify-content: center;
		
		width:100%;
		height: 6%;
		
		font-weight: 700;
		color: black;
		font-size: 75rpx;
		
		 background-color: white;
		// testing
		// border: 1px solid rgb(255,0,0);
		// background-color: rgb(253,222,157);
	}
	
	.bg
	{
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		
		width:100%;
		height: 100%;
		
		.bg-img{
			position: absolute;
			width:100%;
			height: 100%;
			top:0;
			left:0;
			z-index: 0;
		}
		
		// testing
		// border: 13px solid rgb(253,222,157);
		// background-color: rgb(253,222,157);
	}

	.boy{
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		
		width:50%;
		height:100%;
		
		z-index: 1;
		// 测试
		// margin: 10rpx;
		// border: 3px solid rgb(144,238,144);
	}
	.girl{
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		
		width:50%;
		height:100%;
	}
	.logo
	{
		margin: 75rpx;
	}
	.boy-title {
		color: #4D857C;
		font-weight: 700;
		font-size: 95rpx;
		z-index: 1;
	}
	
	.girl-title {
		color: #B35D5C;
		font-weight: 700;
		font-size: 95rpx;
		z-index: 1;
	}
</style>