<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="{{picture + activity?.activityIMG}}">
        </div>
        <div class="item1-content">
            <div class="margin-5-0">
                <label class="item1-title">{{activity?.activityName}}
                    <button class="btn-introduce" (click)="show()">具体介绍</button>
                </label>
            </div>
            <div class="item1-introduction">
                <!--{{activity.activityIntro}}-->
                {{introduce}}
            </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>
							个批次)
                                 <span *ngIf="activity?.activityNo == '0'" (click)="sayNo()" class="item-type">不想参加</span>
                                 <span *ngIf="activity?.activityNo == '1'" (click)="sayYes()" class="item-type">参加</span>

						 </ng-container>
					</span>
                </label>
            </ion-item>
            <ng-container *ngIf="activity?.activityNo == '0'">
                <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.orderstate == 1 || batch.order.orderstate == 2"
                                  float-right>已报名</span>
                                <span class="activity-btn2" *ngIf="batch.order.orderstate == 4" float-right>已评价</span>
                                <span class="activity-btn2" *ngIf="batch.order.orderstate == 3" 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>
            </ng-container>
            <ng-container *ngIf="activity?.activityNo != '0'">
                <p class="no-info">
                    已选择不想参加
                </p>
            </ng-container>
            <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 class="submit-btn submit" (click)="hidden()">关闭</button>
        </div>
    </div>
</div>