Showing
4 changed files
with
78 additions
and
26 deletions
| @@ -26,6 +26,7 @@ Page({ | @@ -26,6 +26,7 @@ Page({ | ||
| 26 | [], | 26 | [], |
| 27 | [], | 27 | [], |
| 28 | ], | 28 | ], |
| 29 | + speciallist:[], | ||
| 29 | }, | 30 | }, |
| 30 | sellerid:0, | 31 | sellerid:0, |
| 31 | indexOpt:null, | 32 | indexOpt:null, |
| @@ -44,11 +45,18 @@ Page({ | @@ -44,11 +45,18 @@ Page({ | ||
| 44 | } | 45 | } |
| 45 | //this.sellerid=opt.seller_id ? opt.seller_id : util.cache('sellerid'); | 46 | //this.sellerid=opt.seller_id ? opt.seller_id : util.cache('sellerid'); |
| 46 | let timePickerArray= await bookOrder.getDayTimeSpace(); | 47 | let timePickerArray= await bookOrder.getDayTimeSpace(); |
| 48 | + let nt=new Date()/1000; | ||
| 49 | + let speciallist=[ | ||
| 50 | + { date: util.unixtoTime(nt,'YYYY-MM-DD'), background: '', text:'今 天' }, | ||
| 51 | + { date: util.unixtoTime(nt+86400,'YYYY-MM-DD'), background: '', text: '明 天' }, | ||
| 52 | + { date: util.unixtoTime(nt+86400*2,'YYYY-MM-DD'), background: '', text: '后 天' }, | ||
| 53 | + ]; | ||
| 47 | this.setData({ | 54 | this.setData({ |
| 48 | sellerid:this.sellerid, | 55 | sellerid:this.sellerid, |
| 49 | listHeight:contentHeight-Math.ceil(210/radio), | 56 | listHeight:contentHeight-Math.ceil(210/radio), |
| 50 | dateStr:dateStr, | 57 | dateStr:dateStr, |
| 51 | timePickerArray: timePickerArray, | 58 | timePickerArray: timePickerArray, |
| 59 | + speciallist:speciallist, | ||
| 52 | }) | 60 | }) |
| 53 | //util.setBarTitle('预定本'); | 61 | //util.setBarTitle('预定本'); |
| 54 | this.indexOpt=opt; | 62 | this.indexOpt=opt; |
| @@ -144,8 +152,8 @@ Page({ | @@ -144,8 +152,8 @@ Page({ | ||
| 144 | console.log(this.data.calendarMask) | 152 | console.log(this.data.calendarMask) |
| 145 | }, | 153 | }, |
| 146 | dateChange(event){ | 154 | dateChange(event){ |
| 147 | - let cktime=util.timetouUnix(event.detail.year+'/'+event.detail.month+'/'+event.detail.day) | ||
| 148 | - let clickDay = event.detail.day; | 155 | + let cktime=util.timetouUnix(event.detail.date) |
| 156 | + let clickDay = event.detail.date.substr(8,2); | ||
| 149 | let changeDay = `dayStyle[1].day`; | 157 | let changeDay = `dayStyle[1].day`; |
| 150 | let changeBg = `dayStyle[1].background`; | 158 | let changeBg = `dayStyle[1].background`; |
| 151 | this.setData({ | 159 | this.setData({ |
| @@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
| 7 | "bookList":"/components/book/list/list", | 7 | "bookList":"/components/book/list/list", |
| 8 | "nav":"/components/nav/nav", | 8 | "nav":"/components/nav/nav", |
| 9 | "tabBar":"/components/book/tabBar/tabBar", | 9 | "tabBar":"/components/book/tabBar/tabBar", |
| 10 | - "calendar": "plugin://calendar/calendar", | 10 | + "calendar": "plugin://bmCalendar/calendar", |
| 11 | "formids":"/components/formids/formids" | 11 | "formids":"/components/formids/formids" |
| 12 | } | 12 | } |
| 13 | } | 13 | } |
| @@ -70,13 +70,29 @@ | @@ -70,13 +70,29 @@ | ||
| 70 | <view class="calendar-mask" bindtap="calendarClose" | 70 | <view class="calendar-mask" bindtap="calendarClose" |
| 71 | style="height:{{calendarMask?'100%':0}};" wx:if="{{calendarMaskLoad}}"> | 71 | style="height:{{calendarMask?'100%':0}};" wx:if="{{calendarMaskLoad}}"> |
| 72 | <view style="width: 100%; height:{{calendarMask?'100%':0}};overflow: hidden;position: relative;"> | 72 | <view style="width: 100%; height:{{calendarMask?'100%':0}};overflow: hidden;position: relative;"> |
| 73 | - <calendar weeks-type="cn" catchtap="catchtap" | ||
| 74 | - start-date="2018-09" | ||
| 75 | - days-color="{{dayStyle}}" | ||
| 76 | - binddayClick="dateChange" | ||
| 77 | - active-type="rounded" | ||
| 78 | - calendar-style="calendar" | ||
| 79 | - header-style="calendar-header" | ||
| 80 | - board-style="calendar-board"></calendar> | 73 | + <calendar catchtap="catchtap" |
| 74 | + isTodaybtn="{{false}}" todaybtn_txt="回到今天" | ||
| 75 | + custom="{{false}}" | ||
| 76 | + switchover="{{['上一月','下个月']}}" | ||
| 77 | + active-coloro="active-coloro" | ||
| 78 | + active-colort="active-colort" | ||
| 79 | + speciallist="{{speciallist}}" | ||
| 80 | + txt_style="txt-style" | ||
| 81 | + calendar-style="calendar" | ||
| 82 | + header-style="calendar-header" | ||
| 83 | + weektitle-style="weektitle-style" | ||
| 84 | + restcolor-style="restcolor-style" | ||
| 85 | + txt_type="cn-d" | ||
| 86 | + | ||
| 87 | + datefont-style="datefont-style" | ||
| 88 | + todaybtn-style="todaybtn-style" | ||
| 89 | + | ||
| 90 | + bindnextMonth="nextMonth" | ||
| 91 | + bindprevMonth="prevMonth" | ||
| 92 | + bindselectDate="dateChange" | ||
| 93 | + bindgotoday="gotoday" | ||
| 94 | + | ||
| 95 | + colored="#199095" | ||
| 96 | + ></calendar> | ||
| 81 | </view> | 97 | </view> |
| 82 | </view> | 98 | </view> |
| @@ -115,28 +115,56 @@ page{ | @@ -115,28 +115,56 @@ page{ | ||
| 115 | top:0; | 115 | top:0; |
| 116 | background-color: rgba(0,0,0,.5); | 116 | background-color: rgba(0,0,0,.5); |
| 117 | } | 117 | } |
| 118 | +.exportFile{ | ||
| 119 | + font-size: 26rpx; | ||
| 120 | + color:#353535; | ||
| 121 | +} | ||
| 122 | +.exportFile image{ | ||
| 123 | + width: 32rpx; | ||
| 124 | + height: 32rpx; | ||
| 125 | + margin: 0 auto 8rpx; | ||
| 126 | +} | ||
| 127 | + | ||
| 118 | .calendar { | 128 | .calendar { |
| 119 | - background-color: #eeedff; | ||
| 120 | - padding-top: 10px; | 129 | + background-color: #fefefe; |
| 121 | position: absolute; | 130 | position: absolute; |
| 122 | bottom: 0; | 131 | bottom: 0; |
| 123 | width: 100%; | 132 | width: 100%; |
| 124 | - z-index: 999; | 133 | + height: 720rpx; |
| 125 | } | 134 | } |
| 126 | .calendar-header{ | 135 | .calendar-header{ |
| 127 | - font-size: large; /*修改了标题文字和按钮的大小*/ | ||
| 128 | - color: #605eac; /*修改了标题文字和按钮的颜色*/ | 136 | + background: #199095 ; |
| 137 | + color: #fff; | ||
| 129 | } | 138 | } |
| 130 | -.calendar-board { | ||
| 131 | - background-color: #dddcff; | ||
| 132 | - color: white; | 139 | +.weektitle-style { |
| 140 | + background-color: #199095; | ||
| 141 | + color: #4fcfcf; | ||
| 133 | } | 142 | } |
| 134 | -.exportFile{ | ||
| 135 | - font-size: 26rpx; | ||
| 136 | - color:#353535; | 143 | +.restcolor-style{ |
| 144 | + color:orange !important; | ||
| 137 | } | 145 | } |
| 138 | -.exportFile image{ | ||
| 139 | - width: 32rpx; | ||
| 140 | - height: 32rpx; | ||
| 141 | - margin: 0 auto 8rpx; | 146 | +.active-coloro { |
| 147 | + color: #fff!important; | ||
| 148 | + background: #199095; | ||
| 149 | +} | ||
| 150 | +.active-colort { | ||
| 151 | + color: #fff!important; | ||
| 152 | + background: #b8d5eb; | ||
| 153 | +} | ||
| 154 | +.txt-style{ | ||
| 155 | + margin-top: -24rpx; | ||
| 156 | + color: #199095; | ||
| 157 | +} | ||
| 158 | +.datefont-style{ | ||
| 159 | + color: #199095; | ||
| 160 | +} | ||
| 161 | +.todaybtn-style{ | ||
| 162 | + line-height: 30rpx!important; | ||
| 163 | + width: 60rpx!important; | ||
| 164 | + height: 60rpx!important; | ||
| 165 | + padding: 20rpx; | ||
| 166 | + color: #fff!important; | ||
| 167 | + background-color: #199095!important; | ||
| 168 | + position: absolute; | ||
| 169 | + bottom: 10rpx; right: 60rpx; | ||
| 142 | } | 170 | } |
-
Please register or login to post a comment