<template>
	<view class="detail_list">
		<view class="nierong" v-if="this.studentList.length > 0">
			<view class="header">
				<view class="xuehao">
					学号
				</view>
				<view class="xuehao">
					姓名
				</view>
				<view class="xuehao">
					手机号
				</view>
			</view>
			<view class="bodys" v-for="(item,index) in this.studentList">
				<view class="xuehao">
					{{item.account}}
				</view>
				<view class="xuehao">
					{{item.name}}
				</view>
				<view class="xuehao">
					{{item.mobile}}
				</view>
			</view>
		</view>
		<view class="empty" v-else>
			<view class="enptyStatus">
				<image src="../../static/empty.png" mode=""></image>
				<view class="words">
					暂无报名信息
				</view>
			</view>
		</view>
	</view>
	
</template>

<script>
export default {
	data() {
		return {
			studentList:[],
			student_id:'',
			
		};
	},
	onLoad(options) {
		console.log(options.student_id, '学生')
		this.student_id = options.student_id
		if (this.is_weixin()) {
			this.navTitle();
		}
	},
	onShow(){
		this.getList()
	},
	methods: {
		//判断是否是微信
		is_weixin() {
			let ua = navigator.userAgent.toLowerCase();
			return ua.indexOf('micromessenger') != -1;
		},
		navTitle() {
			let navTitle = document.getElementsByTagName('uni-page-head');
			navTitle[0].style.display = 'none';
		},
		async getList() {
			// 报名列表信息接口
			await this.$u
				.get('/inform/information-activity', {
					information_id: this.student_id
				})
				.then(res => {
					uni.hideLoading();
					console.log(res.data, '报名列表数据');
					this.studentList = res.data.list;
				});
		},
	}
};
</script>

<style lang="scss" scoped>
.detail_list {
	padding: 16px;
	.empty{
		margin-top: 100px;
	}
	.enptyStatus{
		display: flex;
		justify-content: center;
		align-items: center;
		flex-direction: column;
		padding: 30px 10px;
		image{
			width: 80px;
			height: 110px;
		}
		.words{
			color: #ffae21;
			font-size: 14px;
			padding-top: 10px;
		}
	}
	.header{
		display: flex;
		.xuehao{
			width: 33%;
			text-align: center;
			height: 40px;
			line-height: 40px;
			border: 1px solid #cccccc;
			font-size: 16px;
			font-weight: 900;
			background-color: #e3e3e3;
		}
	}
	.bodys{
		display: flex;
		.xuehao{
			width: 33%;
			text-align: center;
			height: 40px;
			line-height: 40px;
			border: 1px solid #cccccc;
			border-top: 0;
			font-size: 16px;
		}
	}
}
</style>
