Commit 7bad6ec496d711c55949cf1dcf8ac5895ee81e3d

Authored by wangfan
1 parent efd73b53

v2 book sendsms

... ... @@ -2,14 +2,14 @@ var uri_dc = require('utils/uri.js')
global.regeneratorRuntime = require('lib/regenerator/runtime-module')
const { regeneratorRuntime } = global
Array.prototype.indexOf = function(val) {
Array.prototype._indexOf = function (val) {
for (var i = 0; i < this.length; i++) {
if (this[i] == val) return i;
}
return -1;
};
Array.prototype.remove = function(val) {
var index = this.indexOf(val);
var index = this._indexOf(val);
if (index > -1) {
this.splice(index, 1);
}
... ...
... ... @@ -55,5 +55,11 @@
}
]
},
"plugins": {
"calendar": {
"version": "1.1.3",
"provider": "wx92c68dae5a8bb046"
}
},
"debug": true
}
\ No newline at end of file
... ...
... ... @@ -39,6 +39,13 @@ Page({
}
],
buttonhide:true,
calendarMaskLoad:false,
calendarMask:false,
dayStyle:[
{ month: 'current', day: new Date().getDate(), color: 'white', background: '#AAD4F5' },
{ month: 'current', day: new Date().getDate(), color: 'white', background: '#AAD4F5' }
],
},
tablesAll:[],
/**
... ... @@ -68,6 +75,11 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
setTimeout(()=>{
this.setData({
calendarMaskLoad:true,
})
},1000);
},
... ... @@ -195,4 +207,24 @@ Page({
})
}catch (e){}
},
calendarShow(){
this.setData({
calendarMask:true
})
},
dateChange(event){
console.log(event);
let clickDay = event.detail.day;
let changeDay = `dayStyle[1].day`;
let changeBg = `dayStyle[1].background`;
this.setData({
[changeDay]: clickDay,
[changeBg]: "#84e7d0"
})
},
calendarClose(){
this.setData({
calendarMask:false
})
},
})
\ No newline at end of file
... ...
... ... @@ -6,6 +6,7 @@
"nothingBook":"/components/book/nothing/nothing",
"bookList":"/components/book/list/list",
"nav":"/components/nav/nav",
"tabBar":"/components/book/tabBar/tabBar"
"tabBar":"/components/book/tabBar/tabBar",
"calendar": "plugin://calendar/calendar"
}
}
\ No newline at end of file
... ...
... ... @@ -13,7 +13,7 @@
<view class="date-item-text">{{dateStr[1]}} 明天</view>
</item>
</view>
<view class="more flex-ll">
<view class="more flex-ll" bindtap="calendarShow">
<view></view>
<view></view>
<view></view>
... ... @@ -143,3 +143,18 @@
</view>
</view>
<tabBar></tabBar>
<view class="calendar-mask"
bindtap="calendarClose"
style="left:{{calendarMask?0:-5000}}px;" wx:if="{{calendarMaskLoad}}">
<calendar weeks-type="cn"
year="2018"
month="9"
day="27"
start-date="2018-09"
days-color="{{dayStyle}}"
binddayClick="dateChange"
active-type="rounded"
calendar-style="calendar"
header-style="calendar-header"
board-style="calendar-board"></calendar>
</view>
\ No newline at end of file
... ...
... ... @@ -40,6 +40,7 @@
.date .more{
width: 65rpx;
min-width: 65rpx;
height: 60rpx;
}
.date .more view{
width: 12rpx;
... ... @@ -187,4 +188,31 @@
}
.confirm-button-active{
opacity:1;
}
/**
*/
.calendar-mask{
position: fixed;
z-index: 99;
width: 100%;
height: 100%;
left:0;
top:0;
background-color: rgba(0,0,0,.5);
}
.calendar {
background-color: #eeedff;
padding-top: 10px;
position: fixed;
bottom: 0;
width: 100%;
}
.calendar-header{
font-size: large; /*修改了标题文字和按钮的大小*/
color: #605eac; /*修改了标题文字和按钮的颜色*/
}
.calendar-board {
background-color: #dddcff;
color: white;
}
\ No newline at end of file
... ...