Commit b979bd51 by liang ce

修改首页index样式

parent 8548e2b2
...@@ -57,27 +57,19 @@ create.Component({ ...@@ -57,27 +57,19 @@ create.Component({
}, },
() => { () => {
let now = new Date(); let now = new Date();
console.log(now.getTime());
let year = now.getFullYear(); let year = now.getFullYear();
let scheduleList = []; let scheduleList = [];
for (let i = 0; i <= year - 2019; i++) { for (let i = 0; i <= year - 2019; i++) {
scheduleList.push(that.returnScheduleList(2019 + i)); scheduleList.push(that.returnScheduleList(2019 + i));
} }
// 第一次加载 // 第一次加载
// finalDate 是用来定位到今天的
const finalDate = new Date(); const finalDate = new Date();
// finalDate.setDate(today.getDate() - today.getDay()) that.setData({
that.setData( scheduleList: scheduleList,
{ todayStr: finalDate.toLocaleDateString(),
scheduleList: scheduleList, thisYear: year,
todayStr: finalDate.toLocaleDateString(), maxYear: year
thisYear: year, });
maxYear: year
},
() => {
console.log(new Date().getTime());
}
);
} }
); );
}); });
......
{ {
"pages": [ "pages": [
"pages/index2/index2",
"pages/index/index", "pages/index/index",
"pages/meetingDetail/meetingDetail", "pages/meetingDetail/meetingDetail",
"pages/excutorList/excutorList", "pages/excutorList/excutorList",
...@@ -16,7 +17,6 @@ ...@@ -16,7 +17,6 @@
"pages/scheduleDetail/scheduleDetail", "pages/scheduleDetail/scheduleDetail",
"pages/participantsDetail/participantsDetail", "pages/participantsDetail/participantsDetail",
"pages/applicationDetails/applicationDetails", "pages/applicationDetails/applicationDetails",
"pages/attendeeList/attendeeList", "pages/attendeeList/attendeeList"
"pages/aaaa/aaaa"
] ]
} }
<view>
New Page
</view>
\ No newline at end of file
// import { RRule, RRuleSet, rrulestr } from 'rrule'
// Page({
// data: {},
// onLoad() {
// const rule = new RRule({
// freq: RRule.WEEKLY,
// interval: 5,
// byweekday: [RRule.MO, RRule.FR],
// dtstart: new Date(Date.UTC(2012, 1, 1, 10, 30)),
// until: new Date(Date.UTC(2012, 12, 31))
// })
// rule.all()
// ['2012-02-03T10:30:00.000Z',
// '2012-03-05T10:30:00.000Z',
// '2012-03-09T10:30:00.000Z',
// '2012-04-09T10:30:00.000Z',
// '2012-04-13T10:30:00.000Z',
// '2012-05-14T10:30:00.000Z',
// '2012-05-18T10:30:00.000Z',
// ]
// rule.between(new Date(Date.UTC(2012, 7, 1)), new Date(Date.UTC(2012, 8, 1)))
// ['2012-08-27T10:30:00.000Z',
// '2012-08-31T10:30:00.000Z']
// // rule.toString()
// // "DTSTART:20120201T093000Z\nRRULE:FREQ=WEEKLY;INTERVAL=5;UNTIL=20130130T230000Z;BYDAY=MO,FR"
// // rule.toText()
// // "every 5 weeks on Monday, Friday until January 31, 2013"
// },
// });
{}
\ 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