<ion-header>
	<ion-navbar>
		<ion-title text-center>最新活动</ion-title>
	</ion-navbar>
</ion-header>

<ion-content scrollbar-y="true" direction="y">

	<ion-refresher (ionRefresh)="doRefresh($event)">
		<ion-refresher-content pullingIcon="arrow-dropdown" pullingText="Pull to refresh" refreshingSpinner="circles" refreshingText="正在刷新！">
		</ion-refresher-content>
	</ion-refresher>

	<ion-list *ngIf="items.length > 0">
		<ion-item *ngFor="let item of items">
			<div class="item">
				<div class="item-header">
					<div class="item-header-style">
						<!-- <ion-icon name="md-contact" class="icon"></ion-icon> -->
						<img src="./assets/imgs/icon-tj.png" class="icon" *ngIf="item.activityType==1">
						<img src="./assets/imgs/icon-ly.png" class="icon" *ngIf="item.activityType==2">
						<img src="./assets/imgs/icon-px.png" class="icon" *ngIf="item.activityType==3">
						<img src="./assets/imgs/icon-gh.png" class="icon" *ngIf="item.activityType==4">
						<span class="item-title">{{item.activityName}}</span>
					</div>

					<button ion-button round class="btn btn1" *ngIf="item.activityState==2 ">可报名</button>
					<button ion-button round class="btn btn2" *ngIf="item.activityState==1 ">已报名</button>
					<button ion-button round class="btn btn3" *ngIf="item.activityState==3 ">不可报名</button>
				</div>
				<div class="content-box" (click)="goDetail(item)">
					<div class="content-item-box">
						<label class="left-title">活动类型：</label>
						<div class="data">{{activityType[item.activityType]}}</div>
					</div>
					<div class="content-item-box">
						<label class="left-title">活动说明：</label>
						<div class="data data-1">
							{{item.activityIntro}}
						</div>
					</div>
				</div>
				<div class="content-button">
					<span>最新批次:</span>
					<span *ngIf="item.recent_batch">{{item.recent_batch.batchName}}</span>
					<span *ngIf="!item.recent_batch">暂无</span>
				</div>
				<!--<button class="sign-up" *ngIf="item.activityState==2 && item.orderList.length>0 " (click)="goDetail(item);$event.stopPropagation();">查看</button>-->
				<!--<button class="sign-up" *ngIf="item.activityState==2 && item.orderList.length==0 " (click)="goApply(item);$event.stopPropagation();">报名</button>-->
			</div>
		</ion-item>
	</ion-list>

	<ion-list text-center style="margin-top: 10rem" *ngIf="items.length == 0">
		<img style="width: 20%;" src="./assets/imgs/no-info.png" alt="">
		<p text-center>
			暂无数据
		</p>
	</ion-list>

</ion-content>