Commit f2a37b5f7c6a165d375941e2d6e7636c66d37f99

Authored by wangfan
1 parent 828d2ccc

日历插件

... ... @@ -26,6 +26,7 @@ Page({
[],
[],
],
speciallist:[],
},
sellerid:0,
indexOpt:null,
... ... @@ -44,11 +45,18 @@ Page({
}
//this.sellerid=opt.seller_id ? opt.seller_id : util.cache('sellerid');
let timePickerArray= await bookOrder.getDayTimeSpace();
let nt=new Date()/1000;
let speciallist=[
{ date: util.unixtoTime(nt,'YYYY-MM-DD'), background: '', text:'今 天' },
{ date: util.unixtoTime(nt+86400,'YYYY-MM-DD'), background: '', text: '明 天' },
{ date: util.unixtoTime(nt+86400*2,'YYYY-MM-DD'), background: '', text: '后 天' },
];
this.setData({
sellerid:this.sellerid,
listHeight:contentHeight-Math.ceil(210/radio),
dateStr:dateStr,
timePickerArray: timePickerArray,
speciallist:speciallist,
})
//util.setBarTitle('预定本');
this.indexOpt=opt;
... ... @@ -144,8 +152,8 @@ Page({
console.log(this.data.calendarMask)
},
dateChange(event){
let cktime=util.timetouUnix(event.detail.year+'/'+event.detail.month+'/'+event.detail.day)
let clickDay = event.detail.day;
let cktime=util.timetouUnix(event.detail.date)
let clickDay = event.detail.date.substr(8,2);
let changeDay = `dayStyle[1].day`;
let changeBg = `dayStyle[1].background`;
this.setData({
... ...
... ... @@ -7,7 +7,7 @@
"bookList":"/components/book/list/list",
"nav":"/components/nav/nav",
"tabBar":"/components/book/tabBar/tabBar",
"calendar": "plugin://calendar/calendar",
"calendar": "plugin://bmCalendar/calendar",
"formids":"/components/formids/formids"
}
}
\ No newline at end of file
... ...
... ... @@ -70,13 +70,29 @@
<view class="calendar-mask" bindtap="calendarClose"
style="height:{{calendarMask?'100%':0}};" wx:if="{{calendarMaskLoad}}">
<view style="width: 100%; height:{{calendarMask?'100%':0}};overflow: hidden;position: relative;">
<calendar weeks-type="cn" catchtap="catchtap"
start-date="2018-09"
days-color="{{dayStyle}}"
binddayClick="dateChange"
active-type="rounded"
calendar-style="calendar"
header-style="calendar-header"
board-style="calendar-board"></calendar>
<calendar catchtap="catchtap"
isTodaybtn="{{false}}" todaybtn_txt="回到今天"
custom="{{false}}"
switchover="{{['上一月','下个月']}}"
active-coloro="active-coloro"
active-colort="active-colort"
speciallist="{{speciallist}}"
txt_style="txt-style"
calendar-style="calendar"
header-style="calendar-header"
weektitle-style="weektitle-style"
restcolor-style="restcolor-style"
txt_type="cn-d"
datefont-style="datefont-style"
todaybtn-style="todaybtn-style"
bindnextMonth="nextMonth"
bindprevMonth="prevMonth"
bindselectDate="dateChange"
bindgotoday="gotoday"
colored="#199095"
></calendar>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -115,28 +115,56 @@ page{
top:0;
background-color: rgba(0,0,0,.5);
}
.exportFile{
font-size: 26rpx;
color:#353535;
}
.exportFile image{
width: 32rpx;
height: 32rpx;
margin: 0 auto 8rpx;
}
.calendar {
background-color: #eeedff;
padding-top: 10px;
background-color: #fefefe;
position: absolute;
bottom: 0;
width: 100%;
z-index: 999;
height: 720rpx;
}
.calendar-header{
font-size: large; /*修改了标题文字和按钮的大小*/
color: #605eac; /*修改了标题文字和按钮的颜色*/
background: #199095 ;
color: #fff;
}
.calendar-board {
background-color: #dddcff;
color: white;
.weektitle-style {
background-color: #199095;
color: #4fcfcf;
}
.exportFile{
font-size: 26rpx;
color:#353535;
.restcolor-style{
color:orange !important;
}
.exportFile image{
width: 32rpx;
height: 32rpx;
margin: 0 auto 8rpx;
.active-coloro {
color: #fff!important;
background: #199095;
}
.active-colort {
color: #fff!important;
background: #b8d5eb;
}
.txt-style{
margin-top: -24rpx;
color: #199095;
}
.datefont-style{
color: #199095;
}
.todaybtn-style{
line-height: 30rpx!important;
width: 60rpx!important;
height: 60rpx!important;
padding: 20rpx;
color: #fff!important;
background-color: #199095!important;
position: absolute;
bottom: 10rpx; right: 60rpx;
}
\ No newline at end of file
... ...