Showing
1 changed file
with
10 additions
and
6 deletions
| @@ -48,17 +48,16 @@ Component({ | @@ -48,17 +48,16 @@ Component({ | ||
| 48 | console.log(json) | 48 | console.log(json) |
| 49 | if(json.ret==200){ | 49 | if(json.ret==200){ |
| 50 | this.houseFullDate=json.data; | 50 | this.houseFullDate=json.data; |
| 51 | - if(this.houseFullDate.indexOf(this.data.date)==-1){ | 51 | + if(this.houseFullDate.indexOf(this.data.date)==-1){ |
| 52 | this.triggerEvent('selectdate',{date:this.data.date,action:'defalut',houseFullStatus:0}) | 52 | this.triggerEvent('selectdate',{date:this.data.date,action:'defalut',houseFullStatus:0}) |
| 53 | - }else{ | 53 | + }else{ //满房 |
| 54 | this.triggerEvent('selectdate',{date:this.data.date,action:'defalut',houseFullStatus:1}) | 54 | this.triggerEvent('selectdate',{date:this.data.date,action:'defalut',houseFullStatus:1}) |
| 55 | } | 55 | } |
| 56 | if(json.data.length>0){ | 56 | if(json.data.length>0){ |
| 57 | this.changespeciallist(json.data) | 57 | this.changespeciallist(json.data) |
| 58 | } | 58 | } |
| 59 | - | ||
| 60 | }else{ | 59 | }else{ |
| 61 | - this.houseFullDate=json.data; | 60 | + this.houseFullDate=null |
| 62 | this.triggerEvent('selectdate',{date:this.data.date,action:'defalut',houseFullStatus:1}) | 61 | this.triggerEvent('selectdate',{date:this.data.date,action:'defalut',houseFullStatus:1}) |
| 63 | } | 62 | } |
| 64 | }) | 63 | }) |
| @@ -100,11 +99,16 @@ Component({ | @@ -100,11 +99,16 @@ Component({ | ||
| 100 | this.setData({ | 99 | this.setData({ |
| 101 | date:e.detail.date | 100 | date:e.detail.date |
| 102 | }) | 101 | }) |
| 103 | - if(this.houseFullDate.indexOf(this.data.date)==-1){ | ||
| 104 | - this.triggerEvent('selectdate',{date:this.data.date,action:'click',houseFullStatus:0}) | 102 | + if(this.houseFullDate){ |
| 103 | + if(this.houseFullDate.indexOf(this.data.date)==-1){ | ||
| 104 | + this.triggerEvent('selectdate',{date:this.data.date,action:'click',houseFullStatus:0}) | ||
| 105 | + }else{ //满房 | ||
| 106 | + this.triggerEvent('selectdate',{date:this.data.date,action:'click',houseFullStatus:1}) | ||
| 107 | + } | ||
| 105 | }else{ | 108 | }else{ |
| 106 | this.triggerEvent('selectdate',{date:this.data.date,action:'click',houseFullStatus:1}) | 109 | this.triggerEvent('selectdate',{date:this.data.date,action:'click',houseFullStatus:1}) |
| 107 | } | 110 | } |
| 111 | + | ||
| 108 | } | 112 | } |
| 109 | } | 113 | } |
| 110 | 114 |
-
Please register or login to post a comment