瀏覽代碼

Merge pull request #44 from XingHeYuZhuan/pending

Pending
星河欲转 1 周之前
父節點
當前提交
c4dbbfb02c
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      resources/CQU/cqu.js

+ 2 - 2
resources/CQU/cqu.js

@@ -49,8 +49,8 @@ const parseSchedule = (startDate, maxWeek, timeSlots, schedule) => ({
         teacher: course.instructorName?.slice(0, course.instructorName?.indexOf('-')) ?? '',
         position: course.position ?? course.roomName ?? '',
         day: course.weekDay ?? 0,
-        startSection: (course.periodFormat?.indexOf('-') ?? 0) > 0 ? (Number(course.periodFormat?.split('-')[0]) + 1) : (Number(course.periodFormat) + 1) ?? 0,
-        endSection: (course.periodFormat?.indexOf('-') ?? 0) > 0 ? (Number(course.periodFormat?.split('-')[1]) + 1) : (Number(course.periodFormat) + 1) ?? 0,
+        startSection: (course.periodFormat?.indexOf('-') ?? 0) > 0 ? (Number(course.periodFormat?.split('-')[0])) : (Number(course.periodFormat)) ?? 0,
+        endSection: (course.periodFormat?.indexOf('-') ?? 0) > 0 ? (Number(course.periodFormat?.split('-')[1])) : (Number(course.periodFormat)) ?? 0,
         weeks: (course.teachingWeek ?? '').split('').map((char, index) => (char === '1' ? index + 1 : null)).filter(week => week !== null),
     })),
 });