随机试卷支持难度与知识点筛选 #3
@ -125,7 +125,6 @@ export const RendomPaper: React.FC<PropInterface> = ({ type }) => {
|
||||
if (questions.length === 0) return;
|
||||
try {
|
||||
const res: any = await question.getKnowledgeCodes(questions.join(','), type, level);
|
||||
// httpClient.get 已经 resolve(res.data),所以 res = {code, msg, data}
|
||||
const items = res.data || [];
|
||||
// 后端返回 [{code: "xxx", name: "yyy"}, ...]
|
||||
const options = items.map((item: { code: string; name: string }) => ({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user