Showing
2 changed files
with
21 additions
and
4 deletions
| @@ -21,7 +21,17 @@ Component({ | @@ -21,7 +21,17 @@ Component({ | ||
| 21 | 'date,section': function(newdate,newsection) { | 21 | 'date,section': function(newdate,newsection) { |
| 22 | console.log('room',newdate,newsection) | 22 | console.log('room',newdate,newsection) |
| 23 | if(newdate && newsection){ | 23 | if(newdate && newsection){ |
| 24 | - this.getroomtype(); | 24 | + if(this.date && this.section){ |
| 25 | + if(newdate!=newdate && this.section!=newsection){ | ||
| 26 | + this.getroomtype(); | ||
| 27 | + this.date=newdate; | ||
| 28 | + this.section=newsection; | ||
| 29 | + } | ||
| 30 | + }else{ | ||
| 31 | + this.getroomtype(); | ||
| 32 | + this.date=newdate; | ||
| 33 | + this.section=newsection; | ||
| 34 | + } | ||
| 25 | } | 35 | } |
| 26 | } | 36 | } |
| 27 | }, | 37 | }, |
| @@ -20,9 +20,16 @@ Component({ | @@ -20,9 +20,16 @@ Component({ | ||
| 20 | 'date,section': function(newdate,newsection) { | 20 | 'date,section': function(newdate,newsection) { |
| 21 | console.log('room',newdate,newsection) | 21 | console.log('room',newdate,newsection) |
| 22 | if(newdate && newsection){ | 22 | if(newdate && newsection){ |
| 23 | - this.setData({ | ||
| 24 | - seletroomlist:[] | ||
| 25 | - }) | 23 | + if(this.date && this.section){ |
| 24 | + if(newdate!=newdate && this.section!=newsection){ | ||
| 25 | + this.setData({ | ||
| 26 | + seletroomlist:[] | ||
| 27 | + }) | ||
| 28 | + this.date=newdate; | ||
| 29 | + this.section=newsection; | ||
| 30 | + } | ||
| 31 | + } | ||
| 32 | + | ||
| 26 | } | 33 | } |
| 27 | } | 34 | } |
| 28 | }, | 35 | }, |
-
Please register or login to post a comment