Skip to content

Commit c410ec6

Browse files
committed
fix(modules): fix semester calculation
1 parent 272e541 commit c410ec6

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

src/assets/data/updateInfo.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22
"otaVersion": "3.0.8",
33
"updateTime": "2025-07-14",
44
"newFeatures": [
5-
"新增更新日志显示"
5+
"接入学校新版教务系统"
66
],
77
"fixedIssues": [
8-
"修复部分样式问题"
98
],
109
"knownIssues": [
1110
"弹窗在按钮导航模式下仍然会被遮挡"

src/modules/courseTable/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const computeWeekNumber = (schoolTime: number): number => {
2323

2424
// 根据开学时间计算学期和年份
2525
const computeSemesterAndYear = (startTimestamp: number) => {
26-
const startDate = new Date(startTimestamp);
26+
const startDate = new Date(startTimestamp * 1000);
2727
const month = startDate.getMonth(); // 获取开学时间的月份
2828
let semester = '1'; // 默认学期为 '1'
2929
let year = new Date().getFullYear().toString(); // 默认年份为当前年
@@ -42,7 +42,6 @@ const computeSemesterAndYear = (startTimestamp: number) => {
4242
semester = '1';
4343
year = new Date().getFullYear().toString(); // 当前年
4444
}
45-
4645
return { semester, year };
4746
};
4847

0 commit comments

Comments
 (0)