Auto Submit

dev_local_v9_bw
autosubmit 2 years ago
parent 1b74709616
commit 531f46e477

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

@ -9103,7 +9103,8 @@ function TipContent() {
var name = shixun.name,
identifier = shixun.identifier,
task_pass = shixun.task_pass,
test_set_permission = shixun.test_set_permission;
test_set_permission = shixun.test_set_permission,
survival_time = shixun.survival_time;
var cost_time = game.cost_time,
status = game.status;
var user_url = user.user_url,
@ -9558,7 +9559,9 @@ function TipContent() {
onResetAllVnc: onResetAllVnc,
toShixun: toShixun,
myshixun: myshixun,
title: "\u5B9E\u9A8C\u73AF\u5883\u5012\u8BA1\u65F6"
title: "\u5B9E\u9A8C\u73AF\u5883\u5012\u8BA1\u65F6",
user: user,
survival_time: survival_time
});
}, [vncTime]);
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
@ -9834,7 +9837,10 @@ function VncTimer(_ref4) {
_ref4$title = _ref4.title,
title = _ref4$title === void 0 ? '' : _ref4$title,
myshixun = _ref4.myshixun,
defaultTime = _ref4.defaultTime;
defaultTime = _ref4.defaultTime,
user = _ref4.user,
survival_time = _ref4.survival_time;
var params = (0,_umi_production_exports.useParams)();
var _useState17 = (0,_react_17_0_2_react.useState)(defaultTime),
_useState18 = slicedToArray_default()(_useState17, 2),
time = _useState18[0],
@ -9848,6 +9854,7 @@ function VncTimer(_ref4) {
isPlusTime = _useState22[0],
setIsPlusTime = _useState22[1];
var isFirstOpen = (0,_react_17_0_2_react.useRef)(true);
var survivalOpen = (0,_react_17_0_2_react.useRef)(false);
(0,_react_17_0_2_react.useEffect)(function () {
window.addEventListener("visibilitychange", handleFocus);
return function () {
@ -9892,13 +9899,54 @@ function VncTimer(_ref4) {
}, time > 0 ? 1000 : null);
(0,_react_17_0_2_react.useEffect)(function () {
if (time === 300 || time === 180 || time === 60 || time === 0) {
setIsPlusTime(true);
if (!survivalOpen.current) {
setIsPlusTime(true);
}
}
}, [time]);
(0,_react_17_0_2_react.useEffect)(function () {
if (isFirstOpen.current) {
if (defaultTime < FiveMinute) {
setIsPlusTime(true);
var sign = "".concat(user === null || user === void 0 ? void 0 : user.login, "_").concat(params.taskId, "_survival_time");
if (localStorage.getItem(sign) !== String(survival_time)) {
survivalOpen.current = true;
es_modal/* default */.Z.confirm({
title: '提示',
icon: null,
content: '老师调整了时间是否同步',
centered: true,
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) {
case 0:
localStorage.removeItem(sign);
_context8.next = 3;
return onAddVncTime();
case 3:
survivalOpen.current = false;
window.location.reload();
case 5:
case "end":
return _context8.stop();
}
}, _callee8);
}));
function onOk() {
return _onOk4.apply(this, arguments);
}
return onOk;
}(),
onCancel: function onCancel() {
survivalOpen.current = false;
localStorage.removeItem(sign);
}
});
} else {
if (defaultTime < FiveMinute) {
setIsPlusTime(true);
}
}
isFirstOpen.current = false;
setTime(defaultTime);
@ -9915,37 +9963,37 @@ function VncTimer(_ref4) {
return _onAddTime.apply(this, arguments);
}
function _onAddTime() {
_onAddTime = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee8() {
_onAddTime = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee9() {
var _res$data3, res, _res6;
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:
setBtnLoading(true);
if (!(time > 0)) {
_context8.next = 8;
_context9.next = 8;
break;
}
_context8.next = 4;
_context9.next = 4;
return onAddVncTime();
case 4:
res = _context8.sent;
res = _context9.sent;
setTime((res === null || res === void 0 || (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.remaining_time) / 1000);
_context8.next = 12;
_context9.next = 12;
break;
case 8:
_context8.next = 10;
_context9.next = 10;
return onResetAllVnc();
case 10:
_res6 = _context8.sent;
_res6 = _context9.sent;
toShixun();
case 12:
setBtnLoading(false);
setIsPlusTime(false);
case 14:
case "end":
return _context8.stop();
return _context9.stop();
}
}, _callee8);
}, _callee9);
}));
return _onAddTime.apply(this, arguments);
}
@ -15851,7 +15899,7 @@ function tasks_reducer(state, action) {
}
function _init() {
_init = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6() {
var response, status, _st, hide_width_rate, path, realMoveX, payload, _paths;
var response, status, _response$user, _st, hide_width_rate, path, realMoveX, payload, _paths, sign, _response$shixun;
return regeneratorRuntime_default()().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
@ -15876,7 +15924,7 @@ function tasks_reducer(state, action) {
window.location.href = '/';
}
});
_context6.next = 28;
_context6.next = 30;
break;
case 13:
if (!(status === 403)) {
@ -15884,7 +15932,7 @@ function tasks_reducer(state, action) {
break;
}
history.replace('/403');
_context6.next = 28;
_context6.next = 30;
break;
case 17:
if (!(status === 404)) {
@ -15918,21 +15966,25 @@ function tasks_reducer(state, action) {
type: constant/* FETCH_TASK_SUCCESS */.yi,
payload: objectSpread2_default()({}, payload)
});
case 28:
_context6.next = 34;
break;
sign = "".concat(response === null || response === void 0 || (_response$user = response.user) === null || _response$user === void 0 ? void 0 : _response$user.login, "_").concat(_params.taskId, "_survival_time");
if (!localStorage.getItem(sign)) {
localStorage.setItem(sign, response === null || response === void 0 || (_response$shixun = response.shixun) === null || _response$shixun === void 0 ? void 0 : _response$shixun.survival_time);
}
case 30:
_context6.prev = 30;
_context6.next = 36;
break;
case 32:
_context6.prev = 32;
_context6.t0 = _context6["catch"](0);
console.log(_context6.t0);
dispatch({
type: constant/* FETCH_TASK_FAILURE */.Ir
});
case 34:
case 36:
case "end":
return _context6.stop();
}
}, _callee6, null, [[0, 30]]);
}, _callee6, null, [[0, 32]]);
}));
return _init.apply(this, arguments);
}

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