|
|
|
|
@ -445,9 +445,10 @@ var jsx_runtime = __webpack_require__(37712);
|
|
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, {
|
|
|
|
|
type: "primary",
|
|
|
|
|
size: 'middle',
|
|
|
|
|
onClick: handleClick,
|
|
|
|
|
onClick: handleDown,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"]
|
|
|
|
|
})
|
|
|
|
|
// handleClick
|
|
|
|
|
})]
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
@ -3329,7 +3330,8 @@ var CaptureVideo = /*#__PURE__*/(0,_react_17_0_2_react.forwardRef)(function (_re
|
|
|
|
|
number = _ref.number,
|
|
|
|
|
supportCamera = _ref.supportCamera,
|
|
|
|
|
take_photo = _ref.take_photo,
|
|
|
|
|
update = _ref.update;
|
|
|
|
|
update = _ref.update,
|
|
|
|
|
id = _ref.id;
|
|
|
|
|
var video = (0,_react_17_0_2_react.useRef)();
|
|
|
|
|
var canvas = (0,_react_17_0_2_react.useRef)();
|
|
|
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
|
|
|
@ -4371,7 +4373,9 @@ var Shixun = function Shixun(_ref) {
|
|
|
|
|
var _item$shixun_details3;
|
|
|
|
|
var shixunItem = item === null || item === void 0 ? void 0 : item.shixun_details[i].stage_list[j];
|
|
|
|
|
shixun.push(objectSpread2_default()(objectSpread2_default()({}, shixunItem), {
|
|
|
|
|
operation: item === null || item === void 0 || (_item$shixun_details3 = item.shixun_details) === null || _item$shixun_details3 === void 0 || (_item$shixun_details3 = _item$shixun_details3[i]) === null || _item$shixun_details3 === void 0 || (_item$shixun_details3 = _item$shixun_details3.shixun_detail) === null || _item$shixun_details3 === void 0 || (_item$shixun_details3 = _item$shixun_details3[0]) === null || _item$shixun_details3 === void 0 ? void 0 : _item$shixun_details3.game_identifier
|
|
|
|
|
operation: item === null || item === void 0 || (_item$shixun_details3 = item.shixun_details) === null || _item$shixun_details3 === void 0 || (_item$shixun_details3 = _item$shixun_details3[i]) === null || _item$shixun_details3 === void 0 || (_item$shixun_details3 = _item$shixun_details3.shixun_detail) === null || _item$shixun_details3 === void 0 || (_item$shixun_details3 = _item$shixun_details3[0]) === null || _item$shixun_details3 === void 0 ? void 0 : _item$shixun_details3.game_identifier,
|
|
|
|
|
is_jupyter: item === null || item === void 0 ? void 0 : item.is_jupyter,
|
|
|
|
|
is_jupyter_lab: item === null || item === void 0 ? void 0 : item.is_jupyter_lab
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
if (item !== null && item !== void 0 && (_item$shixun_details4 = item.shixun_details) !== null && _item$shixun_details4 !== void 0 && (_item$shixun_details4 = _item$shixun_details4[i]) !== null && _item$shixun_details4 !== void 0 && _item$shixun_details4.shixun_detail) {
|
|
|
|
|
@ -4492,7 +4496,7 @@ var Shixun = function Shixun(_ref) {
|
|
|
|
|
key: "operation",
|
|
|
|
|
align: 'center',
|
|
|
|
|
render: function render(value, data, index) {
|
|
|
|
|
return value ? /*#__PURE__*/(0,jsx_runtime.jsx)(es_anchor/* default */.Z, {
|
|
|
|
|
return value && !data.is_jupyter && !data.is_jupyter_lab ? /*#__PURE__*/(0,jsx_runtime.jsx)(es_anchor/* default */.Z, {
|
|
|
|
|
affix: false,
|
|
|
|
|
className: "mt10",
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_anchor/* default */.Z.Link, {
|
|
|
|
|
@ -6282,19 +6286,23 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
while (1) switch (_context12.prev = _context12.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
_context12.next = 2;
|
|
|
|
|
return (0,shixuns/* execShixun */.Ir)({
|
|
|
|
|
return (item.is_jupyter || item.is_jupyter_lab ? shixuns/* execJupyter */.BK : shixuns/* execShixun */.Ir)({
|
|
|
|
|
id: item.shixun_identifier
|
|
|
|
|
});
|
|
|
|
|
case 2:
|
|
|
|
|
res = _context12.sent;
|
|
|
|
|
if (res !== null && res !== void 0 && res.game_identifier) {
|
|
|
|
|
setIframeUrl("/tasks/".concat(res.game_identifier, "?type=exercises&exercisesId=").concat(params.categoryId, "&coursesId=").concat(params.coursesId, "&login=").concat(params.login, "&questionId=").concat(item.question_id, "&isFullScreen=").concat((0,fullscreen/* IsFull */.vp)()).concat(iframeUrlSuffix.current || ""));
|
|
|
|
|
if (res !== null && res !== void 0 && res.game_identifier || res !== null && res !== void 0 && res.identifier) {
|
|
|
|
|
if (item.is_jupyter_lab || item.is_jupyter) {
|
|
|
|
|
setIframeUrl("/tasks/".concat(res.identifier, "/jupyter?type=exercises&exercisesId=").concat(params.categoryId, "&coursesId=").concat(params.coursesId, "&login=").concat(params.login, "&questionId=").concat(item.question_id, "&isFullScreen=").concat((0,fullscreen/* IsFull */.vp)()).concat(iframeUrlSuffix.current || ""));
|
|
|
|
|
} else {
|
|
|
|
|
setIframeUrl("/tasks/".concat(res.game_identifier, "?type=exercises&exercisesId=").concat(params.categoryId, "&coursesId=").concat(params.coursesId, "&login=").concat(params.login, "&questionId=").concat(item.question_id, "&isFullScreen=").concat((0,fullscreen/* IsFull */.vp)()).concat(iframeUrlSuffix.current || ""));
|
|
|
|
|
}
|
|
|
|
|
setIframeBlock("block");
|
|
|
|
|
}
|
|
|
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === -3) {
|
|
|
|
|
(0,util/* bindPhone */.eF)();
|
|
|
|
|
} else if ((res === null || res === void 0 ? void 0 : res.status) === 2) {
|
|
|
|
|
handleResetGame(res === null || res === void 0 ? void 0 : res.message, item.question_id);
|
|
|
|
|
handleResetGame(res === null || res === void 0 ? void 0 : res.message, item.question_id, item.is_jupyter_lab, item.is_jupyter);
|
|
|
|
|
} else if ((res === null || res === void 0 ? void 0 : res.status) === 3) {
|
|
|
|
|
handleInBeta(res === null || res === void 0 ? void 0 : res.message);
|
|
|
|
|
}
|
|
|
|
|
@ -6308,7 +6316,7 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
return _ref11.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
var handleResetGame = function handleResetGame(url, question_id) {
|
|
|
|
|
var handleResetGame = function handleResetGame(url, question_id, is_jupyter_lab, is_jupyter) {
|
|
|
|
|
var _url;
|
|
|
|
|
url = (_url = url) !== null && _url !== void 0 && _url.includes('.json') ? url : "".concat(url, ".json");
|
|
|
|
|
es_modal/* default */.Z.confirm({
|
|
|
|
|
@ -6351,13 +6359,15 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
}
|
|
|
|
|
goShixun({
|
|
|
|
|
shixun_identifier: execRes === null || execRes === void 0 ? void 0 : execRes.game_identifier,
|
|
|
|
|
question_id: question_id
|
|
|
|
|
question_id: question_id,
|
|
|
|
|
is_jupyter_lab: is_jupyter_lab,
|
|
|
|
|
is_jupyter: is_jupyter
|
|
|
|
|
});
|
|
|
|
|
// openNewWindow(`/tasks/${execRes.game_identifier}`);
|
|
|
|
|
return _context13.abrupt("return");
|
|
|
|
|
case 12:
|
|
|
|
|
if ((execRes === null || execRes === void 0 ? void 0 : execRes.status) === 2) {
|
|
|
|
|
handleResetGame(execRes === null || execRes === void 0 ? void 0 : execRes.message, question_id);
|
|
|
|
|
handleResetGame(execRes === null || execRes === void 0 ? void 0 : execRes.message, question_id, is_jupyter_lab, is_jupyter);
|
|
|
|
|
} else if ((execRes === null || execRes === void 0 ? void 0 : execRes.status) === 3) {
|
|
|
|
|
handleInBeta(execRes === null || execRes === void 0 ? void 0 : execRes.message);
|
|
|
|
|
}
|
|
|
|
|
@ -8388,6 +8398,7 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
number: (answerData === null || answerData === void 0 || (_answerData$exercise41 = answerData.exercise) === null || _answerData$exercise41 === void 0 ? void 0 : _answerData$exercise41.photo_count) - (answerData === null || answerData === void 0 || (_answerData$exercise42 = answerData.exercise) === null || _answerData$exercise42 === void 0 ? void 0 : _answerData$exercise42.take_photo),
|
|
|
|
|
take_photo: answerData === null || answerData === void 0 || (_answerData$exercise43 = answerData.exercise) === null || _answerData$exercise43 === void 0 ? void 0 : _answerData$exercise43.take_photo,
|
|
|
|
|
ref: captureRef,
|
|
|
|
|
id: params.categoryId,
|
|
|
|
|
time: (_answerData$exercise44 = answerData.exercise) === null || _answerData$exercise44 === void 0 ? void 0 : _answerData$exercise44.left_time,
|
|
|
|
|
update: initData,
|
|
|
|
|
supportCamera: function supportCamera(type) {
|
|
|
|
|
|