Commit e8c6d36b authored by wangqinghua's avatar wangqinghua

截止

parent c477d1cb
...@@ -46,13 +46,13 @@ export class ActivityDetailPage { ...@@ -46,13 +46,13 @@ export class ActivityDetailPage {
this.batchList = this.activity.batchList; this.batchList = this.activity.batchList;
for( let i = 0;i<this.batchList.length;i++ ){ for( let i = 0;i<this.batchList.length;i++ ){
let endDate = this.batchList[i].batchEndDate + " 24:00:00"; let endDate = this.batchList[i].batchEndDate + " 24:00:00";
endDate = new Date(endDate) +""; //判断是否过截止日期 endDate = new Date(endDate).getTime() +''; //判断是否过截止日期
console.log(now,Number(endDate));
if( now > Number(endDate) ){ //已截止 if( now > Number(endDate) ){ //已截止
this.batchList[i].signUp = false; this.batchList[i].signUp = false;
}else{ // }else{ //
this.batchList[i].signUp = true; this.batchList[i].signUp = true;
} }
console.log(this.batchList);
} }
}, error => { }, error => {
this.appService.alert('网络异常!'); this.appService.alert('网络异常!');
......
...@@ -28,17 +28,8 @@ export class BatchDetailPage { ...@@ -28,17 +28,8 @@ export class BatchDetailPage {
} }
ionViewDidLoad() { ionViewDidLoad() {
let now = new Date().getTime();
this.batch = this.navParams.get('batch'); this.batch = this.navParams.get('batch');
this.activity = this.navParams.get('activity'); 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(){ initSwiper(){
......
...@@ -4,10 +4,12 @@ ...@@ -4,10 +4,12 @@
</ion-navbar> </ion-navbar>
</ion-header> </ion-header>
<ion-content> <ion-content>
<ion-slides #slides *ngIf="slidersItems.length>0" pager autoplay="2000" loop=true> <ion-slides #slides *ngIf="slidersItems.length>0" pager autoplay="2000" loop=true>
<ion-slide *ngFor="let item of slidersItems"> <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)"> <img src="{{picture+item.pictureId}}" class="slide-image" (click)="go(item)">
<p class="slides-title">{{item.title}}</p>
</div> </div>
</ion-slide> </ion-slide>
</ion-slides> </ion-slides>
......
...@@ -280,5 +280,11 @@ page-home { ...@@ -280,5 +280,11 @@ page-home {
float: right; float: right;
margin-right: 10px; 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"; ...@@ -19,6 +19,7 @@ import {ReportTrackPage} from "../../report/reportTrack/reportTrack";
import { CalendarComponentOptions } from "ion2-calendar"; import { CalendarComponentOptions } from "ion2-calendar";
import {NoticePage} from "../notice/notice"; import {NoticePage} from "../notice/notice";
declare var Swiper;
@IonicPage() @IonicPage()
@Component({ @Component({
selector: 'page-home', selector: 'page-home',
...@@ -110,7 +111,12 @@ export class HomePage { ...@@ -110,7 +111,12 @@ export class HomePage {
constructor(public navCtrl: NavController, public activityStatisticService: ActivityStatisticService, constructor(public navCtrl: NavController, public activityStatisticService: ActivityStatisticService,
public appService: AppService, public http: Http, private calendar: Calendar, public storage: Storage) { 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