feat: 回忆对比记录并展示复习耗时
This commit is contained in:
@@ -30,6 +30,14 @@ export interface RecallRecord {
|
||||
missedCount: number;
|
||||
extraCount: number;
|
||||
createdTime: string;
|
||||
reviewDurationSeconds?: number;
|
||||
}
|
||||
|
||||
/** 回忆对比耗时口径:本地时间字符串(yyyy-MM-ddTHH:mm:ss,无时区)+ 秒数 */
|
||||
export interface RecallTiming {
|
||||
startedAt: string;
|
||||
lastInteractionAt: string;
|
||||
durationSeconds: number;
|
||||
}
|
||||
|
||||
// AI 聚合类接口耗时较长,统一放宽到 5 分钟(默认全局 30s)
|
||||
@@ -50,14 +58,20 @@ export const updateStandardMindMap = (taskNum: string, outline: string) => {
|
||||
return request.put(`/review/standard-mind-map/${taskNum}`, { outline });
|
||||
};
|
||||
|
||||
/** 用户提交回忆大纲,与标准导图对比(可选指定起始节点路径) */
|
||||
/** 用户提交回忆大纲,与标准导图对比(可选指定起始节点路径与复习耗时口径) */
|
||||
export const recallCompare = (
|
||||
taskNum: string,
|
||||
recallOutline: string,
|
||||
focusPath?: string,
|
||||
timing?: RecallTiming,
|
||||
): Promise<ApiResponse<StandardMindMap>> => {
|
||||
const body: Record<string, any> = { recallOutline };
|
||||
if (focusPath) body.focusPath = focusPath;
|
||||
if (timing) {
|
||||
body.reviewStartedAt = timing.startedAt;
|
||||
body.reviewLastInteractionAt = timing.lastInteractionAt;
|
||||
body.reviewDurationSeconds = timing.durationSeconds;
|
||||
}
|
||||
return request.post(`/review/standard-mind-map/${taskNum}/recall`, body, AI_TIMEOUT);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user