Commit d5dc1853 by fengzhaoyu

11

parents d20f6c80 7658ce5a
......@@ -41,11 +41,10 @@ create.Component({
this.update();
this.getDate();
}
},
didUnmount() { },
didUnmount() {},
methods: {
getDate: throttle(function (e) {
getDate: throttle(function(e) {
let data = {
startTime: "2020-01-01 00:00:00",
endTime: "2025-12-30 23:59:59"
......@@ -58,30 +57,24 @@ create.Component({
},
() => {
let now = new Date();
console.log(now.getTime());
let year = now.getFullYear();
let scheduleList = [];
for (let i = 0; i <= year - 2019; i++) {
scheduleList.push(that.returnScheduleList(2019 + i));
}
// 第一次加载
const today = new Date();
that.setData(
{
const finalDate = new Date();
that.setData({
scheduleList: scheduleList,
todayStr: today.toLocaleDateString(),
todayStr: finalDate.toLocaleDateString(),
thisYear: year,
maxYear: year
},
() => {
console.log(new Date().getTime());
}
);
});
}
);
});
}, 1000),
nextDetail: throttle(function (e) {
nextDetail: throttle(function(e) {
let item = e.target.dataset.item;
dd.navigateTo({
url: `./../meetingDetail/meetingDetail?scheduleItem=${JSON.stringify(
......@@ -242,7 +235,7 @@ create.Component({
);
}
});
scheduleMap.forEach(function (value, key, map) {
scheduleMap.forEach(function(value, key, map) {
scheduleList.push(value);
});
return scheduleList;
......@@ -380,7 +373,7 @@ create.Component({
value: year
});
let thisDay = new Date().toLocaleDateString();
DateMap.forEach(function (value, key, map) {
DateMap.forEach(function(value, key, map) {
if (
new Date(key).getDay() === 0 &&
that.count(
......
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