feat(database): 迁移用户关联字段并优化打卡系统

- 修改数据库配置将MYSQL_DB从mys_info_v3改为mys_info_test
- 新增auth_users表wechat_openid字段并建立唯一索引
- 为plan_checkins表添加计划性能索引(idx_plan_period_student)
- 将checkin_records_old表关联方式从student_id改为user_id
- 将plan_checkins表关联方式从student_id改为user_id并更新附件路径
- 移除routes/auth.py中的uuid导入使用安全token生成函数
- 重构routes/checkin.py打卡逻辑去除course_type字段并优化返回结构
- 添加打卡时间限制验证功能防止过期打卡操作
- 实现小组统计功能支持老师查看各组打卡情况
- 更新主页index.html界面适配新的打卡和计划功能
- 调整计划提交时间规则为周五至周四周期
- 添加月度和年度计划提交状态验证机制
This commit is contained in:
王宏豪
2026-09-10 14:11:58 +08:00
parent 1dd4fa3f41
commit cd04c1b5ef
19 changed files with 1457 additions and 407 deletions

View File

@@ -313,6 +313,16 @@
font-size: 22rpx;
color: #999;
}
.history-note {
margin-top: 12rpx;
padding: 16rpx 20rpx;
background: #faf6f0;
border-radius: 8rpx;
font-size: 24rpx;
color: #5A4A3A;
line-height: 1.5;
word-break: break-all;
}
/* 空态 */
.empty {
@@ -390,5 +400,168 @@
font-weight: 700;
}
/* 日期 chip 可点击 */
.date-chip-hover {
opacity: 0.8;
}
.date-arrow {
font-size: 24rpx;
color: #C67B30;
margin-left: 6rpx;
}
/* ---- 老师视图:小组统计卡片 ---- */
.groups-list {
padding: 4rpx 4rpx 24rpx;
}
.group-card {
background: #fff;
border-radius: 20rpx;
padding: 22rpx 24rpx;
margin-bottom: 18rpx;
box-shadow: 0 6rpx 20rpx rgba(44, 24, 16, 0.05);
}
.group-card-hover { transform: scale(.99); box-shadow: 0 10rpx 24rpx rgba(44, 24, 16, 0.10); }
.group-row { display: flex; align-items: center; gap: 16rpx; }
.group-avatar {
width: 52rpx; height: 52rpx; border-radius: 14rpx;
background: linear-gradient(135deg, #F3E3CF, #FBE7D1);
color: #C67B30; font-size: 26rpx; font-weight: 800;
display: flex; align-items: center; justify-content: center;
flex-shrink: 0;
}
.group-name { font-size: 30rpx; font-weight: 800; color: #2C1810; flex-shrink: 0; }
.chevron { color: #CDBFAE; font-size: 32rpx; line-height: 1; flex-shrink: 0; transition: transform .15s ease; }
.group-card-hover .chevron { transform: translateX(4rpx); }
.group-counts { display: flex; align-items: center; justify-content: flex-end; gap: 10rpx; flex: 1; min-width: 0; }
.count { font-size: 22rpx; white-space: nowrap; }
.count.done { color: #2E7D32; background: #E8F4EB; padding: 6rpx 12rpx; border-radius: 999rpx; font-weight: 700; }
.count.total { color: #C67B30; background: #FFF3E6; padding: 6rpx 12rpx; border-radius: 999rpx; font-weight: 700; }
.progress-track {
height: 10rpx; border-radius: 999rpx; background: #F2EDE7;
margin-top: 18rpx; overflow: hidden;
}
.progress-bar {
height: 100%; border-radius: 999rpx;
background: linear-gradient(90deg, #C67B30, #EFA45D);
transition: width .35s ease;
box-shadow: 0 2rpx 6rpx rgba(198, 123, 48, 0.35);
}
.unassigned { margin: 4rpx 8rpx 20rpx; font-size: 24rpx; color: #8B7A6A; }
.section-title {
padding: 16rpx 4rpx 12rpx;
font-size: 28rpx;
font-weight: 700;
color: #6B5D50;
}
/* ---- 老师详情视图 ---- */
.detail-head {
display: flex; align-items: center; gap: 16rpx;
padding: 8rpx 4rpx 16rpx;
flex-shrink: 0;
}
.detail-title-wrap { flex: 1; min-width: 0; }
.back {
color: #C67B30; font-size: 30rpx; flex-shrink: 0;
padding: 10rpx 16rpx 10rpx 0; border-radius: 12rpx;
font-weight: 600;
}
.back-hover { opacity: .7; }
.detail-title { font-size: 34rpx; font-weight: 800; color: #2C1810; }
.detail-sub { margin-top: 6rpx; font-size: 24rpx; color: #A99A89; }
.head-hover { opacity: .8; }
.head-arrow { color: #C67B30; font-size: 22rpx; }
.detail-progress {
flex-shrink: 0;
padding: 8rpx 20rpx;
border-radius: 999rpx;
font-size: 24rpx;
background: #FFF3E6;
color: #C67B30;
font-weight: 700;
}
.detail-scroll {
flex: 1; min-height: 0;
padding: 0 4rpx;
}
.member-list {
background: #fff;
border-radius: 20rpx;
padding: 8rpx 24rpx;
box-shadow: 0 6rpx 20rpx rgba(44, 24, 16, 0.05);
}
.bottom-space { height: 40rpx; }
.state-block { padding: 64rpx 0; text-align: center; color: #A99A89; font-size: 26rpx; }
.state-icon { font-size: 40rpx; margin-bottom: 12rpx; color: #D8C7B4; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:.4} 50%{opacity:1} }
/* 周选择弹层 */
.picker-mask {
position: fixed;
top: 0; left: 0; right: 0; bottom: 0;
background: rgba(0,0,0,0.4);
z-index: 100;
}
.picker-panel {
position: fixed;
left: 0; right: 0; bottom: 0;
background: #fff;
border-radius: 28rpx 28rpx 0 0;
z-index: 101;
max-height: 70vh;
display: flex;
flex-direction: column;
transform: translateY(100%);
transition: transform .28s ease;
}
.picker-panel.show {
transform: translateY(0);
}
.picker-title {
flex-shrink: 0;
padding: 28rpx 32rpx 20rpx;
font-size: 30rpx;
font-weight: 700;
color: #2C1810;
text-align: center;
border-bottom: 1rpx solid #F2EDE7;
}
.picker-list {
flex: 1;
min-height: 0;
padding: 8rpx 0 32rpx;
}
.picker-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 24rpx 32rpx;
font-size: 28rpx;
color: #2C1810;
}
.picker-item:active {
background: #FBF7F1;
}
.picker-item.active {
color: #C67B30;
font-weight: 700;
}
.picker-check {
font-size: 28rpx;
color: #C67B30;
}
/* 历史列表底部 */
.history-footer {
padding: 32rpx 0;
text-align: center;
font-size: 24rpx;
color: #B6A996;
}