<template>
	<view class="navTab">
		<!-- <u-search v-model='keyware' placeholder='输入搜索内容' :actionStyle="customActionStyle"  
			showAction="true" actionText="搜索" :animation="false" @custom='seacrhko'></u-search> -->
		<view v-if="signuplist.length>0">			
			<view v-for="(item,key) of signuplist" class="sign_list" @click="signupdetails(item.issue_id)">
				<view style="display:flex;margin:0 12px 8px 0;justify-content: space-between;align-items: flex-end;">
					<view class="rightb">
						{{item.issue}}
					</view>
					<p v-if="item.create_time" style="font-size:24rpx;color: #808080;">报名时间：{{item.create_time.slice(0,10)}}	</p>
				</view>
				<view class="fline"></view>
				<view  style="margin:12px 15px 0 15px;color:#333333;font-size:13px;line-height:27px;">
					<p>课程内容：{{item.theme_name}}</p>
					<!-- start_time -->
					<p v-if="item.start_time" >开课时间：{{item.start_time.slice(0,4)}}年{{item.start_time.slice(5,7)}}月{{item.start_time.slice(8,10)}}日 09:00</p>
					<p>上课地点：{{item.class_addr}}</p>
					<p>报名人：{{item.name}}</p>
				</view>
			</view>
		</view>
		<view v-else style="font-size:46rpx;
			font-weight: bold;
			color: #9D9D9D; text-align:center;margin-top:100px">暂无报名信息</view>
		<view style="height:10px;"></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				keyware:'',
				customActionStyle: {
				  color: '#808080', // 按钮颜色
				  fontSize: '16px'  // 按钮字体大小
				  // 其他样式属性
				},
				signuplist:[],
			}
		},
		onLoad() {
			let wxUserInfo=uni.getStorageSync('wxUserInfo');
			if(wxUserInfo){
				this.http.quickGet(`/train/userApply/${wxUserInfo.userId}`,true).then(res=>{
					console.log('报名信息--',res)
					this.signuplist=res.data
				})
			}
		},
		methods: {
			seacrhko(){
				
			},
			signupdetails(id){				
				uni.navigateTo({
					url:`/pages/index/testtraining/signup?issueId=${id}&type=1`
				})
			},
		}
	}
</script>

<style>
	.navTab{
		padding:2vh 13px ;
	}
	.sign_list{
		width: 100%;
		background: #FFFFFF;
		border-radius: 10px;
		margin-bottom:20px;
		padding-bottom:15px;
	}
	.rightb{
		width: 183rpx;
		height: 54rpx;
		background: linear-gradient(90deg, #5EA6FD, #1A81F9);
		border-radius: 9px 0px 46px 0px;
		color: #FFFFFF;
		font-size:.8rem;
		line-height:  54rpx;
		text-align: center;
		
	}
	.fline{
		width: 100%;
		height: 1rpx;
		border: 1px solid #999999;
		opacity: 0.15;
	}
</style>
