(function () { //数据 status 1正常 2早退 3旷课 4请假 var weekData2 = [ { week: '1', weekList: [ { title: '现代经济的研究与发现', time: '08:00 - 09:00', teacher: '郑中基', classRoom: '网络1220班', status: 1 }, { title: '现代经济的研究与发现', time: '08:00 - 09:00', teacher: '郑中基', classRoom: '网络1220班', status: 2 }, { title: '现代经济的研究与发现', time: '08:00 - 09:00', teacher: '郑中基', classRoom: '网络1220班', status: 3 }, { title: '现代经济的研究与发现', time: '08:00 - 09:00', teacher: '郑中基', classRoom: '网络1220班', status: 4 }, ] }, { week: '2', weekList: [ { title: '现代经济的研究与发现', time: '08:00 - 09:00', teacher: '郑中基', classRoom: '网络1220班', status: 1 } ] }, { week: '3', weekList: [ { title: '现代经济的研究与发现', time: '08:00 - 09:00', teacher: '郑中基', classRoom: '网络1220班', status: 2 } ] }, { week: '4', weekList: [] }, { week: '5', weekList: [ { title: '现代经济的研究与发现', time: '08:00 - 09:00', teacher: '郑中基', classRoom: '网络1220班', status: 3 } ] }, { week: '6', weekList: [ { title: '现代经济的研究与发现', time: '08:00 - 09:00', teacher: '郑中基', classRoom: '网络1220班', status: 4 } ] }, { week: '7', weekList: [] } ]; var weekTimeSpan2; var weekTimeI2; var todayWeek = weekday(); var page = { isScroll: false, init: function ($page) { weekTimeSpan2 = $page.find('#weekTime2 span'); weekTimeI2 = $page.find('#weekTime2 i'); judgeDate() weekTimeSpan2.eq(0).text(todayWeek.Monday).end().eq(1).text(todayWeek.Sunday); studentCheckData(todayWeek.Monday, todayWeek.Sunday); $page.find('.tSec2Top2 li').on('tap', function () { $(this).addClass('active').siblings().removeClass('active'); var ind = $(this).index(); $('.tSec2Con2').css('display', 'none').eq(ind).stop().fadeIn(); }); //上下周切换 var weekDayTime = 7 * oneDayTime; weekTimeI2.on('tap', function () { var index = weekTimeI2.index($(this)); if (index == 0) { todayWeek.MondayTime = todayWeek.MondayTime - weekDayTime; todayWeek.SundayTime = todayWeek.SundayTime - weekDayTime; } else { todayWeek.MondayTime = todayWeek.MondayTime + weekDayTime; todayWeek.SundayTime = todayWeek.SundayTime + weekDayTime; } todayWeek.Monday = fmtDate(todayWeek.MondayTime); todayWeek.Sunday = fmtDate(todayWeek.SundayTime); weekTimeSpan2.eq(0).text(todayWeek.Monday).end().eq(1).text(todayWeek.Sunday); judgeDate(todayWeek.SundayTime); studentCheckData(todayWeek.Monday, todayWeek.Sunday); }); } }; function studentCheckData(Monday, Sunday) { var studCheckList = $('.studCheckList'); var param = { StartDate: Monday, EndDate: Sunday }; learun.httpget(config.webapi + "learun/adms/timetable/StuLessonInfo", param, (data) => { console.log(data); $.each(data, function (i, n) { var html = ''; if (n.weekList.length == 0) { html = '