Commit d0a1f3a3b594ede5df22d114d2c22d0549be19ea

Authored by liuxuqinfhp1220
1 parent eab22a2c

no message

@@ -15,17 +15,13 @@ Component({ @@ -15,17 +15,13 @@ Component({
15 }, 15 },
16 observers: { 16 observers: {
17 'date'(newdate){ 17 'date'(newdate){
18 - console.log('section',this.data.date,newdate) 18 + console.log('section',this.data.date,newdate,this.data.section)
19 //今天日期 19 //今天日期
20 if(newdate){ 20 if(newdate){
21 let today=util.unixtoTime(new Date()/1000,'YYYY-MM-DD'); 21 let today=util.unixtoTime(new Date()/1000,'YYYY-MM-DD');
22 this.getsectionlist(); 22 this.getsectionlist();
23 if(today==newdate){ 23 if(today==newdate){
24 - console.log('xxxxxxx')  
25 this.markoversection(); 24 this.markoversection();
26 - if(this.data.section){  
27 - this.changesectionstyle(this.data.section);  
28 - }  
29 }else{ 25 }else{
30 if(this.data.section){ 26 if(this.data.section){
31 this.changesectionstyle(this.data.section); 27 this.changesectionstyle(this.data.section);
@@ -69,7 +65,7 @@ Component({ @@ -69,7 +65,7 @@ Component({
69 let sectionlist=this.data.sectionlist; 65 let sectionlist=this.data.sectionlist;
70 //今天日期 66 //今天日期
71 let today=util.unixtoTime(new Date()/1000,'YYYY-MM-DD'); 67 let today=util.unixtoTime(new Date()/1000,'YYYY-MM-DD');
72 - let curtimestamp=new Date()/1000; 68 + let curtimestamp=Math.ceil(new Date()/1000);
73 let interval=[]; 69 let interval=[];
74 sectionlist.forEach((v,i)=>{ 70 sectionlist.forEach((v,i)=>{
75 let sectionarr=v.sectiondur.split('-'); 71 let sectionarr=v.sectiondur.split('-');
@@ -82,13 +78,20 @@ Component({ @@ -82,13 +78,20 @@ Component({
82 index:i 78 index:i
83 }) 79 })
84 } 80 }
  81 + if(this.data.section==v.section && v.overdate){
  82 + this.setData({
  83 + section:null
  84 + })
  85 + }
85 }) 86 })
86 - console.log(interval)  
87 if(!this.data.section){ 87 if(!this.data.section){
88 if(interval.length>0){ 88 if(interval.length>0){
89 sectionlist[interval[0].index].isselected=true; 89 sectionlist[interval[0].index].isselected=true;
90 - this.tellsection(sectionlist[interval[0].index].section,'defalut',interval[0].index) 90 + this.tellsection(sectionlist[interval[0].index].section,'defalut',interval[0].index);
  91 + this.changesectionstyle(sectionlist[interval[0].index].section)
91 } 92 }
  93 + }else{
  94 + this.changesectionstyle(this.data.section)
92 } 95 }
93 this.setData({ 96 this.setData({
94 sectionlist:sectionlist 97 sectionlist:sectionlist
@@ -82,7 +82,7 @@ Page({ @@ -82,7 +82,7 @@ Page({
82 }) 82 })
83 }, 83 },
84 changeInput(e) { 84 changeInput(e) {
85 - console.log(e) 85 + console.log(e)
86 let key = util.attr(e, 'key'); 86 let key = util.attr(e, 'key');
87 let val = '' 87 let val = ''
88 if (key == 'sex' || key == 'is_default') { 88 if (key == 'sex' || key == 'is_default') {
@@ -55,7 +55,7 @@ @@ -55,7 +55,7 @@
55 "id": 0, 55 "id": 0,
56 "name": "预订本-商家1", 56 "name": "预订本-商家1",
57 "pathName": "pack-book/pages/book/b_index", 57 "pathName": "pack-book/pages/book/b_index",
58 - "query": "seller_id=1009&seller_openid=o9pcQ0cbjRKnRWczcOJaaSRGP1lE&manager_id=500", 58 + "query": "seller_id=1001&seller_openid=o9pcQ0cbjRKnRWczcOJaaSRGP1lE&manager_id=500",
59 "scene": 1001 59 "scene": 1001
60 }, 60 },
61 { 61 {