<ion-header>
	<ion-navbar>
		<ion-title text-center>活动报名</ion-title>
	</ion-navbar>
</ion-header>
<ion-content class="content">

	<div class="item1">
		<div class="img-box">
			<img class="item1-image" src="./assets/imgs/logo.png">
		</div>
		<div class="item1-content">
			<div class="margin-5-0">
				<label class="item1-title">{{activity?.activityName}}</label>
				<div class="item1-content-box">
					 <span *ngIf="activity?.activityNo == '0'" (click)="sayNo()" class="item-type">不想参加</span>
				</div>
			</div>
			<div class="item1-introduction">
				{{activity.activityIntro}}
				<button class="btn-introduce" (click)="show()">具体介绍</button>
			</div>
		</div>
	</div>

	<div class="item2">
		<ion-list class="item-list">
			<ion-item class="list-title">
				<label class="item-label">
					<span class="item-title">
						批次信息
						 <ng-container *ngIf="batchList.length > 0">
							 (最多可报名
								<span *ngIf="activity.applyCount == 0 || !activity.applyCount">{{ batchList.length}}</span>
								<span *ngIf="activity.applyCount != 0">{{activity.applyCount}}</span>
							个批次信息)
						 </ng-container>
					</span>
				</label>
			</ion-item>
			<ion-item class="item2-content"  *ngIf="batchList.length > 0">
				<div *ngFor="let batch of batchList" class="item2-box" (click)="goBatchDetail(batch)">
					<p>
						<span class="color-666">批次名称:</span>
						<span>{{batch.batchName}}</span>
						<!--是否报名 > 是否截止 > 是否满员 -->
						<ng-container *ngIf="batch.order">
							<span class="activity-btn2" *ngIf="batch.order" float-right>已报名</span>
						</ng-container>
						<ng-container *ngIf="!batch.order">
							<ng-container *ngIf="batch.signUp">
								<ng-container *ngIf=" batch.hasSignUpCount < batch.batchLimitNumber">
									<span class="activity-btn2" float-right>未报名</span>
								</ng-container>
								<ng-container *ngIf="batch.hasSignUpCount == batch.batchLimitNumber">
									<span  class="activity-btn2" float-right>已满员</span>
								</ng-container>
							</ng-container>

							<ng-container *ngIf="! batch.signUp">
								<span class="activity-btn2" float-right>已截止</span>
							</ng-container>
						</ng-container>

					</p>
					<p>
						<span class="color-666">截止时间:</span>
						<span>{{batch.batchEndDate}}</span>
						<span class="color-24bafc" float-right>{{batch.hasSignUpCount}}/{{batch.batchLimitNumber}}</span>
					</p>
				</div>
			</ion-item>
			<p class="no-info" *ngIf="batchList.length == 0">
				暂无批次
			</p>
		</ion-list>
	</div>
</ion-content>

<div class="cover" *ngIf="isCover">
	<div class="cover-content">
		<div class="cover-content-box">
			<h4 class="cover-content-title">具体介绍</h4>
			<div class="cover-content-info">
				<p>
					{{activity?.activityIntro}}
				</p>
			</div>
			<button ion-button block (click)="hidden()">
				关闭
			</button>
		</div>
	</div>
</div>