Commit e8c6d36b authored by wangqinghua's avatar wangqinghua

截止

parent c477d1cb
......@@ -46,13 +46,13 @@ export class ActivityDetailPage {
this.batchList = this.activity.batchList;
for( let i = 0;i<this.batchList.length;i++ ){
let endDate = this.batchList[i].batchEndDate + " 24:00:00";
endDate = new Date(endDate) +""; //判断是否过截止日期
console.log(now,Number(endDate));
endDate = new Date(endDate).getTime() +''; //判断是否过截止日期
if( now > Number(endDate) ){ //已截止
this.batchList[i].signUp = false;
}else{ //
this.batchList[i].signUp = true;
}
console.log(this.batchList);
}
}, error => {
this.appService.alert('网络异常!');
......
......@@ -28,17 +28,8 @@ export class BatchDetailPage {
}
ionViewDidLoad() {
let now = new Date().getTime();
this.batch = this.navParams.get('batch');
this.activity = this.navParams.get('activity');
console.log(this.activity);
let endDate = this.batch.batchEndDate + " 24:00:00";
endDate = new Date(endDate) +""; //判断是否过截止日期
if( now > Number(endDate) ){
this.batch.signUp = false;
}else{
this.batch.signUp = true;
}
}
initSwiper(){
......
......@@ -4,10 +4,12 @@
</ion-navbar>
</ion-header>
<ion-content>
<ion-slides #slides *ngIf="slidersItems.length>0" pager autoplay="2000" loop=true>
<ion-slide *ngFor="let item of slidersItems">
<div style="height:135px;width: 100%;">
<div style="height:135px;width: 100%;position: relative">
<img src="{{picture+item.pictureId}}" class="slide-image" (click)="go(item)">
<p class="slides-title">{{item.title}}</p>
</div>
</ion-slide>
</ion-slides>
......
......@@ -280,5 +280,11 @@ page-home {
float: right;
margin-right: 10px;
}
.slides-title{
position: absolute;
bottom: 5px;
left: 15px;
font-size: 1.5rem;
}
}
......@@ -19,6 +19,7 @@ import {ReportTrackPage} from "../../report/reportTrack/reportTrack";
import { CalendarComponentOptions } from "ion2-calendar";
import {NoticePage} from "../notice/notice";
declare var Swiper;
@IonicPage()
@Component({
selector: 'page-home',
......@@ -110,7 +111,12 @@ export class HomePage {
constructor(public navCtrl: NavController, public activityStatisticService: ActivityStatisticService,
public appService: AppService, public http: Http, private calendar: Calendar, public storage: Storage) {
let swiper = new Swiper('.swiper-container', {
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
},
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment