Commit f5ade986ba72487f657384d34729d6920c74e7ab

Authored by vking
2 parents e4d279b9 211e64a4

Merge remote-tracking branch 'origin/master'

@@ -33,7 +33,7 @@ Component({ @@ -33,7 +33,7 @@ Component({
33 getroomtype(){ 33 getroomtype(){
34 let parmdata={ 34 let parmdata={
35 sellerid:this.data.seller.id, 35 sellerid:this.data.seller.id,
36 - day:new Date(this.data.date+' 00:00:00')/1000, 36 + day:util.timetouUnix(this.data.date+' 00:00:00'),
37 interval:dur.indexOf(this.data.section)+1 37 interval:dur.indexOf(this.data.section)+1
38 } 38 }
39 App.Seller.GetSellerTableClass(parmdata).then((json)=>{ 39 App.Seller.GetSellerTableClass(parmdata).then((json)=>{
@@ -73,7 +73,7 @@ Component({ @@ -73,7 +73,7 @@ Component({
73 console.log('置满') 73 console.log('置满')
74 let parmdata={ 74 let parmdata={
75 classid:_target.id, 75 classid:_target.id,
76 - day:new Date(this.data.date+' 00:00:00')/1000, 76 + day:util.timetouUnix(this.data.date+' 00:00:00'),
77 interval:dur.indexOf(this.data.section)+1 77 interval:dur.indexOf(this.data.section)+1
78 } 78 }
79 if(_target.fid){ 79 if(_target.fid){
@@ -21,6 +21,7 @@ Component({ @@ -21,6 +21,7 @@ Component({
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')
24 this.markoversection(); 25 this.markoversection();
25 if(this.data.section){ 26 if(this.data.section){
26 this.changesectionstyle(this.data.section); 27 this.changesectionstyle(this.data.section);
@@ -72,13 +73,12 @@ Component({ @@ -72,13 +73,12 @@ Component({
72 let interval=[]; 73 let interval=[];
73 sectionlist.forEach((v,i)=>{ 74 sectionlist.forEach((v,i)=>{
74 let sectionarr=v.sectiondur.split('-'); 75 let sectionarr=v.sectiondur.split('-');
75 - if(curtimestamp>=new Date(today+' '+sectionarr[1]+':00')/1000){ 76 + if(curtimestamp>Number(util.timetouUnix(today+' '+sectionarr[1]+':00'))){
76 v.overdate=true 77 v.overdate=true
77 } 78 }
78 if(!v.overdate){ 79 if(!v.overdate){
79 - let intervaldur=curtimestamp-new Date(today+' '+sectionarr[0]+':00')/1000; 80 + let intervaldur=curtimestamp-Number(util.timetouUnix(today+' '+sectionarr[1]+':00'));
80 interval.push({ 81 interval.push({
81 - intervaldur:intervaldur,  
82 index:i 82 index:i
83 }) 83 })
84 } 84 }
@@ -106,8 +106,8 @@ Component({ @@ -106,8 +106,8 @@ Component({
106 let today=util.unixtoTime(new Date()/1000,'YYYY-MM-DD'); 106 let today=util.unixtoTime(new Date()/1000,'YYYY-MM-DD');
107 let curtimestamp=new Date()/1000; 107 let curtimestamp=new Date()/1000;
108 let sectionarr=this.data.sectionlist[index].sectiondur.split('-'); 108 let sectionarr=this.data.sectionlist[index].sectiondur.split('-');
109 - let starttimestamp=new Date(today+' '+sectionarr[0]+':00')/1000;  
110 - let endtimestamp=new Date(today+' '+sectionarr[1]+':00')/1000; 109 + let starttimestamp=Number(util.timetouUnix(today+' '+sectionarr[1]+':00'));
  110 + let endtimestamp=Number(util.timetouUnix(today+' '+sectionarr[1]+':00'));
111 let obj={ 111 let obj={
112 section:selectsection, 112 section:selectsection,
113 action:action 113 action:action
@@ -276,12 +276,11 @@ Page({ @@ -276,12 +276,11 @@ Page({
276 //时段改变 276 //时段改变
277 selectsection(e){ 277 selectsection(e){
278 console.log(e); 278 console.log(e);
279 - let t=setTimeout(()=>{ 279 + setTimeout(()=>{
280 this.setData({ 280 this.setData({
281 reserveSection:e.detail.section, 281 reserveSection:e.detail.section,
282 seletroomlist:e.detail.action=='click' ? [] : this.data.seletroomlist, 282 seletroomlist:e.detail.action=='click' ? [] : this.data.seletroomlist,
283 }) 283 })
284 - clearTimeout(t);  
285 },0) 284 },0)
286 285
287 this.reserve.section=e.detail.section; 286 this.reserve.section=e.detail.section;
@@ -49,13 +49,13 @@ @@ -49,13 +49,13 @@
49 "list": [] 49 "list": []
50 }, 50 },
51 "miniprogram": { 51 "miniprogram": {
52 - "current": 56, 52 + "current": 0,
53 "list": [ 53 "list": [
54 { 54 {
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=154&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 {