Showing
1 changed file
with
7 additions
and
4 deletions
| @@ -29,14 +29,17 @@ Page({ | @@ -29,14 +29,17 @@ Page({ | ||
| 29 | console.log('onLoad',options); | 29 | console.log('onLoad',options); |
| 30 | this.id=options.id; | 30 | this.id=options.id; |
| 31 | this.ddate=options.ddate; | 31 | this.ddate=options.ddate; |
| 32 | - if(new Date()/1000+1800>options.ddate){ | 32 | + if(options.remindtime=='NaN'){ |
| 33 | + options.remindtime=0; | ||
| 34 | + } | ||
| 35 | + if(new Date()/1000+1800>parseInt(options.ddate)){ | ||
| 33 | this.setData({ | 36 | this.setData({ |
| 34 | reminds:[{val:0,label:'不提醒'}] | 37 | reminds:[{val:0,label:'不提醒'}] |
| 35 | }) | 38 | }) |
| 36 | }else{ | 39 | }else{ |
| 37 | - if(options.remindtime>0){ | 40 | + if(parseInt(options.remindtime)>0){ |
| 38 | this.setData({ | 41 | this.setData({ |
| 39 | - remindtime:(options.ddate-options.remindtime)/60 | 42 | + remindtime:(parseInt(options.ddate)-parseInt(options.remindtime))/60 |
| 40 | }) | 43 | }) |
| 41 | } | 44 | } |
| 42 | } | 45 | } |
| @@ -75,7 +78,7 @@ Page({ | @@ -75,7 +78,7 @@ Page({ | ||
| 75 | console.log(val); | 78 | console.log(val); |
| 76 | this.remind_date=0; | 79 | this.remind_date=0; |
| 77 | if(val>0){ | 80 | if(val>0){ |
| 78 | - this.remind_date=parseInt(this.rdate)-parseInt(val*60); | 81 | + this.remind_date=parseInt(this.ddate)-parseInt(val*60); |
| 79 | } | 82 | } |
| 80 | }, | 83 | }, |
| 81 | remind(){ | 84 | remind(){ |
-
Please register or login to post a comment