Commit 90d8928af50b025c78b453ff73ff7699d9121ffa

Authored by liuxuqinfhp1220
1 parent 09726eb7

no message

@@ -21,10 +21,9 @@ Component({ @@ -21,10 +21,9 @@ 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 + this.markoversection();
24 if(this.data.section){ 25 if(this.data.section){
25 this.changesectionstyle(this.data.section); 26 this.changesectionstyle(this.data.section);
26 - }else{  
27 - this.markoversection();  
28 } 27 }
29 }else{ 28 }else{
30 if(this.data.section){ 29 if(this.data.section){
@@ -34,7 +33,7 @@ Component({ @@ -34,7 +33,7 @@ Component({
34 } 33 }
35 let obj={ 34 let obj={
36 section:this.data.section ? this.data.section : this.data.sectionlist[0].section, 35 section:this.data.section ? this.data.section : this.data.sectionlist[0].section,
37 - action:'defalut', 36 + action:this.data.section ? 'click' :'defalut',
38 time:this.data.sectionlist[0].sectiondur.split('-')[0] 37 time:this.data.sectionlist[0].sectiondur.split('-')[0]
39 } 38 }
40 this.triggerEvent('selectsection',obj) 39 this.triggerEvent('selectsection',obj)
@@ -85,9 +84,11 @@ Component({ @@ -85,9 +84,11 @@ Component({
85 } 84 }
86 }) 85 })
87 console.log(interval) 86 console.log(interval)
88 - if(interval.length>0){  
89 - sectionlist[interval[0].index].isselected=true;  
90 - this.tellsection(sectionlist[interval[0].index].section,'defalut',interval[0].index) 87 + if(!this.data.section){
  88 + if(interval.length>0){
  89 + sectionlist[interval[0].index].isselected=true;
  90 + this.tellsection(sectionlist[interval[0].index].section,'defalut',interval[0].index)
  91 + }
91 } 92 }
92 this.setData({ 93 this.setData({
93 sectionlist:sectionlist 94 sectionlist:sectionlist
@@ -15,6 +15,7 @@ Page({ @@ -15,6 +15,7 @@ Page({
15 console.log('selectdate',e); 15 console.log('selectdate',e);
16 this.setData({ 16 this.setData({
17 reserveDate:e.detail.date, 17 reserveDate:e.detail.date,
  18 + reserveSection:e.detail.action=='click' ? null : this.data.reserveSection
18 }) 19 })
19 }, 20 },
20 //时段改变 21 //时段改变
@@ -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=80&seller_openid=o9pcQ0cbjRKnRWczcOJaaSRGP1lE&manager_id=500", 58 + "query": "seller_id=154&seller_openid=o9pcQ0cbjRKnRWczcOJaaSRGP1lE&manager_id=500",
59 "scene": 1001 59 "scene": 1001
60 }, 60 },
61 { 61 {