public/static/calendar/calendar.js
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
var calUtil = {
//展示日历显示的年份
showYear: '',
//展示日历显示的月份
showMonth: '',
//展示年月时间戳
showTimeStamp:'',
//当前日历显示的年份
nowYear: '',
//当前日历显示的月份
nowMonth: '',
//当前日历显示的天数
nowDays: '',
//当前年月时间戳
nowTimeStamp:'',
//时间名称 load:当前月 prev:上个月 next:下个月
eventName: "load",
//当前月签到日期
signList: [],
//上个月签到日期
prevList: [],
//下个月签到日期
nextList: [],
//初始化日历 只支持最近三个月
init: function(signList, prevList, nextList, tmp) {
//获取当前的年月日
this.getNowYmd();
//获取当前选择的年月
this.setMonthAndDay();
//签到日期赋值
if(signList)this.signList = signList;
if(prevList)this.prevList = prevList;
if(nextList)this.nextList = nextList;
//装填初始化数据
var dataList = [];
if(this.nowTimeStamp == this.showTimeStamp){
dataList = this.signList;
}else if(this.nowTimeStamp > this.showTimeStamp){
dataList = this.prevList;
}else if(this.nowTimeStamp < this.showTimeStamp){
dataList = this.nextList;
}
//点击签到混合数组
if(tmp){
dataList.splice('','',tmp);
}
this.draw(dataList);//绘制日历
this.bindEnvent();//日历绑定事件
},
//获取当天的年月日
getNowYmd: function(){
var current = new Date();
this.nowYear = current.getFullYear();
this.nowMonth = current.getMonth() + 1;
this.nowDays = current.getDate();
this.saveTimeStamp(2);
},
//渲染日历
draw: function(signList) {
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。