<template>
	<view>
		<!-- 页面标题内容 -->
		<view class="flex-row" style="margin: 140rpx 40rpx 0 40rpx;">
			<view class="info-box">
				<view class="flex-baseline">
					<view class="info-title">{{currentYear}}</view>
					<view class="info-subtitle">学年</view>
					<view class="info-title" style="margin-left: 10rpx;">{{childInfo.periodName}}</view>
				</view>
				<view class="flex-baseline">
					<view class="tag" style="margin-left: 0;">
						<view class="tag-text">{{childInfo.schoolName}}</view>
					</view>
					<view class="tag">
						<view class="tag-text">{{childInfo.className}}</view>
					</view>
					<view class="tag">
						<view class="tag-text">{{childInfo.name}}同学</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		mapState,
		mapMutations
	} from 'vuex'
	export default {
		name: "top-semester",
		computed: {
			...mapState('m_children', ['childInfo']),
		},
		data() {
			return {
				currentYear: ''
			};
		},
		created() {
			this.getYear()
		},
		methods: {
			getYear() {
				this.currentYear = new Date().getFullYear()
			}
		}
	}
</script>

<style lang="scss">
	.info-box {
		display: flex;
		flex-direction: column;
		height: 170rpx;
		justify-content: space-around;

		.info-title {
			font-size: 70rpx;
			font-family: YSfont;
			color: #FFF;
			z-index: 2;
			text-shadow: 1px -1px 0px #c0c0c0, 2px -2px 0px #b0b0b0, 1px -1px 0px #a0a0a0, 2px -2px 0px #909090;
		}

		.info-subtitle {
			font-size: 40rpx;
			font-family: YSfont;
			color: #FFF;
			z-index: 2;
			margin-left: 10rpx;
			text-shadow: 1px -1px 0px #c0c0c0, 2px -2px 0px #b0b0b0, 1px -1px 0px #a0a0a0, 2px -2px 0px #909090;
		}
	}

	.tag {
		margin-left: 20rpx;
		border-radius: 6rpx;
		border: 2px solid #FFF;
		padding: 0 6rpx;
		z-index: 9;

		.tag-text {
			font-size: 32rpx;
			font-family: YSfont;
			color: #FFF;
			z-index: 9;
		}
	}
</style>
