Commit ffcc8ea4 authored by wangxuelai's avatar wangxuelai

''

parent dbd3b7af
......@@ -148,7 +148,8 @@ Page({
isGoClock: "", // 是否能打卡
datetime: '',
userInfoDetail: {},
isEndClock:false //是否最后一天打卡
isEndClock:false, //是否最后一天打卡
fixdate: ''
},
onLoad: function (options) { // Do some initialize when page load.
// this.getWeeksDay(new Date());
......@@ -162,7 +163,7 @@ Page({
this.setData({
id: i,
tid: t,
d,
d: d || '',
pagefrom: ''
})
} else {
......@@ -172,18 +173,12 @@ Page({
d,
pagefrom
} = options;
console.log({
id,
tid,
d,
pagefrom
})
// const {id, tid} = options;
// let pagefrom = 'businesstheme';
this.setData({
id,
tid,
d,
d: d || '',
pagefrom: pagefrom ? pagefrom : ''
})
}
......@@ -195,7 +190,7 @@ Page({
onShow: function (options) { // Do something when page show.
this.themeDetail();
this.getClockRead();
this.judgeIsClock(this.data.tid);
// this.judgeIsClock(this.data.tid);
this.setData({
hasmore: true,
clockPage: 1,
......@@ -431,15 +426,7 @@ Page({
// return
// }
if (this.data.d) {
const fixdate = '20' + this.data.d.slice(0, 2) + '-' + this.data.d.slice(2, 4) + '-' + this.data.d.slice(4, 6);
// console.log(fixdate,data.calendar_set.end_time.split(' ')[0])
if(fixdate==data.calendar_set.end_time.split(' ')[0]){
this.setData({
isEndClock:true
})
}
}
this.setData({
datetime: res.datetime
})
......@@ -468,6 +455,8 @@ Page({
this.adInfoGet()
this.getCircleDetail(data.class_id);
}
}).then(() => {
this.judgeIsClock(this.data.tid);
})
},
getmycalendar() {
......@@ -508,7 +497,6 @@ Page({
} else {
fixdate = data.calendar_set.end_time.split(" ")[0]
}
// data.operationDate=[startD,endD]
}
if (this.numberDate(startD) == this.numberDate(endD)) {
......@@ -518,6 +506,7 @@ Page({
}
this.setData({
mycalendar: data,
fixdate: fixdate
}, () => {
this.getWeeksDay(new Date(fixdate), rest_dates, clockDates);
})
......@@ -527,6 +516,14 @@ Page({
// this.getWeeksDay(new Date(fixdate),rest_dates,clockDates);
this.getBetweenDateStr(data.calendar_set.start_time.split(' ')[0], data.calendar_set.end_time.split(' ')[0], rest_dates, clockDates);
if (this.data.fixdate) {
const fixdatea = '20' + this.data.d.slice(0, 2) + '-' + this.data.d.slice(2, 4) + '-' + this.data.d.slice(4, 6);
if(fixdatea==fixdate,data.calendar_set.end_time.split(' ')[0]){
this.setData({
isEndClock:true
})
}
}
}
})
},
......@@ -620,14 +617,13 @@ Page({
personalClockInfo: data
})
if (this.data.pagefrom == 'clockeditor') {
this.generateDailyPoster(() => {
let guideHasShow = LocalStorage.getItem('circleIndexGuideB');
if (!guideHasShow) {
this.setData({
userguideb: true
})
}
});
console.log(this.data.isEndClock, 'this.data.isEndClock')
if (this.data.isEndClock) {
this.graduatePoster();
} else {
this.generateNewPoster();
}
}
}
}
......@@ -956,13 +952,9 @@ Page({
const {
formId
} = e.detail;
// wx.navigateTo({
// url: `/src/pages/clockeditor/index?id=${this.data.id}&tid=${this.data.themeSelect.id}&cid=0&pagefrom=themeindex`
// })
formIdCreate({
formId
})
console.log(e.currentTarget.dataset.flag, 'e.currentTarget.dataset.flag')
if (e.currentTarget.dataset.flag == 0) {
return false;
}
......@@ -970,7 +962,6 @@ Page({
const month = Number(_activeDay.month) < 10 ? '0' + _activeDay.month : _activeDay.month
const day = Number(_activeDay.day) < 10 ? '0' + _activeDay.day : _activeDay.day
const clockdate = _activeDay.year + '-' + month + '-' + day;
console.log(this.data.themeSelect.my_clock_circle_user, 'e.currentTarget.dataset.flag')
if (this.data.themeSelect.my_clock_circle_user) { //
wx.navigateTo({
url: `/src/pages/clockeditor/index?id=${this.data.id}&tid=${this.data.themeSelect.id}&cid=0&pagefrom=calendarthemeindex&clockdate=${clockdate}`
......@@ -1563,12 +1554,6 @@ Page({
const comment = e.detail.comment;
for (let i = 0; i < _clockList.length; i++) {
if (_clockList[i].id == comment.record_id) {
// if (_clockList[i].comments.list.length >= 3) {
// break;
// } else {
// _clockList[i].comments.list.unshift(comment);
// _clockList[i].comments.total += 1;
// }
_clockList[i].comments.list.unshift(comment);
_clockList[i].comments.list = _clockList[i].comments.list.slice(0, 3);
_clockList[i].comments.total += 1;
......@@ -1859,7 +1844,11 @@ Page({
getBetweenDateStr(start, end, restDates, clockDates) {
const _mycalendar = this.data.mycalendar;
const today = new Date(new Date().getFullYear() + '/' + (new Date().getMonth() + 1) + '/' + new Date().getDate());
console.log(start,'today')
console.log(end,'end')
if (start == end) {
var result = [];
var beginDay = start.split("-");
result.push({
year: beginDay[0],
month: Number(beginDay[1]),
......@@ -1952,7 +1941,6 @@ Page({
}
}
}
console.log(result, 'result')
setTodoLabels({
days: result
})
......@@ -2235,7 +2223,7 @@ Page({
const circleInfo = this.data.circleInfo;
const date = dateDetail(this.data.datetime)
wx.showLoading({
title: '日签生成中...'
title: '结课证书生成中...'
})
let qrcode = '';
generateCustomerQrcode({
......@@ -2272,6 +2260,9 @@ Page({
title: '生成失败',
icon: 'none'
})
this.setData({
painting: {}
})
return;
}
let certificateInfo = data;
......
......@@ -126,7 +126,8 @@ Page({
video: 0,
img: 0,
audio: 0
}
},
currentDate: ''
},
onLoad: function(options) { // Do some initialize when page load.
const {id, tid, cid, pagefrom,clockdate} = options;
......@@ -135,6 +136,12 @@ Page({
pagefrom: pagefrom || '',
clockdate: clockdate || '',
})
// if (clockdate) {
// this.setData({
// currentDate: clockdate.replace(/-/g, '').substr(2)
// })
// }
// console.log(this.data.currentDate)
wx.showLoading();
themeDetail({
subject_id: this.data.tid
......@@ -601,10 +608,6 @@ Page({
wx.redirectTo({
url: `/src/pages/themeindex/index?id=${this.data.id}&tid=${this.data.tid}&pagefrom=clockeditor`
});
} else if (this.data.pagefrom == 'circleindex') {
wx.redirectTo({
url: `/src/pages/circleindex/index?id=${this.data.id}&tid=${this.data.tid}&pagefrom=clockeditor`
});
}else if(this.data.pagefrom == 'calendarthemeindex'){
wx.redirectTo({
url: `/src/pages/calendarthemeindex/index?id=${this.data.id}&tid=${this.data.tid}&pagefrom=clockeditor`
......
......@@ -175,7 +175,7 @@ Page({
return;
}
wx.showLoading({
title: '日签生成中...'
title: '结课证书生成中...'
})
generateCustomerQrcode({
scene: `i=${certificateInfo.subject.class_id}&t=${certificateInfo.subject.id}`,
......
This diff is collapsed.
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