学习概览日历可查看当日语法检测+跟读录音;修复跟读录音签名
- 学习概览选中某天展示:打卡任务+英语语法检测(分数)+单词跟读录音(回放) - 修复跟读录音无法听:Safari 录音为 audio/mp4,原写死 audio/webm 致签名 不匹配上传失败;改为按实际录音类型签名,扩展名 m4a/webm Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
cbe99e94f0
commit
b8db3ae707
+21
-1
@@ -50,7 +50,7 @@ export default async function ParentPage() {
|
||||
// ===== 学习概览(日历) =====
|
||||
const overview: OverviewData = { kids: [] };
|
||||
for (const kid of kids) {
|
||||
const [instRows, gRows, wRows, wrongRow, gDone] = await Promise.all([
|
||||
const [instRows, gRows, wRows, wrongRow, gDone, gtestRows, recMonth] = await Promise.all([
|
||||
db
|
||||
.select({
|
||||
date: taskInstances.date,
|
||||
@@ -70,6 +70,20 @@ export default async function ParentPage() {
|
||||
.from(wrongBook)
|
||||
.where(and(eq(wrongBook.childUserId, kid.id), eq(wrongBook.mastered, false))),
|
||||
passedCount(kid.id),
|
||||
db
|
||||
.select({
|
||||
completedAt: grammarProgress.completedAt,
|
||||
score: grammarProgress.score,
|
||||
passed: grammarProgress.passed,
|
||||
title: grammarPoints.title,
|
||||
})
|
||||
.from(grammarProgress)
|
||||
.innerJoin(grammarPoints, eq(grammarPoints.pointId, grammarProgress.pointId))
|
||||
.where(and(eq(grammarProgress.childUserId, kid.id), gte(grammarProgress.completedAt, new Date(`${mStart}T00:00:00`)))),
|
||||
db
|
||||
.select({ word: wordRecording.word, ossKey: wordRecording.ossKey, createdAt: wordRecording.createdAt })
|
||||
.from(wordRecording)
|
||||
.where(and(eq(wordRecording.childUserId, kid.id), gte(wordRecording.createdAt, new Date(`${mStart}T00:00:00`)))),
|
||||
]);
|
||||
|
||||
const days: OverviewData["kids"][number]["days"] = {};
|
||||
@@ -84,6 +98,12 @@ export default async function ParentPage() {
|
||||
grammar,
|
||||
weekly: w ? w.score : null,
|
||||
tasks: inst.map((r) => ({ title: r.title, status: r.status, subject: r.subject })),
|
||||
recs: recMonth
|
||||
.filter((r) => dstr(r.createdAt) === d)
|
||||
.map((r) => ({ word: r.word, url: viewUrl(r.ossKey) })),
|
||||
gtests: gtestRows
|
||||
.filter((r) => r.completedAt && dstr(r.completedAt) === d)
|
||||
.map((r) => ({ title: r.title, score: r.score ?? 0, passed: r.passed })),
|
||||
};
|
||||
}
|
||||
overview.kids.push({
|
||||
|
||||
Reference in New Issue
Block a user