新增英语单词打卡模块:3694词/247天,发音/详情/跟读录音/每日检测
- 数据源:解析 3500 词 PDF 得 3694 词,按每天 15 词分 247 天,覆盖全部单词 - 孩子端 /words 地图 + 当天学习页:点词标准发音(有道语音)、详情(释义/ 形近词/例句)、学会标记、跟读录音(MediaRecorder 直传 OSS)、每日检测 (选释义,达标点亮并计入英语打卡) - 家长端课程管理可回放孩子跟读录音 - 形近词运行时编辑距离计算;例句按需取词典 API 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
38a64b4ec1
commit
2bbf349e0c
+25
-1
@@ -11,10 +11,12 @@ import {
|
||||
grammarProgress,
|
||||
weeklyTest,
|
||||
wrongBook,
|
||||
wordRecording,
|
||||
} from "@/db/schema";
|
||||
import { SESSION_COOKIE, getSessionUser } from "@/lib/auth";
|
||||
import { addDays, dowOf, todayStr } from "@/lib/dates";
|
||||
import { passedCount, totalPoints } from "@/lib/grammar";
|
||||
import { viewUrl } from "@/lib/oss";
|
||||
import {
|
||||
ParentDashboard,
|
||||
type DevicesData,
|
||||
@@ -168,5 +170,27 @@ export default async function ParentPage() {
|
||||
passed: w.passed,
|
||||
}));
|
||||
|
||||
return <ParentDashboard overview={overview} templates={templates} devices={devices} weekly={weekly} />;
|
||||
// ===== 单词跟读录音(课程管理回放) =====
|
||||
const recRows = await db
|
||||
.select({
|
||||
childName: users.displayName,
|
||||
word: wordRecording.word,
|
||||
ossKey: wordRecording.ossKey,
|
||||
createdAt: wordRecording.createdAt,
|
||||
})
|
||||
.from(wordRecording)
|
||||
.innerJoin(users, eq(users.id, wordRecording.childUserId))
|
||||
.where(eq(users.familyId, parent.familyId))
|
||||
.orderBy(desc(wordRecording.createdAt))
|
||||
.limit(20);
|
||||
const recordings = recRows.map((r) => ({
|
||||
childName: r.childName,
|
||||
word: r.word,
|
||||
url: viewUrl(r.ossKey),
|
||||
at: dstr(r.createdAt),
|
||||
}));
|
||||
|
||||
return (
|
||||
<ParentDashboard overview={overview} templates={templates} devices={devices} weekly={weekly} recordings={recordings} />
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user