|
|
|
|
@ -9312,23 +9312,23 @@ function TipContent() {
|
|
|
|
|
return _onReset.apply(this, arguments);
|
|
|
|
|
}
|
|
|
|
|
function _onReset() {
|
|
|
|
|
_onReset = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6() {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee6$(_context6) {
|
|
|
|
|
while (1) switch (_context6.prev = _context6.next) {
|
|
|
|
|
_onReset = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7() {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee7$(_context7) {
|
|
|
|
|
while (1) switch (_context7.prev = _context7.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
if (!resetVncLoading) {
|
|
|
|
|
_context6.next = 2;
|
|
|
|
|
_context7.next = 2;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
return _context6.abrupt("return");
|
|
|
|
|
return _context7.abrupt("return");
|
|
|
|
|
case 2:
|
|
|
|
|
_context6.next = 4;
|
|
|
|
|
_context7.next = 4;
|
|
|
|
|
return onResetVnc();
|
|
|
|
|
case 4:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context6.stop();
|
|
|
|
|
return _context7.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee6);
|
|
|
|
|
}, _callee7);
|
|
|
|
|
}));
|
|
|
|
|
return _onReset.apply(this, arguments);
|
|
|
|
|
}
|
|
|
|
|
@ -9355,21 +9355,42 @@ function TipContent() {
|
|
|
|
|
centered: true,
|
|
|
|
|
okText: '确定',
|
|
|
|
|
cancelText: '取消',
|
|
|
|
|
onOk: function onOk() {
|
|
|
|
|
if (countRef.current) {
|
|
|
|
|
(0,exercise/* exitDeletePod */.eA)(myshixun === null || myshixun === void 0 ? void 0 : myshixun.identifier).then(function (res) {
|
|
|
|
|
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
|
|
|
|
|
message/* default */.ZP.success('释放资源成功');
|
|
|
|
|
onOk: function () {
|
|
|
|
|
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
|
|
|
var res;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
if (!countRef.current) {
|
|
|
|
|
_context2.next = 8;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
_context2.next = 3;
|
|
|
|
|
return (0,exercise/* exitDeletePod */.eA)(myshixun === null || myshixun === void 0 ? void 0 : myshixun.identifier);
|
|
|
|
|
case 3:
|
|
|
|
|
res = _context2.sent;
|
|
|
|
|
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
|
|
|
|
|
message/* default */.ZP.success('释放资源成功');
|
|
|
|
|
}
|
|
|
|
|
//停一秒后再退出跳转
|
|
|
|
|
setTimeout(function () {
|
|
|
|
|
toShixun();
|
|
|
|
|
}, 1000);
|
|
|
|
|
_context2.next = 9;
|
|
|
|
|
break;
|
|
|
|
|
case 8:
|
|
|
|
|
toShixun();
|
|
|
|
|
case 9:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context2.stop();
|
|
|
|
|
}
|
|
|
|
|
//停一秒后再退出跳转
|
|
|
|
|
setTimeout(function () {
|
|
|
|
|
toShixun();
|
|
|
|
|
}, 1000);
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
toShixun();
|
|
|
|
|
}, _callee2);
|
|
|
|
|
}));
|
|
|
|
|
function onOk() {
|
|
|
|
|
return _onOk.apply(this, arguments);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
return onOk;
|
|
|
|
|
}(),
|
|
|
|
|
onCancel: function onCancel() {
|
|
|
|
|
setcheckboxData(false);
|
|
|
|
|
}
|
|
|
|
|
@ -9389,12 +9410,12 @@ function TipContent() {
|
|
|
|
|
okText: '确定',
|
|
|
|
|
cancelText: '取消',
|
|
|
|
|
onOk: function () {
|
|
|
|
|
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
|
|
var _onOk2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
if (!(tab_type === 4)) {
|
|
|
|
|
_context2.next = 6;
|
|
|
|
|
_context3.next = 6;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
modal.update({
|
|
|
|
|
@ -9402,7 +9423,7 @@ function TipContent() {
|
|
|
|
|
disabled: true
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
_context2.next = 4;
|
|
|
|
|
_context3.next = 4;
|
|
|
|
|
return onReset();
|
|
|
|
|
case 4:
|
|
|
|
|
modal.update({
|
|
|
|
|
@ -9410,17 +9431,17 @@ function TipContent() {
|
|
|
|
|
disabled: false
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return _context2.abrupt("return");
|
|
|
|
|
return _context3.abrupt("return");
|
|
|
|
|
case 6:
|
|
|
|
|
onReset();
|
|
|
|
|
case 7:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context2.stop();
|
|
|
|
|
return _context3.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee2);
|
|
|
|
|
}, _callee3);
|
|
|
|
|
}));
|
|
|
|
|
function onOk() {
|
|
|
|
|
return _onOk.apply(this, arguments);
|
|
|
|
|
return _onOk2.apply(this, arguments);
|
|
|
|
|
}
|
|
|
|
|
return onOk;
|
|
|
|
|
}()
|
|
|
|
|
@ -9439,12 +9460,12 @@ function TipContent() {
|
|
|
|
|
okText: '确定',
|
|
|
|
|
cancelText: '取消',
|
|
|
|
|
onOk: function () {
|
|
|
|
|
var _onOk2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
|
|
var _onOk3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4() {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
|
|
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
if (!(tab_type === 4)) {
|
|
|
|
|
_context3.next = 6;
|
|
|
|
|
_context4.next = 6;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
_modal.update({
|
|
|
|
|
@ -9452,7 +9473,7 @@ function TipContent() {
|
|
|
|
|
disabled: true
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
_context3.next = 4;
|
|
|
|
|
_context4.next = 4;
|
|
|
|
|
return onRestartReboot();
|
|
|
|
|
case 4:
|
|
|
|
|
_modal.update({
|
|
|
|
|
@ -9460,17 +9481,17 @@ function TipContent() {
|
|
|
|
|
disabled: false
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return _context3.abrupt("return");
|
|
|
|
|
return _context4.abrupt("return");
|
|
|
|
|
case 6:
|
|
|
|
|
onRestartReboot();
|
|
|
|
|
case 7:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context3.stop();
|
|
|
|
|
return _context4.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee3);
|
|
|
|
|
}, _callee4);
|
|
|
|
|
}));
|
|
|
|
|
function onOk() {
|
|
|
|
|
return _onOk2.apply(this, arguments);
|
|
|
|
|
return _onOk3.apply(this, arguments);
|
|
|
|
|
}
|
|
|
|
|
return onOk;
|
|
|
|
|
}()
|
|
|
|
|
@ -9705,18 +9726,18 @@ function TipContent() {
|
|
|
|
|
fontWeight: 500
|
|
|
|
|
},
|
|
|
|
|
value: countDownTime,
|
|
|
|
|
onFinish: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5() {
|
|
|
|
|
onFinish: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6() {
|
|
|
|
|
var res, time;
|
|
|
|
|
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,exercise/* submitExerciseAnswer */.VL)({
|
|
|
|
|
categoryId: searchParams.get("exercisesId"),
|
|
|
|
|
commit_method: 2
|
|
|
|
|
});
|
|
|
|
|
case 2:
|
|
|
|
|
res = _context5.sent;
|
|
|
|
|
res = _context6.sent;
|
|
|
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
|
|
|
if (st === 0) {
|
|
|
|
|
onUpdateCode(1);
|
|
|
|
|
@ -9731,19 +9752,19 @@ function TipContent() {
|
|
|
|
|
children: ["\u7B54\u9898\u7ED3\u675F\u4E86\uFF0C\u7CFB\u7EDF\u5DF2\u81EA\u52A8\u63D0\u4EA4\u8BD5\u5377", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u4E0D\u80FD\u518D\u4FEE\u6539\u7B54\u9898"]
|
|
|
|
|
}),
|
|
|
|
|
onOk: function () {
|
|
|
|
|
var _onOk3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4() {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
|
|
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
|
|
|
var _onOk4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5() {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
|
|
|
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
window.parent.location.href = "/classrooms/".concat(searchParams.get("coursesId"), "/exercise/").concat(searchParams.get("exercisesId"), "/detail");
|
|
|
|
|
case 1:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context4.stop();
|
|
|
|
|
return _context5.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee4);
|
|
|
|
|
}, _callee5);
|
|
|
|
|
}));
|
|
|
|
|
function onOk() {
|
|
|
|
|
return _onOk3.apply(this, arguments);
|
|
|
|
|
return _onOk4.apply(this, arguments);
|
|
|
|
|
}
|
|
|
|
|
return onOk;
|
|
|
|
|
}()
|
|
|
|
|
@ -9755,9 +9776,9 @@ function TipContent() {
|
|
|
|
|
}
|
|
|
|
|
case 5:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context5.stop();
|
|
|
|
|
return _context6.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee5);
|
|
|
|
|
}, _callee6);
|
|
|
|
|
}))
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
@ -9862,19 +9883,19 @@ function VncTimer(_ref4) {
|
|
|
|
|
};
|
|
|
|
|
}, []);
|
|
|
|
|
var handleFocus = /*#__PURE__*/function () {
|
|
|
|
|
var _ref5 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7(e) {
|
|
|
|
|
var _ref5 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee8(e) {
|
|
|
|
|
var res, _res$data, _res$data2, remainingTime, currentTime;
|
|
|
|
|
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:
|
|
|
|
|
if (!(document.visibilityState === 'visible')) {
|
|
|
|
|
_context7.next = 5;
|
|
|
|
|
_context8.next = 5;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
_context7.next = 3;
|
|
|
|
|
_context8.next = 3;
|
|
|
|
|
return (0,service/* getRemainingTime */.fY)(myshixun === null || myshixun === void 0 ? void 0 : myshixun.identifier);
|
|
|
|
|
case 3:
|
|
|
|
|
res = _context7.sent;
|
|
|
|
|
res = _context8.sent;
|
|
|
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
|
|
|
remainingTime = (res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.remainingTime) > 0 ? res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.remainingTime : 0;
|
|
|
|
|
currentTime = remainingTime / 1000;
|
|
|
|
|
@ -9886,9 +9907,9 @@ function VncTimer(_ref4) {
|
|
|
|
|
}
|
|
|
|
|
case 5:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context7.stop();
|
|
|
|
|
return _context8.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee7);
|
|
|
|
|
}, _callee8);
|
|
|
|
|
}));
|
|
|
|
|
return function handleFocus(_x) {
|
|
|
|
|
return _ref5.apply(this, arguments);
|
|
|
|
|
@ -9917,24 +9938,24 @@ function VncTimer(_ref4) {
|
|
|
|
|
okText: '是',
|
|
|
|
|
cancelText: '否',
|
|
|
|
|
onOk: function () {
|
|
|
|
|
var _onOk4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee8() {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee8$(_context8) {
|
|
|
|
|
while (1) switch (_context8.prev = _context8.next) {
|
|
|
|
|
var _onOk5 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee9() {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee9$(_context9) {
|
|
|
|
|
while (1) switch (_context9.prev = _context9.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
localStorage.removeItem(sign);
|
|
|
|
|
_context8.next = 3;
|
|
|
|
|
_context9.next = 3;
|
|
|
|
|
return onAddVncTime();
|
|
|
|
|
case 3:
|
|
|
|
|
survivalOpen.current = false;
|
|
|
|
|
window.location.reload();
|
|
|
|
|
case 5:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context8.stop();
|
|
|
|
|
return _context9.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee8);
|
|
|
|
|
}, _callee9);
|
|
|
|
|
}));
|
|
|
|
|
function onOk() {
|
|
|
|
|
return _onOk4.apply(this, arguments);
|
|
|
|
|
return _onOk5.apply(this, arguments);
|
|
|
|
|
}
|
|
|
|
|
return onOk;
|
|
|
|
|
}(),
|
|
|
|
|
@ -9963,37 +9984,37 @@ function VncTimer(_ref4) {
|
|
|
|
|
return _onAddTime.apply(this, arguments);
|
|
|
|
|
}
|
|
|
|
|
function _onAddTime() {
|
|
|
|
|
_onAddTime = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee9() {
|
|
|
|
|
_onAddTime = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee10() {
|
|
|
|
|
var _res$data3, res, _res6;
|
|
|
|
|
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:
|
|
|
|
|
setBtnLoading(true);
|
|
|
|
|
if (!(time > 0)) {
|
|
|
|
|
_context9.next = 8;
|
|
|
|
|
_context10.next = 8;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
_context9.next = 4;
|
|
|
|
|
_context10.next = 4;
|
|
|
|
|
return onAddVncTime();
|
|
|
|
|
case 4:
|
|
|
|
|
res = _context9.sent;
|
|
|
|
|
res = _context10.sent;
|
|
|
|
|
setTime((res === null || res === void 0 || (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.remaining_time) / 1000);
|
|
|
|
|
_context9.next = 12;
|
|
|
|
|
_context10.next = 12;
|
|
|
|
|
break;
|
|
|
|
|
case 8:
|
|
|
|
|
_context9.next = 10;
|
|
|
|
|
_context10.next = 10;
|
|
|
|
|
return onResetAllVnc();
|
|
|
|
|
case 10:
|
|
|
|
|
_res6 = _context9.sent;
|
|
|
|
|
_res6 = _context10.sent;
|
|
|
|
|
toShixun();
|
|
|
|
|
case 12:
|
|
|
|
|
setBtnLoading(false);
|
|
|
|
|
setIsPlusTime(false);
|
|
|
|
|
case 14:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context9.stop();
|
|
|
|
|
return _context10.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee9);
|
|
|
|
|
}, _callee10);
|
|
|
|
|
}));
|
|
|
|
|
return _onAddTime.apply(this, arguments);
|
|
|
|
|
}
|