<template>
	<view class="container">
		<image class="cbg" src="../../static/common_bg.png"></image>
		<view class="wrap">
			<view v-if="info.status===0">
				<view>{{userInfo.username}}:</view>
				<view>欢迎您报名{{courseInfo.name}}，我们将在1-3个工作日内审核并通知您报名结果….</view>
			</view>
			<view v-else-if="info.status===1">
				<view>{{userInfo.username}}:</view>
				<view>您已被{{courseInfo.name}}录取！<span
						v-if="courseInfo.start_date">请于{{courseInfo.start_date}}到学院报到。</span></view>
			</view>
			<view v-else-if="info.status===2">
				<view>{{userInfo.username}}:</view>
				<view> 很遗憾，您未被{{courseInfo.name}}录取！</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		components: {},
		data() {
			return {
				info: {},
				userInfo: {},
				courseInfo: {}
			}
		},
		onLoad(options) {
			this.getCourseDetail(options.id)
		},
		methods: {
			async getCourseDetail(id) {

				const res = await this.$u.api.courseGetSign({
					course_id: id
				})
				this.info = res.detail
				this.userInfo = res.detail.user
				this.courseInfo = res.detail.course
				console.log("123", this.info, this.userInfo)
			},
		}

	}
</script>

<style scoped lang="scss">
	.container {
		padding: 30rpx;
		width: 100%;
		height: 100vh;

		.cbg {
			position: absolute;
			top: 0;
			left: 0;
			width: 100%;
			height: 100vh;
		}

		.wrap {
			position: relative;

		}
	}
</style>