Auto Submit

dev_local_v9_haijunshiguan_net
autosubmit 2 years ago
parent 416144e6f8
commit b680c87af6

@ -27,7 +27,7 @@
display: block !important;
}
</style><script>if(document.domain !== "www.educoder.net") document.title = '';</script>
<script src="/react/build/umi.be89116f.js"></script>
<script src="/react/build/umi.75373c12.js"></script>
<script src="/react/build/js/public.js"></script>
</body>
</html>

@ -3109,7 +3109,7 @@ var Answer_scoreStatusMapping = {
1: 'c-green'
};
var Answer = function Answer(_ref) {
var _answerData$exercise5, _answerData$exercise6, _answerData$exercise7, _answerData$exercise8, _answerData$exercise9, _answerData$question_5, _answerData$exercise_16, _answerData$question_6, _answerData$exercise_17, _answerData$exercise_18, _answerData$exercise_19, _answerData$exercise_20, _answerData$exercise_21, _answerData$exercise10, _answerData$exercise_22, _answerData$exercise_23, _answerData$exercise_25, _answerData$exercise_26, _answerData$exercise_27;
var _answerData$exercise5, _answerData$exercise6, _answerData$exercise7, _answerData$exercise8, _answerData$exercise9, _answerData$question_5, _answerData$exercise_17, _answerData$question_6, _answerData$exercise_18, _answerData$exercise_19, _answerData$exercise_20, _answerData$exercise_21, _answerData$exercise_22, _answerData$exercise10, _answerData$exercise_23, _answerData$exercise_24, _answerData$exercise_26, _answerData$exercise_27, _answerData$exercise_28;
var globalSetting = _ref.globalSetting,
loading = _ref.loading,
user = _ref.user,
@ -3187,7 +3187,6 @@ var Answer = function Answer(_ref) {
_useState32 = slicedToArray_default()(_useState31, 2),
knowledgeDialog = _useState32[0],
_setKnowledgeDialog = _useState32[1]; //推荐知识点弹窗
var _useState33 = (0,_react_17_0_2_react.useState)([]),
_useState34 = slicedToArray_default()(_useState33, 2),
itemBankData = _useState34[0],
@ -4041,7 +4040,7 @@ var Answer = function Answer(_ref) {
marginRight: 10
}
}), "\u6E29\u99A8\u63D0\u793A\uFF1A\u8FD8\u6709 ", item === null || item === void 0 ? void 0 : item.can_answer_num, " \u6B21\u673A\u4F1A\u53EF\u5C1D\u8BD5\u8FDB\u884C\u91CD\u65B0\u7B54\u9898\uFF0C\u91CD\u65B0\u7B54\u9898\u6B63\u786E\u540E\u4E5F\u4F1A\u8BA1\u5165\u603B\u6210\u7EE9\u3002"]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
}), (item === null || item === void 0 ? void 0 : item.can_answer_num) == 0 && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Answermodules.analysisWrap,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Answermodules.greyBg,
@ -4262,16 +4261,7 @@ var Answer = function Answer(_ref) {
});
};
var renderQuestion = function renderQuestion(item, i) {
// let answerText = '';
// const answerBool = item?.question_type === 0 || item?.question_type === 1;
// if (answerBool) {
// item?.question_choices?.forEach((k: any, i: number) => {
// if (k.standard_boolean) {
// answerText = answerText + tagList[i]
// }
// })
// }
var show = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Answermodules.questionItem,
id: "Anchor_".concat(item === null || item === void 0 ? void 0 : item.question_type, "_").concat(i),
@ -4282,7 +4272,7 @@ var Answer = function Answer(_ref) {
marginBottom: 40,
userSelect: "none"
},
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
children: [show && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
className: "".concat(Answermodules.questionScore, " mr10"),
children: [item === null || item === void 0 ? void 0 : item.question_score, "\u5206"]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
@ -4293,28 +4283,28 @@ var Answer = function Answer(_ref) {
})]
}),
// 单选题
(item === null || item === void 0 ? void 0 : item.question_type) == 0 && renderSingle(item, item === null || item === void 0 ? void 0 : item.question_type),
[0, 'SINGLE'].includes(item === null || item === void 0 ? void 0 : item.question_type) && renderSingle(item, item === null || item === void 0 ? void 0 : item.question_type),
// 判断题
(item === null || item === void 0 ? void 0 : item.question_type) == 2 && renderSingle(item, item === null || item === void 0 ? void 0 : item.question_type),
[2, 'JUDGMENT'].includes(item === null || item === void 0 ? void 0 : item.question_type) && renderSingle(item, item === null || item === void 0 ? void 0 : item.question_type),
// 多选题
(item === null || item === void 0 ? void 0 : item.question_type) == 1 && renderMultiple(item, item === null || item === void 0 ? void 0 : item.question_type),
[1, 'MULTIPLE'].includes(item === null || item === void 0 ? void 0 : item.question_type) && renderMultiple(item, item === null || item === void 0 ? void 0 : item.question_type),
// 填空题
(item === null || item === void 0 ? void 0 : item.question_type) == 3 && renderFill(item, item === null || item === void 0 ? void 0 : item.question_type),
[3, 'COMPLETION'].includes(item === null || item === void 0 ? void 0 : item.question_type) && renderFill(item, item === null || item === void 0 ? void 0 : item.question_type),
// 简答题
(item === null || item === void 0 ? void 0 : item.question_type) == 4 && renderSimple(item, item === null || item === void 0 ? void 0 : item.question_type),
[4, 'SUBJECTIVE'].includes(item === null || item === void 0 ? void 0 : item.question_type) && renderSimple(item, item === null || item === void 0 ? void 0 : item.question_type),
// 实训题
(item === null || item === void 0 ? void 0 : item.question_type) == 5 && renderShixun(item, item === null || item === void 0 ? void 0 : item.question_type),
[5, 'PRACTICAL'].includes(item === null || item === void 0 ? void 0 : item.question_type) && renderShixun(item, item === null || item === void 0 ? void 0 : item.question_type),
// 编程题
(item === null || item === void 0 ? void 0 : item.question_type) == 6 && renderProgram(item, item === null || item === void 0 ? void 0 : item.question_type),
[6, 'PROGRAM'].includes(item === null || item === void 0 ? void 0 : item.question_type) && renderProgram(item, item === null || item === void 0 ? void 0 : item.question_type),
// 组合题
(item === null || item === void 0 ? void 0 : item.question_type) == 7 && renderSingles(item, item === null || item === void 0 ? void 0 : item.question_type, i),
[7, 'COMBINATION'].includes(item === null || item === void 0 ? void 0 : item.question_type) && renderSingles(item, item === null || item === void 0 ? void 0 : item.question_type, i),
// 编程题
(item === null || item === void 0 ? void 0 : item.question_type) == 8 && renderBProgram(item, item === null || item === void 0 ? void 0 : item.question_type), (item === null || item === void 0 ? void 0 : item.answer_comments) && /*#__PURE__*/(0,jsx_runtime.jsx)(components_NewAnswerComments, {
[8, 'PROGRAM'].includes(item === null || item === void 0 ? void 0 : item.question_type) && renderBProgram(item, item === null || item === void 0 ? void 0 : item.question_type), (item === null || item === void 0 ? void 0 : item.answer_comments) && /*#__PURE__*/(0,jsx_runtime.jsx)(components_NewAnswerComments, {
hideScore: true,
list: item === null || item === void 0 ? void 0 : item.answer_comments
}),
// 实训题 ,答题
(item === null || item === void 0 ? void 0 : item.question_type) == 5 && /*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {
[5, 'PRACTICAL'].includes(item === null || item === void 0 ? void 0 : item.question_type) && /*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {
justify: "end",
className: "mt20",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(AsyncButton/* AsyncButton */.Z, {
@ -4338,7 +4328,7 @@ var Answer = function Answer(_ref) {
})
}),
// 编程题 ,答题
(item === null || item === void 0 ? void 0 : item.question_type) == 6 && /*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {
[6, 'PROGRAM'].includes(item === null || item === void 0 ? void 0 : item.question_type) && /*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {
justify: "end",
className: "mt20",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(AsyncButton/* AsyncButton */.Z, {
@ -4512,9 +4502,11 @@ var Answer = function Answer(_ref) {
switch (sign.current) {
case "prev":
skipPrevQuestion();
setItemBankData([]);
break;
case "next":
skipNextQuestion();
setItemBankData([]);
break;
case "appoint":
skipAppointQuestion();
@ -4571,6 +4563,60 @@ var Answer = function Answer(_ref) {
// })
// }
var submitAnswer = /*#__PURE__*/function () {
var _ref14 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee15() {
var _answerData$exercise_16;
var currentInfo, query, _currentInfo$user_ans, res, _res$data;
return regeneratorRuntime_default()().wrap(function _callee15$(_context15) {
while (1) switch (_context15.prev = _context15.next) {
case 0:
currentInfo = (_answerData$exercise_16 = answerData.exercise_question_types) === null || _answerData$exercise_16 === void 0 || (_answerData$exercise_16 = _answerData$exercise_16[oneindex]) === null || _answerData$exercise_16 === void 0 || (_answerData$exercise_16 = _answerData$exercise_16.items) === null || _answerData$exercise_16 === void 0 ? void 0 : _answerData$exercise_16[twoindex];
query = {
questionId: currentInfo.question_id,
exercise_choice_id: [0, 1, 2].includes(currentInfo.question_type) ? currentInfo.user_answer : null
};
if (currentInfo.question_type == 3) {
// 填空题
query.answers = currentInfo.user_answer.map(function (item) {
return {
exercise_choice_id: item === null || item === void 0 ? void 0 : item.choice_id,
answer_text: item === null || item === void 0 ? void 0 : item.answer_text
};
});
} else if (currentInfo.question_type == 4) {
//简答题
query.answer_text = currentInfo === null || currentInfo === void 0 || (_currentInfo$user_ans = currentInfo.user_answer) === null || _currentInfo$user_ans === void 0 ? void 0 : _currentInfo$user_ans[0];
} else if (currentInfo.question_type == 7) {
//组合题
query.answers = currentInfo.sub_exercise_questions.map(function (item) {
return {
exercise_choice_id: item === null || item === void 0 ? void 0 : item.question_id,
answer_text: item === null || item === void 0 ? void 0 : item.user_answer
};
});
}
_context15.next = 5;
return (0,fetch/* default */.ZP)("/api/exercise_questions/".concat(currentInfo.question_id, "/exercise_answers/subject_exercise_answer.json"), {
method: 'POST',
body: query
});
case 5:
res = _context15.sent;
if (res.status == 0) {
setItemBankData(res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.item_bank_data);
setShowConfirm(false);
initData();
}
case 7:
case "end":
return _context15.stop();
}
}, _callee15);
}));
return function submitAnswer() {
return _ref14.apply(this, arguments);
};
}();
return /*#__PURE__*/(0,jsx_runtime.jsxs)(spin/* default */.Z, {
size: 'middle',
spinning: isSpin,
@ -4676,7 +4722,7 @@ var Answer = function Answer(_ref) {
style: {
color: '#999999'
},
children: ["/", answerData === null || answerData === void 0 || (_answerData$exercise_16 = answerData.exercise_types) === null || _answerData$exercise_16 === void 0 ? void 0 : _answerData$exercise_16.q_counts]
children: ["/", answerData === null || answerData === void 0 || (_answerData$exercise_17 = answerData.exercise_types) === null || _answerData$exercise_17 === void 0 ? void 0 : _answerData$exercise_17.q_counts]
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {
@ -4685,7 +4731,7 @@ var Answer = function Answer(_ref) {
trailColor: "#0000000d",
percent: (answerData === null || answerData === void 0 || (_answerData$question_6 = answerData.question_status) === null || _answerData$question_6 === void 0 || (_answerData$question_6 = _answerData$question_6.filter(function (val) {
return val.ques_status === 1;
})) === null || _answerData$question_6 === void 0 ? void 0 : _answerData$question_6.length) / (answerData === null || answerData === void 0 || (_answerData$exercise_17 = answerData.exercise_types) === null || _answerData$exercise_17 === void 0 ? void 0 : _answerData$exercise_17.q_counts) * 100,
})) === null || _answerData$question_6 === void 0 ? void 0 : _answerData$question_6.length) / (answerData === null || answerData === void 0 || (_answerData$exercise_18 = answerData.exercise_types) === null || _answerData$exercise_18 === void 0 ? void 0 : _answerData$exercise_18.q_counts) * 100,
showInfo: false
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {
@ -4696,7 +4742,7 @@ var Answer = function Answer(_ref) {
style: {
color: '#165DFF'
},
children: (answerData === null || answerData === void 0 || (_answerData$exercise_18 = answerData.exercise_types) === null || _answerData$exercise_18 === void 0 ? void 0 : _answerData$exercise_18.q_counts) || (answerData === null || answerData === void 0 || (_answerData$exercise_19 = answerData.exercise_scores) === null || _answerData$exercise_19 === void 0 || (_answerData$exercise_19 = _answerData$exercise_19.exercise_types) === null || _answerData$exercise_19 === void 0 ? void 0 : _answerData$exercise_19.q_counts)
children: (answerData === null || answerData === void 0 || (_answerData$exercise_19 = answerData.exercise_types) === null || _answerData$exercise_19 === void 0 ? void 0 : _answerData$exercise_19.q_counts) || (answerData === null || answerData === void 0 || (_answerData$exercise_20 = answerData.exercise_scores) === null || _answerData$exercise_20 === void 0 || (_answerData$exercise_20 = _answerData$exercise_20.exercise_types) === null || _answerData$exercise_20 === void 0 ? void 0 : _answerData$exercise_20.q_counts)
}), " \u9898\uFF1A"]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
className: "c-grey-333",
@ -4704,7 +4750,7 @@ var Answer = function Answer(_ref) {
style: {
color: '#FA6400'
},
children: (answerData === null || answerData === void 0 || (_answerData$exercise_20 = answerData.exercise_types) === null || _answerData$exercise_20 === void 0 ? void 0 : _answerData$exercise_20.q_scores) || (answerData === null || answerData === void 0 || (_answerData$exercise_21 = answerData.exercise_scores) === null || _answerData$exercise_21 === void 0 || (_answerData$exercise_21 = _answerData$exercise_21.exercise_types) === null || _answerData$exercise_21 === void 0 ? void 0 : _answerData$exercise_21.q_scores)
children: (answerData === null || answerData === void 0 || (_answerData$exercise_21 = answerData.exercise_types) === null || _answerData$exercise_21 === void 0 ? void 0 : _answerData$exercise_21.q_scores) || (answerData === null || answerData === void 0 || (_answerData$exercise_22 = answerData.exercise_scores) === null || _answerData$exercise_22 === void 0 || (_answerData$exercise_22 = _answerData$exercise_22.exercise_types) === null || _answerData$exercise_22 === void 0 ? void 0 : _answerData$exercise_22.q_scores)
}), " \u5206"]
})]
})
@ -4725,7 +4771,7 @@ var Answer = function Answer(_ref) {
flex: "1",
children: /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
className: "".concat(Answermodules.cardList, " ").concat((_answerData$exercise10 = answerData.exercise) !== null && _answerData$exercise10 !== void 0 && _answerData$exercise10.open_phone_video_recording ? Answermodules.withQrcode : ''),
children: answerData === null || answerData === void 0 || (_answerData$exercise_22 = answerData.exercise_question_types) === null || _answerData$exercise_22 === void 0 ? void 0 : _answerData$exercise_22.map(function (er, index) {
children: answerData === null || answerData === void 0 || (_answerData$exercise_23 = answerData.exercise_question_types) === null || _answerData$exercise_23 === void 0 ? void 0 : _answerData$exercise_23.map(function (er, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(_react_17_0_2_react.Fragment, {
children: renderCardList(er, index)
}, er.question_type);
@ -4805,35 +4851,35 @@ var Answer = function Answer(_ref) {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(AsyncButton/* AsyncButton */.Z, {
icon: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont ".concat((_answerData$exercise_23 = answerData.exercise_question_types) !== null && _answerData$exercise_23 !== void 0 && (_answerData$exercise_23 = _answerData$exercise_23[oneindex].items[twoindex]) !== null && _answerData$exercise_23 !== void 0 && _answerData$exercise_23.is_marked ? 'icon-biaoji1' : 'icon-biaojigaiti'),
className: "iconfont ".concat((_answerData$exercise_24 = answerData.exercise_question_types) !== null && _answerData$exercise_24 !== void 0 && (_answerData$exercise_24 = _answerData$exercise_24[oneindex].items[twoindex]) !== null && _answerData$exercise_24 !== void 0 && _answerData$exercise_24.is_marked ? 'icon-biaoji1' : 'icon-biaojigaiti'),
style: {
color: '#FFB538',
marginRight: 6
}
}),
className: Answermodules.markBtn,
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee15() {
var _answerData$exercise_24;
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee16() {
var _answerData$exercise_25;
var res;
return regeneratorRuntime_default()().wrap(function _callee15$(_context15) {
while (1) switch (_context15.prev = _context15.next) {
return regeneratorRuntime_default()().wrap(function _callee16$(_context16) {
while (1) switch (_context16.prev = _context16.next) {
case 0:
_context15.next = 2;
_context16.next = 2;
return (0,service_exercise/* markQuestion */.sS)(params.categoryId, {
exercise_question_id: (_answerData$exercise_24 = answerData.exercise_question_types[oneindex].items[twoindex]) === null || _answerData$exercise_24 === void 0 ? void 0 : _answerData$exercise_24.question_id
exercise_question_id: (_answerData$exercise_25 = answerData.exercise_question_types[oneindex].items[twoindex]) === null || _answerData$exercise_25 === void 0 ? void 0 : _answerData$exercise_25.question_id
});
case 2:
res = _context15.sent;
res = _context16.sent;
if (res.status === 0) {
initData();
}
case 4:
case "end":
return _context15.stop();
return _context16.stop();
}
}, _callee15);
}, _callee16);
})),
children: (_answerData$exercise_25 = answerData.exercise_question_types) !== null && _answerData$exercise_25 !== void 0 && (_answerData$exercise_25 = _answerData$exercise_25[oneindex].items[twoindex]) !== null && _answerData$exercise_25 !== void 0 && _answerData$exercise_25.is_marked ? '取消标记' : '标记该题'
children: (_answerData$exercise_26 = answerData.exercise_question_types) !== null && _answerData$exercise_26 !== void 0 && (_answerData$exercise_26 = _answerData$exercise_26[oneindex].items[twoindex]) !== null && _answerData$exercise_26 !== void 0 && _answerData$exercise_26.is_marked ? '取消标记' : '标记该题'
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
children: [(oneindex != 0 || twoindex != 0) && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
@ -4847,7 +4893,7 @@ var Answer = function Answer(_ref) {
skipPrevQuestion();
},
children: "\u4E0A\u4E00\u9898"
}), !showConfirm && !(oneindex === (answerData === null || answerData === void 0 || (_answerData$exercise_26 = answerData.exercise_question_types) === null || _answerData$exercise_26 === void 0 ? void 0 : _answerData$exercise_26.length) - 1 && twoindex === (answerData === null || answerData === void 0 || (_answerData$exercise_27 = answerData.exercise_question_types) === null || _answerData$exercise_27 === void 0 || (_answerData$exercise_27 = _answerData$exercise_27[oneindex]) === null || _answerData$exercise_27 === void 0 || (_answerData$exercise_27 = _answerData$exercise_27.items) === null || _answerData$exercise_27 === void 0 ? void 0 : _answerData$exercise_27.length) - 1) && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
}), !showConfirm && !(oneindex === (answerData === null || answerData === void 0 || (_answerData$exercise_27 = answerData.exercise_question_types) === null || _answerData$exercise_27 === void 0 ? void 0 : _answerData$exercise_27.length) - 1 && twoindex === (answerData === null || answerData === void 0 || (_answerData$exercise_28 = answerData.exercise_question_types) === null || _answerData$exercise_28 === void 0 || (_answerData$exercise_28 = _answerData$exercise_28[oneindex]) === null || _answerData$exercise_28 === void 0 || (_answerData$exercise_28 = _answerData$exercise_28.items) === null || _answerData$exercise_28 === void 0 ? void 0 : _answerData$exercise_28.length) - 1) && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
className: Answermodules.changeButton,
type: "primary",
onClick: function onClick() {
@ -4861,54 +4907,16 @@ var Answer = function Answer(_ref) {
}), showConfirm && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
className: "".concat(Answermodules.changeButton, " ml20"),
type: "primary",
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee16() {
var _answerData$exercise_28;
var currentInfo, query, _currentInfo$user_ans, res, _res$data;
return regeneratorRuntime_default()().wrap(function _callee16$(_context16) {
while (1) switch (_context16.prev = _context16.next) {
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee17() {
return regeneratorRuntime_default()().wrap(function _callee17$(_context17) {
while (1) switch (_context17.prev = _context17.next) {
case 0:
currentInfo = (_answerData$exercise_28 = answerData.exercise_question_types) === null || _answerData$exercise_28 === void 0 || (_answerData$exercise_28 = _answerData$exercise_28[oneindex]) === null || _answerData$exercise_28 === void 0 || (_answerData$exercise_28 = _answerData$exercise_28.items) === null || _answerData$exercise_28 === void 0 ? void 0 : _answerData$exercise_28[twoindex];
query = {
questionId: currentInfo.question_id,
exercise_choice_id: [0, 1, 2].includes(currentInfo.question_type) ? currentInfo.user_answer : null
};
if (currentInfo.question_type == 3) {
// 填空题
query.answers = currentInfo.user_answer.map(function (item) {
return {
exercise_choice_id: item === null || item === void 0 ? void 0 : item.choice_id,
answer_text: item === null || item === void 0 ? void 0 : item.answer_text
};
});
} else if (currentInfo.question_type == 4) {
//简答题
query.answer_text = currentInfo === null || currentInfo === void 0 || (_currentInfo$user_ans = currentInfo.user_answer) === null || _currentInfo$user_ans === void 0 ? void 0 : _currentInfo$user_ans[0];
} else if (currentInfo.question_type == 7) {
//组合题
query.answers = currentInfo.sub_exercise_questions.map(function (item) {
return {
exercise_choice_id: item === null || item === void 0 ? void 0 : item.question_id,
answer_text: item === null || item === void 0 ? void 0 : item.user_answer
};
});
}
_context16.next = 5;
return (0,fetch/* default */.ZP)("/api/exercise_questions/".concat(currentInfo.question_id, "/exercise_answers/subject_exercise_answer.json"), {
method: 'POST',
body: query
});
case 5:
res = _context16.sent;
if (res.status == 0) {
setItemBankData(res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.item_bank_data);
setShowConfirm(false);
initData();
}
case 7:
submitAnswer();
case 1:
case "end":
return _context16.stop();
return _context17.stop();
}
}, _callee16);
}, _callee17);
})),
children: "\u786E\u5B9A"
})]
@ -4918,6 +4926,7 @@ var Answer = function Answer(_ref) {
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
width: 900,
centered: true,
keyboard: false,
closable: false,
@ -4931,16 +4940,16 @@ var Answer = function Answer(_ref) {
_setKnowledgeDialog(false);
},
children: itemBankData.length > 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: renderQuestion(itemBankData[0], 0)
children: renderQuestion(itemBankData[0], 0, false)
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {})
})]
});
};
/* harmony default export */ var Detail_Answer = ((0,_umi_production_exports.connect)(function (_ref16) {
var loading = _ref16.loading,
user = _ref16.user,
exercise = _ref16.exercise,
globalSetting = _ref16.globalSetting;
/* harmony default export */ var Detail_Answer = ((0,_umi_production_exports.connect)(function (_ref17) {
var loading = _ref17.loading,
user = _ref17.user,
exercise = _ref17.exercise,
globalSetting = _ref17.globalSetting;
return {
globalSetting: globalSetting,
user: user,

@ -17660,7 +17660,7 @@ var Stage = function Stage(_ref) {
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "iconfont icon-tianjiafangda mr5 "
}), "\u8BD5\u5377"]
}), "\u7EC3\u4E60"]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
className: "c-light-black mt10 pb20",

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save