From a3a6736223c173a3a851eb35f2024aa9b721317e Mon Sep 17 00:00:00 2001 From: autosubmit Date: Fri, 17 Nov 2023 13:52:58 +0800 Subject: [PATCH] Auto Submit --- ...s__Exercise__ImitateAnswer__index.async.js | 20 +- p__tasks__Jupyter__index.async.js | 256 ++++++++++-------- 2 files changed, 153 insertions(+), 123 deletions(-) diff --git a/p__Classrooms__Lists__Exercise__ImitateAnswer__index.async.js b/p__Classrooms__Lists__Exercise__ImitateAnswer__index.async.js index 3c3fa328ed..df816c86a9 100644 --- a/p__Classrooms__Lists__Exercise__ImitateAnswer__index.async.js +++ b/p__Classrooms__Lists__Exercise__ImitateAnswer__index.async.js @@ -4223,19 +4223,23 @@ var Answer = function Answer(_ref) { while (1) switch (_context4.prev = _context4.next) { case 0: _context4.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 = _context4.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)); + 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)); + } 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)); + } 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); } @@ -4249,7 +4253,7 @@ var Answer = function Answer(_ref) { return _ref4.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({ @@ -4292,12 +4296,14 @@ 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 }); return _context5.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); } diff --git a/p__tasks__Jupyter__index.async.js b/p__tasks__Jupyter__index.async.js index 076a864cef..233db842e8 100644 --- a/p__tasks__Jupyter__index.async.js +++ b/p__tasks__Jupyter__index.async.js @@ -1142,6 +1142,30 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { updateCode(); } }, [jupyterData]); + var getExerciseData = /*#__PURE__*/function () { + var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() { + var res; + return regeneratorRuntime_default()().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return getExerciseStartAnswer({ + categoryId: searchParams.get("exercisesId"), + login: searchParams.get("login") + }); + case 2: + res = _context.sent; + exerciseDataRef.current = res; + case 4: + case "end": + return _context.stop(); + } + }, _callee); + })); + return function getExerciseData() { + return _ref2.apply(this, arguments); + }; + }(); var updateCode = function updateCode() { tipReset({ title: '更新通知', @@ -1151,14 +1175,14 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { }); }; var submitWork = /*#__PURE__*/function () { - var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() { + var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() { var iframe; - return regeneratorRuntime_default()().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { + return regeneratorRuntime_default()().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { case 0: iframe = document.getElementById('taskJupyterIframe'); iframe.contentWindow.postMessage('saveCode', '*'); - _context.next = 4; + _context2.next = 4; return (0,fetch/* default */.ZP)("/api/homework_commons/".concat(searchParams.get("homework_common_id"), "/student_works.json"), { method: 'post', body: { @@ -1167,12 +1191,12 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { }); case 4: case "end": - return _context.stop(); + return _context2.stop(); } - }, _callee); + }, _callee2); })); return function submitWork() { - return _ref2.apply(this, arguments); + return _ref3.apply(this, arguments); }; }(); var handleJupyterMessage = function handleJupyterMessage(e) { @@ -1189,19 +1213,19 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { }; var handleSaveWithTPI = /*#__PURE__*/function () { - var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() { + var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() { var res; - return regeneratorRuntime_default()().wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { + return regeneratorRuntime_default()().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { case 0: - _context2.next = 2; + _context3.next = 2; return (0,task/* saveWithTPI */.zE)({ identifier: params.identifier, jupyter_port: port.current, token: token.current }); case 2: - res = _context2.sent; + res = _context3.sent; if (res.status === 0) { if (clickEvaluating.current) { // 点击评测的时候执行 @@ -1212,20 +1236,20 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { } case 4: case "end": - return _context2.stop(); + return _context3.stop(); } - }, _callee2); + }, _callee3); })); return function handleSaveWithTPI() { - return _ref3.apply(this, arguments); + return _ref4.apply(this, arguments); }; }(); var getGame = /*#__PURE__*/function () { - var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4(re) { + var _ref5 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5(re) { var _saveJupyterData$curr, _saveJupyterData$curr2; var _params, rs, count, time_out, finalTime, fnc; - return regeneratorRuntime_default()().wrap(function _callee4$(_context4) { - while (1) switch (_context4.prev = _context4.next) { + return regeneratorRuntime_default()().wrap(function _callee5$(_context5) { + while (1) switch (_context5.prev = _context5.next) { case 0: _params = { sec_key: re === null || re === void 0 ? void 0 : re.sec_key, @@ -1238,31 +1262,31 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { homework_common_id: searchParams.get("homework_common_id") }; } - _context4.next = 4; + _context5.next = 4; return (0,service/* codeGameBuild */.Xy)((_saveJupyterData$curr = saveJupyterData.current) === null || _saveJupyterData$curr === void 0 ? void 0 : _saveJupyterData$curr.game_identifier, _params); case 4: - rs = _context4.sent; + rs = _context5.sent; if (!(rs.status === -1)) { - _context4.next = 11; + _context5.next = 11; break; } setBtnLoading(false); setBtnTime(10); clickEvaluating.current = false; jupyterMessageFlag.current = true; - return _context4.abrupt("return"); + return _context5.abrupt("return"); case 11: count = 1; time_out = false; finalTime = ((_saveJupyterData$curr2 = saveJupyterData.current) === null || _saveJupyterData$curr2 === void 0 ? void 0 : _saveJupyterData$curr2.exec_time) + 11; fnc = /*#__PURE__*/function () { - var _ref5 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() { + var _ref6 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4() { var _saveJupyterData$curr3, _saveJupyterData$curr4, _saveJupyterData$curr5; var source; - return regeneratorRuntime_default()().wrap(function _callee3$(_context3) { - while (1) switch (_context3.prev = _context3.next) { + return regeneratorRuntime_default()().wrap(function _callee4$(_context4) { + while (1) switch (_context4.prev = _context4.next) { case 0: - _context3.next = 2; + _context4.next = 2; return (0,service/* getCodeGameStatus */.Qo)((_saveJupyterData$curr3 = saveJupyterData.current) === null || _saveJupyterData$curr3 === void 0 ? void 0 : _saveJupyterData$curr3.game_identifier, { resubmit: re === null || re === void 0 ? void 0 : re.resubmit, time_out: time_out, @@ -1271,7 +1295,7 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { challenge_id: (_saveJupyterData$curr5 = saveJupyterData.current) === null || _saveJupyterData$curr5 === void 0 ? void 0 : _saveJupyterData$curr5.challenge_id }); case 2: - source = _context3.sent; + source = _context4.sent; if ((source === null || source === void 0 ? void 0 : source.running_code_status) === null || (source === null || source === void 0 ? void 0 : source.running_code_status) === 1 || (source === null || source === void 0 ? void 0 : source.running_code_status) === 2) { count = count + 1; if (count > finalTime) { @@ -1300,38 +1324,38 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { } case 4: case "end": - return _context3.stop(); + return _context4.stop(); } - }, _callee3); + }, _callee4); })); return function fnc() { - return _ref5.apply(this, arguments); + return _ref6.apply(this, arguments); }; }(); fnc(); case 16: case "end": - return _context4.stop(); + return _context5.stop(); } - }, _callee4); + }, _callee5); })); return function getGame(_x) { - return _ref4.apply(this, arguments); + return _ref5.apply(this, arguments); }; }(); var handleGetJupyterData = /*#__PURE__*/function () { - var _ref6 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5() { + var _ref7 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6() { var res; - return regeneratorRuntime_default()().wrap(function _callee5$(_context5) { - while (1) switch (_context5.prev = _context5.next) { + return regeneratorRuntime_default()().wrap(function _callee6$(_context6) { + while (1) switch (_context6.prev = _context6.next) { case 0: - _context5.next = 2; + _context6.next = 2; return (0,task/* getJupyterData */.dU)({ identifier: params.identifier, homework_id: searchParams.get("homework_common_id") }); case 2: - res = _context5.sent; + res = _context6.sent; if (res) { setJupyterData(res); saveJupyterData.current = objectSpread2_default()({}, res); @@ -1345,57 +1369,57 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { } case 4: case "end": - return _context5.stop(); + return _context6.stop(); } - }, _callee5); + }, _callee6); })); return function handleGetJupyterData() { - return _ref6.apply(this, arguments); + return _ref7.apply(this, arguments); }; }(); var handleGetJupyterTPIUrl = /*#__PURE__*/function () { - var _ref7 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6() { + var _ref8 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7() { var _res$data; var res, _res$data2, _res$data3, _parseUrl, _res$data4, _res$data5, _res$data6, _res$data7, _res$data8, _res$data9; - return regeneratorRuntime_default()().wrap(function _callee6$(_context6) { - while (1) switch (_context6.prev = _context6.next) { + return regeneratorRuntime_default()().wrap(function _callee7$(_context7) { + while (1) switch (_context7.prev = _context7.next) { case 0: - _context6.next = 2; + _context7.next = 2; return (0,task/* getInfoWithTPI */.rV)({ identifier: params.identifier, homework_common_id: searchParams.get("homework_common_id") || '' }); case 2: - res = _context6.sent; + res = _context7.sent; setSpinning(false); if (!(res !== null && res !== void 0 && (_res$data = res.data) !== null && _res$data !== void 0 && (_res$data = _res$data.data_list) !== null && _res$data !== void 0 && _res$data.length)) { - _context6.next = 7; + _context7.next = 7; break; } mediator/* default */.Z.publish('pod-restrict-data', { identifier: res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.identifier, data_list: res === null || res === void 0 || (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.data_list }); - return _context6.abrupt("return"); + return _context7.abrupt("return"); case 7: if (!(res !== null && res !== void 0 && res.data)) { - _context6.next = 18; + _context7.next = 18; break; } setUrl(res.data); token.current = (_parseUrl = (0,util/* parseUrl */.en)(res === null || res === void 0 || (_res$data4 = res.data) === null || _res$data4 === void 0 || (_res$data4 = _res$data4[0]) === null || _res$data4 === void 0 ? void 0 : _res$data4["link_url"])) === null || _parseUrl === void 0 ? void 0 : _parseUrl.token; port.current = res === null || res === void 0 || (_res$data5 = res.data) === null || _res$data5 === void 0 || (_res$data5 = _res$data5[0]) === null || _res$data5 === void 0 ? void 0 : _res$data5["port"]; if (!(((_res$data6 = res.data) === null || _res$data6 === void 0 ? void 0 : _res$data6.length) > 1)) { - _context6.next = 13; + _context7.next = 13; break; } - return _context6.abrupt("return"); + return _context7.abrupt("return"); case 13: setUrlSign(false); setStatus(Status.Success); setTime(Date.now() + (res === null || res === void 0 || (_res$data7 = res.data) === null || _res$data7 === void 0 || (_res$data7 = _res$data7[0]) === null || _res$data7 === void 0 ? void 0 : _res$data7.remaining_time)); setEndTime((res === null || res === void 0 || (_res$data8 = res.data) === null || _res$data8 === void 0 || (_res$data8 = _res$data8[0]) === null || _res$data8 === void 0 ? void 0 : _res$data8.remaining_time) - 300 * 1000 <= 0 ? Date.now() + 1000 : Date.now() + ((res === null || res === void 0 || (_res$data9 = res.data) === null || _res$data9 === void 0 || (_res$data9 = _res$data9[0]) === null || _res$data9 === void 0 ? void 0 : _res$data9.remaining_time) - 300 * 1000)); - return _context6.abrupt("return"); + return _context7.abrupt("return"); case 18: if (res.status === -1) { setStatus(Status.LoadFail); @@ -1405,12 +1429,12 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { } case 19: case "end": - return _context6.stop(); + return _context7.stop(); } - }, _callee6); + }, _callee7); })); return function handleGetJupyterTPIUrl() { - return _ref7.apply(this, arguments); + return _ref8.apply(this, arguments); }; }(); var handleUrlClick = function handleUrlClick(num) { @@ -1420,29 +1444,29 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { setStatus(Status.Success); }; var handleGetTPITimeInfo = /*#__PURE__*/function () { - var _ref8 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7() { + var _ref9 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee8() { var res; - return regeneratorRuntime_default()().wrap(function _callee7$(_context7) { - while (1) switch (_context7.prev = _context7.next) { + return regeneratorRuntime_default()().wrap(function _callee8$(_context8) { + while (1) switch (_context8.prev = _context8.next) { case 0: - _context7.next = 2; + _context8.next = 2; return (0,task/* getTimeInfoWithTPI */.x4)({ identifier: params.identifier }); case 2: - res = _context7.sent; + res = _context8.sent; if (!((res === null || res === void 0 ? void 0 : res.status) !== 0)) { - _context7.next = 5; + _context8.next = 5; break; } - return _context7.abrupt("return"); + return _context8.abrupt("return"); case 5: if (res !== null && res !== void 0 && res.useSeconds) { - _context7.next = 8; + _context8.next = 8; break; } handleResetEnvModal(); - return _context7.abrupt("return"); + return _context8.abrupt("return"); case 8: if (res !== null && res !== void 0 && res.remainingSeconds) { setTime(Date.now() + res.remainingSeconds * 1000); @@ -1450,12 +1474,12 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { } case 9: case "end": - return _context7.stop(); + return _context8.stop(); } - }, _callee7); + }, _callee8); })); return function handleGetTPITimeInfo() { - return _ref8.apply(this, arguments); + return _ref9.apply(this, arguments); }; }(); var handleResetEnvModal = function handleResetEnvModal() { @@ -1477,22 +1501,22 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { }); }; var handleResetEnv = /*#__PURE__*/function () { - var _ref9 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee8() { + var _ref10 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee9() { var res; - return regeneratorRuntime_default()().wrap(function _callee8$(_context8) { - while (1) switch (_context8.prev = _context8.next) { + return regeneratorRuntime_default()().wrap(function _callee9$(_context9) { + while (1) switch (_context9.prev = _context9.next) { case 0: - _context8.next = 2; + _context9.next = 2; return (0,task/* resetWithTPI */.m_)({ identifier: jupyterData === null || jupyterData === void 0 ? void 0 : jupyterData.myshixun_identifier }); case 2: - res = _context8.sent; + res = _context9.sent; if (!((res === null || res === void 0 ? void 0 : res.status) !== 0)) { - _context8.next = 5; + _context9.next = 5; break; } - return _context8.abrupt("return"); + return _context9.abrupt("return"); case 5: message/* default */.ZP.success('重置成功!'); setSpinning(false); @@ -1501,12 +1525,12 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { }, 300); case 8: case "end": - return _context8.stop(); + return _context9.stop(); } - }, _callee8); + }, _callee9); })); return function handleResetEnv() { - return _ref9.apply(this, arguments); + return _ref10.apply(this, arguments); }; }(); var handleEndTimeFinish = function handleEndTimeFinish() { @@ -1527,28 +1551,28 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { okText: '立即延长', cancelText: '不需要', onOk: function () { - var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee9() { + var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee10() { var res; - return regeneratorRuntime_default()().wrap(function _callee9$(_context9) { - while (1) switch (_context9.prev = _context9.next) { + return regeneratorRuntime_default()().wrap(function _callee10$(_context10) { + while (1) switch (_context10.prev = _context10.next) { case 0: - _context9.next = 2; + _context10.next = 2; return (0,task/* activeWithTPI */.rB)(jupyterData === null || jupyterData === void 0 ? void 0 : jupyterData.myshixun_identifier); case 2: - res = _context9.sent; + res = _context10.sent; if (!(res.status === 0)) { - _context9.next = 7; + _context10.next = 7; break; } - _context9.next = 6; + _context10.next = 6; return handleGetJupyterTPIUrl(); case 6: message/* default */.ZP.success('延长成功!'); case 7: case "end": - return _context9.stop(); + return _context10.stop(); } - }, _callee9); + }, _callee10); })); function onOk() { return _onOk.apply(this, arguments); @@ -1619,22 +1643,22 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { okText: '确定', cancelText: '取消', onOk: function () { - var _onOk2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee10() { + var _onOk2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee11() { var res; - return regeneratorRuntime_default()().wrap(function _callee10$(_context10) { - while (1) switch (_context10.prev = _context10.next) { + return regeneratorRuntime_default()().wrap(function _callee11$(_context11) { + while (1) switch (_context11.prev = _context11.next) { case 0: - _context10.next = 2; + _context11.next = 2; return (0,task/* syncCode */.fi)({ identifier: params.identifier }); case 2: - res = _context10.sent; + res = _context11.sent; if (!(res.status !== 0)) { - _context10.next = 5; + _context11.next = 5; break; } - return _context10.abrupt("return"); + return _context11.abrupt("return"); case 5: message/* default */.ZP.success('操作成功'); setSpinning(false); @@ -1643,9 +1667,9 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { }, 300); case 8: case "end": - return _context10.stop(); + return _context11.stop(); } - }, _callee10); + }, _callee11); })); function onOk() { return _onOk2.apply(this, arguments); @@ -1698,12 +1722,12 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { answerData = _useState36[0], setAnswerData = _useState36[1]; var getAnswerData = /*#__PURE__*/function () { - var _ref10 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee11(identifier) { + var _ref11 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee12(identifier) { var res; - return regeneratorRuntime_default()().wrap(function _callee11$(_context11) { - while (1) switch (_context11.prev = _context11.next) { + return regeneratorRuntime_default()().wrap(function _callee12$(_context12) { + while (1) switch (_context12.prev = _context12.next) { case 0: - _context11.next = 2; + _context12.next = 2; return (0,fetch/* default */.ZP)("/api/shixuns/".concat(identifier, "/get_standard_answer.json"), { method: 'get', params: { @@ -1711,18 +1735,18 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { } }); case 2: - res = _context11.sent; + res = _context12.sent; if (res.status === 0) { setAnswerData(res); } case 4: case "end": - return _context11.stop(); + return _context12.stop(); } - }, _callee11); + }, _callee12); })); return function getAnswerData(_x2) { - return _ref10.apply(this, arguments); + return _ref11.apply(this, arguments); }; }(); (0,_react_17_0_2_react.useEffect)(function () { @@ -1777,17 +1801,17 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { return _onResetGitCode.apply(this, arguments); } function _onResetGitCode() { - _onResetGitCode = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee12() { + _onResetGitCode = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee13() { var response; - return regeneratorRuntime_default()().wrap(function _callee12$(_context12) { - while (1) switch (_context12.prev = _context12.next) { + return regeneratorRuntime_default()().wrap(function _callee13$(_context13) { + while (1) switch (_context13.prev = _context13.next) { case 0: - _context12.next = 2; + _context13.next = 2; return (0,service/* resetGitCode */.Tf)(jupyterData === null || jupyterData === void 0 ? void 0 : jupyterData.myshixun_identifier, {}); case 2: - response = _context12.sent; + response = _context13.sent; if (!((response === null || response === void 0 ? void 0 : response.status) === -5)) { - _context12.next = 6; + _context13.next = 6; break; } modal/* default */.Z.info({ @@ -1803,14 +1827,14 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { }), "\uFF09\u4E2D\u88AB\u4F7F\u7528\uFF0C\u7528\u6237\u8BD5\u5377\u5DF2\u4EA4\u5377\uFF0C\u7981\u6B62\u518D\u4F5C\u7B54\uFF01"] }) }); - return _context12.abrupt("return"); + return _context13.abrupt("return"); case 6: - return _context12.abrupt("return", response); + return _context13.abrupt("return", response); case 7: case "end": - return _context12.stop(); + return _context13.stop(); } - }, _callee12); + }, _callee13); })); return _onResetGitCode.apply(this, arguments); } @@ -2160,9 +2184,9 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { })] }); }; -/* harmony default export */ var Jupyter = ((0,_umi_production_exports.connect)(function (_ref11) { - var loading = _ref11.loading, - globalSetting = _ref11.globalSetting; +/* harmony default export */ var Jupyter = ((0,_umi_production_exports.connect)(function (_ref12) { + var loading = _ref12.loading, + globalSetting = _ref12.globalSetting; return { globalSetting: globalSetting, loading: loading