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

ddd

parent e1896355
......@@ -151,7 +151,7 @@
background:rgba(101,184,244,1);
border-radius:50%;
color: #fff;
list-style: 1;
line-height: 1;
display: flex;
align-items: center;
justify-content: center;
......
......@@ -1076,6 +1076,9 @@ Page({
//选中的休息日
selectDays() {
const weekArray = new Array("日", "一", "二", "三", "四", "五", "六");
const _selectRestDays = this.data.selectRestDays;
const _weeks = this.data.weeks;
const arr =[]// 当前休息日和选中休息日的差
const days = getSelectedDay().map(function (item, index) {
return {
show: ((("" + item.month).length) < 2 ? ('0' + item.month) : item.month) + '-' + item.day,
......@@ -1085,12 +1088,38 @@ Page({
day: item.day
},
date:item.year+'-'+item.month+'-'+item.day,
week:weekArray[item.week]
week:weekArray[new Date(item.year+'-'+item.month+'-'+item.day).getDay()],
}
})
for(let i=0,len=_selectRestDays.length;i<len;i++){
let flag = true;
for(let j=0,len=days.length;j<len;j++){
if(JSON.stringify(_selectRestDays[i].data)==JSON.stringify(days[j].data)){
flag = false;
break;
}
}
if(flag){
arr.push(_selectRestDays[i])
}
}
for(let i=0,len=_weeks.length;i<len;i++){
let flag = false;
for(let j=0,len=arr.length;j<len;j++){
if(_weeks[i].name.slice(1,2)==arr[j].week){
flag = true;
break;
}
}
if(flag){
_weeks[i].isSlect=false;
}
}
this.setData({
calenderShow: false,
selectRestDays: days
selectRestDays: days,
weeks:_weeks
})
},
getBetweenDateStr(start, end) {
......
......@@ -251,61 +251,37 @@ Page({
// this.selfClockGet('up');
},
onShareAppMessage: function (option) { // return custom share data when user share.
const {
from,
target
} = option;
const visitor = LocalStorage.getItem('visitor');
const nickName = visitor.userInfo && visitor.userInfo.nickName || '';
let shareObj = {
}
const {from, target} = option;
let initShareObj = {
title: `我正在参加【${this.data.circleInfo.title}】的打卡`,
path: `/src/pages/themeindex/index?id=${this.data.id}&tid=${this.data.tid}`
title: `打卡日历`,
path: `/src/pages/mycalendart/index?tid=${this.data.tid}&id=${this.data.id}&clockdate=${this.data.clockdate}`
}
let shareObj = {
}
if (from == 'menu') {
shareObj = initShareObj;
posterLog({
poster_type: 4,
type: 3,
clock_circle_id: this.data.id,
clock_subject_id: this.data.tid
})
} else if (from == 'button') {
if (!target.dataset.info) {
shareObj = initShareObj;
posterLog({
poster_type: 4,
type: 3,
clock_circle_id: this.data.id,
clock_subject_id: this.data.tid
})
} else {
const {
target: {
dataset: {
info
}
}
} = option;
posterLog({
poster_type: 6,
type: 3,
clock_circle_id: this.data.id,
clock_subject_id: this.data.themeSelect.id,
clock_record_id: info.id
})
const {target: {dataset: {info}}} = option;
shareObj = {
title: `${info.school_student.nickname}的打卡详情`,
path: `/src/pages/clockdetail/index?id=${this.data.id}&tid=${this.data.themeSelect.id}&cid=${info.id}`
path: `/src/pages/clockdetail/index?tid=${info.subject_id}&cid=${info.id}`
}
}
}
return {
title: shareObj.title,
path: shareObj.path,
success: (res) => {
// 转发成功之后的回调
if(res.errMsg == 'shareAppMessage:ok'){
this.setData({
shareObj: initShareObj
})
}
},
}
},
userShow() {
......@@ -498,7 +474,6 @@ Page({
const endD = data.calendar_set.end_time.split(" ")[0]
const nowD = res.datetime.split(" ")[0]
let fixdate = res.datetime.split(" ")[0] // 定位到日期
if (nowTime >= startTime && nowTime <= endTime) {
data.themeStatus = 1; // 进行中
// data.operationDate=[startD,nowD]
......@@ -517,7 +492,8 @@ Page({
} else {
enableArea([this.numberDate(startD), this.numberDate(endD)])
}
this.getWeeksDay(new Date(res.datetime), rest_dates, clockDates);
this.getWeeksDay(new Date(res.datetime.replace(/-/g, '/')), rest_dates, clockDates);
const clockendtime = data.calendar_set.clock_end_time.split(":");
const clockstarttime = data.calendar_set.clock_start_time.split(":");
const thisTime = res.datetime.split(" ")[1].split(":");
......@@ -526,6 +502,7 @@ Page({
} else {
data.isClockTime = false
}
this.setData({
mycalendar: data,
joinedDate: data.joined_at ? data.joined_at.split(' ')[0].replace(/-/g, '. ') : '',
......
......@@ -148,4 +148,19 @@
position: absolute;
left: 0;
top: 0;
}
.riseDate-box {
text-align: center;
}
.riseDate-box .icon .btn{
width: 263rpx;
height: 145rpx;
}
.riseDate-box .text{
text-align: center;
font-size:26rpx;
font-family:PingFang-SC-Regular;
font-weight:400;
color:rgba(0,0,0,.5);
padding-bottom: 35rpx;
}
\ 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