🎨 前端提交
This commit is contained in:
parent
d5bfe994be
commit
ab787dc3ae
@ -125,7 +125,6 @@ export const RendomPaper: React.FC<PropInterface> = ({ type }) => {
|
|||||||
if (questions.length === 0) return;
|
if (questions.length === 0) return;
|
||||||
try {
|
try {
|
||||||
const res: any = await question.getKnowledgeCodes(questions.join(','), type, level);
|
const res: any = await question.getKnowledgeCodes(questions.join(','), type, level);
|
||||||
// httpClient.get 已经 resolve(res.data),所以 res = {code, msg, data}
|
|
||||||
const items = res.data || [];
|
const items = res.data || [];
|
||||||
// 后端返回 [{code: "xxx", name: "yyy"}, ...]
|
// 后端返回 [{code: "xxx", name: "yyy"}, ...]
|
||||||
const options = items.map((item: { code: string; name: string }) => ({
|
const options = items.map((item: { code: string; name: string }) => ({
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user