refactor(web): migrate to TypeScript + standard Vue3 structure

This commit is contained in:
2026-02-26 12:29:25 +08:00
parent 52f691f02e
commit e2a9ebc7b7
28 changed files with 814 additions and 88 deletions

View File

@@ -0,0 +1,16 @@
import { http } from '../http'
import type { MemoryRecord, ReviewMode, ReviewResult } from './types'
export async function getReviewWords(params: { mode?: ReviewMode; limit?: number } = {}) {
const res = await http.get<{ data: MemoryRecord[] }>('/review', { params })
return res.data
}
export async function submitReview(payload: { recordId: number; answer: string; mode: ReviewMode }) {
const res = await http.post<{ data: ReviewResult }>('/review', {
record_id: payload.recordId,
answer: payload.answer,
mode: payload.mode
})
return res.data
}