<template>
	<view class="container">
		<view class="StudentsGraduate">
			<image src="../../static/images/StudentsGraduate.png" mode="aspectFit"></image>
		</view>
		<view class="StudentsGraduateInfo">
			<view class="schoolname">
				{{StudentsGraduateInfo.schoolname}}
			</view>
			<view class="StudentInfo">
				<span>{{StudentsGraduateInfo.name}}</span>
				<span>{{StudentsGraduateInfo.classname}}</span>
			</view>
			<view class="Graduate">
				恭喜您的小孩已经毕业！
			</view>
		</view>
		<!-- 返回小程序切换未毕业用户 -->
		<view style="width: 300rpx;text-align: center;margin: 0 auto;color: #08C379; margin-top: 50rpx;cursor: pointer;"
			@click="SwitchUser">
			<span style="text-decoration:underline;"> 切换小孩账号</span>
		</view>
	</view>
</template>

<script>
	export default {
		name: "StudentsGraduate",
		data() {
			return {
				StudentsGraduateInfo: {
					schoolname: "隆回县第一中学",
					classname: "高一63班",
					gradename: "高一",
					name: "王宇涵"
				}
			}
		},
		onLoad: function(options) {
			console.log(options);
			this.StudentsGraduateInfo = options
		},
		methods: {
			// 返回小程序切换用户
			async SwitchUser() {
				jWeixin.miniProgram.redirectTo({
					url: `/pages/setting/main`,
					success: function() {

					},
					fail: function(fail) {
						console.warn(fail)
						uni.showModal({
							content: JSON.stringify(fail)
						})
					}
				});
			}
		}
	}
</script>

<style scoped lang="scss">
	.container {
		padding-top: 128rpx;
	}

	.StudentsGraduate {
		width: 691rpx;
		height: 633rpx;
		margin: 0 auto;
		// margin-top: 136rpx;
		text-align: center;
	}

	.StudentsGraduateInfo {
		margin-top: 109rpx;
		text-align: center;

		.schoolname {
			height: 45rpx;
			font-size: 32rpx;
			font-family: PingFangSC-Semibold, PingFang SC;
			font-weight: 600;
			color: #08C379;
			line-height: 45rpx;
		}

		.StudentInfo {
			width: 372rpx;
			height: 70rpx;
			line-height: 70rpx;
			background: #08C379;
			border-radius: 40rpx;
			margin: 0 auto;
			margin-top: 21rpx;

			span:nth-child(1) {
				width: 132rpx;
				height: 62rpx;
				font-size: 44rpx;
				font-family: PingFangSC-Semibold, PingFang SC;
				font-weight: 600;
				color: #FFFFFF;
				line-height: 62rpx;
			}

			span:nth-child(2) {
				margin-left: 17rpx;
				width: 101rpx;
				height: 33rpx;
				font-size: 24rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #FFFFFF;
				line-height: 33rpx;
			}
		}

		.Graduate {
			height: 62rpx;
			font-size: 44rpx;
			font-family: PingFangSC-Medium, PingFang SC;
			font-weight: 500;
			color: #333333;
			line-height: 62rpx;
			margin-top: 75rpx;
		}
	}

	.StudentsGraduate image {
		width: 100%;
		height: 100%;
	}
</style>
