Resolve merge conflicts and fix student course details functionality
This commit is contained in:
@@ -12,6 +12,12 @@ class StudentManager {
|
||||
this.initMyCourses();
|
||||
this.updateCurrentTime();
|
||||
setInterval(() => this.updateCurrentTime(), 1000);
|
||||
|
||||
// 绑定刷新按钮
|
||||
const refreshBtn = document.getElementById('refreshCourses');
|
||||
if (refreshBtn) {
|
||||
refreshBtn.addEventListener('click', () => this.initMyCourses());
|
||||
}
|
||||
}
|
||||
|
||||
updateCurrentTime() {
|
||||
@@ -240,4 +246,4 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
if (studentClassEl) studentClassEl.textContent = user.class || '未分配';
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -337,6 +337,39 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 我的课程表格 -->
|
||||
<div class="card card-table mb-4" id="courses-section">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
<h5 class="mb-0 fw-bold"><i class="fas fa-book me-2 text-primary"></i>我的课程</h5>
|
||||
<button class="btn btn-sm btn-outline-primary px-3" id="refreshCourses">
|
||||
<i class="fas fa-sync-alt me-1"></i> 刷新
|
||||
</button>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover align-middle mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>课程代码</th>
|
||||
<th>课程名称</th>
|
||||
<th>学分</th>
|
||||
<th>授课教师</th>
|
||||
<th>学期</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="coursesTableBody">
|
||||
<!-- 数据将由 JavaScript 填充 -->
|
||||
<tr>
|
||||
<td colspan="6" class="text-center py-5 text-muted">
|
||||
<div class="spinner-border spinner-border-sm me-2" role="status"></div>
|
||||
数据加载中...
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 成绩表格 -->
|
||||
<div class="card card-table" id="grades-section">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
|
||||
Reference in New Issue
Block a user