v0.6测试

This commit is contained in:
2026-04-14 19:18:11 +08:00
parent fd3535f884
commit a60ba8352f
23 changed files with 157 additions and 40 deletions

View File

@@ -24,7 +24,7 @@ include __DIR__ . '/../includes/header.php';
<div class="nav">
<a href="/student/dashboard.php" class="nav-item">首页</a>
<a href="/student/conduct.php" class="nav-item">操行分</a>
<a href="/student/conduct_history.php" class="nav-item">操行分</a>
<a href="/student/homework.php" class="nav-item">作业</a>
<a href="/student/attendance.php" class="nav-item active">考勤</a>
<a href="/student/password.php" class="nav-item">修改密码</a>

View File

@@ -0,0 +1,11 @@
<?php
require_once __DIR__ . '/../config.php';
if (!isset($_SESSION['user_id']) || $_SESSION['user_type'] !== 'student') {
header('Location: /index.php');
exit();
}
// 重定向到学生端首页的操行分标签
header('Location: /student/dashboard.php');
exit();

View File

@@ -241,7 +241,12 @@ $student_id = $_SESSION['student_id'];
</div>
<script>
const API_BASE_URL = '<?php echo API_BASE_URL; ?>';
window.API_BASE_URL = '<?php echo API_BASE_URL; ?>';
window.JWT_STORAGE_KEY = '<?php echo JWT_STORAGE_KEY; ?>';
window.USER_STORAGE_KEY = '<?php echo USER_STORAGE_KEY; ?>';
</script>
<script src="/assets/js/common.js"></script>
<script>
const STUDENT_ID = <?php echo $student_id; ?>;
let conductPage = 1;
@@ -392,7 +397,7 @@ $student_id = $_SESSION['student_id'];
res.data.homework.forEach(hw => {
html += `
<tr>
<td>${hw.subject}</td>
<td>${hw.subject_name}</td>
<td>${hw.title}</td>
<td>${hw.deadline}</td>
<td>${getStatusBadge(hw.status, 'homework')}</td>
@@ -508,6 +513,5 @@ $student_id = $_SESSION['student_id'];
loadDashboard();
checkForceChangePassword();
</script>
<script src="/assets/js/common.js"></script>
</body>
</html>

View File

@@ -24,7 +24,7 @@ include __DIR__ . '/../includes/header.php';
<div class="nav">
<a href="/student/dashboard.php" class="nav-item">首页</a>
<a href="/student/conduct.php" class="nav-item">操行分</a>
<a href="/student/conduct_history.php" class="nav-item">操行分</a>
<a href="/student/homework.php" class="nav-item active">作业</a>
<a href="/student/attendance.php" class="nav-item">考勤</a>
<a href="/student/password.php" class="nav-item">修改密码</a>
@@ -53,7 +53,7 @@ async function loadHomework() {
let html = '';
res.data.homework.forEach(hw => {
html += `<tr>
<td>${escapeHtml(hw.subject)}</td>
<td>${escapeHtml(hw.subject_name)}</td>
<td>${escapeHtml(hw.title)}</td>
<td>${hw.deadline}</td>
<td>${getStatusBadge(hw.status, 'homework')}</td>

View File

@@ -23,7 +23,7 @@ include __DIR__ . '/../includes/header.php';
<div class="nav">
<a href="/student/dashboard.php" class="nav-item">首页</a>
<a href="/student/conduct.php" class="nav-item">操行分</a>
<a href="/student/conduct_history.php" class="nav-item">操行分</a>
<a href="/student/homework.php" class="nav-item">作业</a>
<a href="/student/attendance.php" class="nav-item">考勤</a>
<a href="/student/password.php" class="nav-item active">修改密码</a>