Commit c1aec815 authored by sujie@126.com's avatar sujie@126.com

ddd

parent 1411e9db
......@@ -18,6 +18,7 @@ import initCalendar, {
setSelectedDays,
getSelectedDay,
enableArea,
enableDays,
jump
} from '../../components/calendar/main.js';
const innerAudioContext = wx.createInnerAudioContext(); // 当前页面唯一的一个音频容器
......@@ -382,6 +383,8 @@ Page({
const selectRestDaysArr = [];
const restdates =data.calendar_set.rest_dates?data.calendar_set.rest_dates.split(','):[];
const weekArray = new Array("日", "一", "二", "三", "四", "五", "六");
const startD = data.calendar_set.start_time.split(" ")[0]
const endD = data.calendar_set.end_time.split(" ")[0]
for(let i=0,len=restdates.length;i<len;i++){
const year = restdates[i].split('-')[0];
const month = restdates[i].split('-')[1];
......@@ -402,6 +405,11 @@ Page({
} catch (error) {
_content = []
}
if (this.numberDate(startD) == this.numberDate(endD)) {
enableDays([this.numberDate(startD)])
} else {
enableArea([this.numberDate(startD), this.numberDate(endD)])
}
this.setData({
params: {
type: data.type,
......
......@@ -183,13 +183,13 @@ Page({
pagefrom: pagefrom ? pagefrom : ''
})
}
this.getmycalendar();
},
onReady: function () { // Do something when page ready.
this.doAnimation();
},
onShow: function (options) { // Do something when page show.
this.themeDetail();
this.getmycalendar();
this.getClockRead();
this.judgeIsClock(this.data.tid);
this.setData({
......@@ -272,12 +272,8 @@ Page({
this.didAnimation();
},
onPullDownRefresh: function () { // Do something when pull down.
this.setData({
hasmore: true,
clockPage: 1,
})
this.getmycalendar();
this.themeDetail();
this.clockListGet('down');
},
onReachBottom: function () { // Do something when page reach bottom.
this.clockListGet('up');
......@@ -1727,10 +1723,14 @@ Page({
if (today.getTime() > new Date(_activeDay.date).getTime()) {
_activeDay.isAfter = true;
}
console.log(_weeksArr, '_weeksArr0')
this.setData({
weeksArr: _weeksArr,
activeDay: _activeDay
activeDay: _activeDay,
hasmore: true,
clockPage: 1
},()=>{
this.clockListGet('init');
this.selfClockGet();
})
},
// 选择查看日期
......@@ -1813,8 +1813,7 @@ Page({
hasmore: true,
clockPage: 1
})
this.clockListGet('init');
this.selfClockGet();
},
compareTime(date1, date2, type) {
// date2比date1大
......
......@@ -912,6 +912,7 @@
display: flex;
justify-content: center;
align-items: center;
padding-right:30rpx;
}
.over-box .icon image {
......
......@@ -255,13 +255,13 @@
.empty-content {
height: 100vh;
position: relative;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
padding-top: 300rpx;
}
.empty-content .empty-content-img {
width: 263rpx;
height: 219rpx;
margin: 0 auto;
}
.empty-content .empty-content-text {
text-align: center;
......@@ -269,5 +269,6 @@
font-size: 28rpx;
margin-top: 54rpx;
font-weight: 500;
margin: 0 auto;
color: rgba(0, 0, 0, 0.5);
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment