Commit 19a9034af09fdefa6c8094f008406b8545ca8d1e

Authored by liuxuqinfhp1220
1 parent b7f66922

no message

@@ -118,7 +118,7 @@ Component({ @@ -118,7 +118,7 @@ Component({
118 if(i>=dayweek && i<monthdays+dayweek){ 118 if(i>=dayweek && i<monthdays+dayweek){
119 let thisday=i-dayweek+1; 119 let thisday=i-dayweek+1;
120 let thisdate=year+'-'+(month<10 ? '0'+month : month)+'-'+(thisday<10 ? '0'+thisday : thisday); 120 let thisdate=year+'-'+(month<10 ? '0'+month : month)+'-'+(thisday<10 ? '0'+thisday : thisday);
121 - let thistimestamp=Number(util.timetouUnix(thisdate,'-')); 121 + let thistimestamp=Number(util.timetouUnix(thisdate+' 00:00:00'));
122 thisdayobj={ 122 thisdayobj={
123 year:year, 123 year:year,
124 month:month, 124 month:month,
@@ -126,7 +126,7 @@ Component({ @@ -126,7 +126,7 @@ Component({
126 week:i%7, 126 week:i%7,
127 date:thisdate, 127 date:thisdate,
128 istoday:false, 128 istoday:false,
129 - overdate:thistimestamp<(new Date()/1000)-86400 ? true : false, //日期是否过期, 129 + overdate:thistimestamp<=(new Date()/1000)-86400 ? true : false, //日期是否过期,
130 } 130 }
131 if(thisdate==this.today.curdate){ 131 if(thisdate==this.today.curdate){
132 thisdayobj.automark=true; 132 thisdayobj.automark=true;
@@ -24,18 +24,17 @@ Component({ @@ -24,18 +24,17 @@ Component({
24 observers: { 24 observers: {
25 'date,section': function(newdate,newsection) { 25 'date,section': function(newdate,newsection) {
26 console.log('room',newdate,newsection) 26 console.log('room',newdate,newsection)
  27 + this.setData({
  28 + roomlist:[]
  29 + })
27 if(newdate && newsection){ 30 if(newdate && newsection){
28 - this.setData({  
29 - roomlist:[]  
30 - })  
31 this.getroomtype(); 31 this.getroomtype();
32 - }else{  
33 - this.setData({  
34 - roomlist:[]  
35 - })  
36 } 32 }
37 } 33 }
38 }, 34 },
  35 + attached(){
  36 + console.log('初次进入详情页---小米8测试',this.data.date ? this.data.date : '没有日期','openid:',getApp().openid)
  37 + },
39 methods:{ 38 methods:{
40 getroomtype(){ 39 getroomtype(){
41 let parmdata={ 40 let parmdata={
@@ -50,7 +50,7 @@ Component({ @@ -50,7 +50,7 @@ Component({
50 //获取日期列表 50 //获取日期列表
51 getdaylist(){ 51 getdaylist(){
52 //选中时间时间戳 52 //选中时间时间戳
53 - let selectedtime=Number(util.timetouUnix(this.data.date,'-')); 53 + let selectedtime=Number(util.timetouUnix(this.data.date+' 00:00:00'));
54 //选中日期星期几 54 //选中日期星期几
55 let selectedweek=new Date(this.data.date).getDay(); 55 let selectedweek=new Date(this.data.date).getDay();
56 //今天日期 56 //今天日期
@@ -68,7 +68,7 @@ Component({ @@ -68,7 +68,7 @@ Component({
68 day:thisdate.getDate(), 68 day:thisdate.getDate(),
69 week:thisdate.getDay(), 69 week:thisdate.getDay(),
70 date:util.unixtoTime(thistimestamp,'YYYY-MM-DD'), 70 date:util.unixtoTime(thistimestamp,'YYYY-MM-DD'),
71 - overdate:thistimestamp<(new Date()/1000)-86400 ? true : false, //日期是否过期 71 + overdate:thistimestamp<=(new Date()/1000)-86400 ? true : false, //日期是否过期
72 istoday:false 72 istoday:false
73 } 73 }
74 //是否是今天 74 //是否是今天
@@ -24,6 +24,7 @@ Page({ @@ -24,6 +24,7 @@ Page({
24 */ 24 */
25 onLoad: function (options) { 25 onLoad: function (options) {
26 console.log('onLoad', options) 26 console.log('onLoad', options)
  27 + console.log('初次进入详情页---小米8测试',this.data.reserveDate ? this.data.reserveDate : '没有日期','openid:',getApp().openid)
27 this.options=options 28 this.options=options
28 if(options.activeTab && options.activeTab!='detail'){ 29 if(options.activeTab && options.activeTab!='detail'){
29 this.setData({ 30 this.setData({