Auto Submit

dev_local_v9_test2
autosubmit 2 years ago
parent ccc7b814b5
commit cdf860ec9a

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

@ -5408,62 +5408,58 @@ var competitionDetails = function competitionDetails(_ref) {
var see = (0,_react_17_0_2_react.useRef)(null);
var reportElement = (0,_react_17_0_2_react.useRef)();
(0,_react_17_0_2_react.useEffect)(function () {
function init() {
return _init.apply(this, arguments);
}
function _init() {
_init = 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.t0 = setStaffDetail;
_context.next = 3;
return dispatch({
type: 'competitions/getStaff',
payload: {
identifier: identifier
}
});
case 3:
_context.t1 = _context.sent;
(0, _context.t0)(_context.t1);
_context.next = 7;
return dispatch({
type: 'competitions/getHeader',
payload: {
identifier: identifier
}
});
case 7:
res = _context.sent;
setHeaderDetail(res);
document.title = (res === null || res === void 0 ? void 0 : res.name) || '竞赛';
case 10:
case "end":
return _context.stop();
}
}, _callee);
}));
return _init.apply(this, arguments);
}
if (identifier) {
init();
//调用默认加载第一条数据
}
document.title = '竞赛';
}, [identifier]);
(0,_react_17_0_2_react.useEffect)(function () {
var _loction$query;
// console.log('--------',parseInt(loction?.query?.type)===1);
setisshowType(parseInt(loction === null || loction === void 0 || (_loction$query = loction.query) === null || _loction$query === void 0 ? void 0 : _loction$query.type) === 1);
}, [loction]);
function init() {
return _init.apply(this, arguments);
}
function _init() {
_init = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7() {
var res;
return regeneratorRuntime_default()().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
_context7.t0 = setStaffDetail;
_context7.next = 3;
return dispatch({
type: 'competitions/getStaff',
payload: {
identifier: identifier
}
});
case 3:
_context7.t1 = _context7.sent;
(0, _context7.t0)(_context7.t1);
_context7.next = 7;
return dispatch({
type: 'competitions/getHeader',
payload: {
identifier: identifier
}
});
case 7:
res = _context7.sent;
setHeaderDetail(res);
document.title = res === null || res === void 0 ? void 0 : res.name;
case 10:
case "end":
return _context7.stop();
}
}, _callee7);
}));
return _init.apply(this, arguments);
}
var handleDownLoad = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var opt, doc, url;
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
document.body.scrollIntoView();
opt = {
@ -5487,20 +5483,20 @@ var competitionDetails = function competitionDetails(_ref) {
}
};
doc = html2pdf_default()().set(opt).from(reportElement.current).toPdf();
_context2.next = 5;
_context.next = 5;
return doc.get('pdf');
case 5:
doc = _context2.sent;
_context2.next = 8;
doc = _context.sent;
_context.next = 8;
return doc.output('bloburl');
case 8:
url = _context2.sent;
url = _context.sent;
(0,util/* downLoadLink */.Nd)("".concat(user.userInfo.real_name, "\u51C6\u8003\u8BC1.pdf"), url);
case 10:
case "end":
return _context2.stop();
return _context.stop();
}
}, _callee2);
}, _callee);
}));
return function handleDownLoad() {
return _ref2.apply(this, arguments);
@ -5966,20 +5962,20 @@ var competitionDetails = function competitionDetails(_ref) {
type: "primary",
disabled: dayjs_min_default()() > dayjs_min_default()(HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.enroll_end_time),
className: Detailmodules.buttonsize,
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
var _HeaderDetail$permiss;
var res;
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
if ((0,verifyLogin/* handleVerifyLogin */.o1)(dispatch)) {
_context3.next = 2;
_context2.next = 2;
break;
}
return _context3.abrupt("return");
return _context2.abrupt("return");
case 2:
if (!(!(HeaderDetail !== null && HeaderDetail !== void 0 && (_HeaderDetail$permiss = HeaderDetail.permission) !== null && _HeaderDetail$permiss !== void 0 && _HeaderDetail$permiss.authentication) && HeaderDetail !== null && HeaderDetail !== void 0 && HeaderDetail.is_authentication)) {
_context3.next = 5;
_context2.next = 5;
break;
}
es_modal/* default */.Z.confirm({
@ -5990,15 +5986,15 @@ var competitionDetails = function competitionDetails(_ref) {
_umi_production_exports.history.push("/account/certification");
}
});
return _context3.abrupt("return");
return _context2.abrupt("return");
case 5:
setBtnLoading(true);
_context3.next = 8;
_context2.next = 8;
return (0,fetch/* default */.ZP)("/api/competitions/".concat(identifier, "/check_major.json"), {
method: 'get'
});
case 8:
res = _context3.sent;
res = _context2.sent;
setBtnLoading(false);
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
setisshow(true);
@ -6016,9 +6012,9 @@ var competitionDetails = function competitionDetails(_ref) {
}
case 12:
case "end":
return _context3.stop();
return _context2.stop();
}
}, _callee3);
}, _callee2);
})),
children: [" ", dayjs_min_default()() > dayjs_min_default()(HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.enroll_end_time) ? '预约已截止' : '预约考试']
}), (HeaderDetail === null || HeaderDetail === void 0 ? void 0 : HeaderDetail.button_status) === 2 && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
@ -6062,25 +6058,26 @@ var competitionDetails = function competitionDetails(_ref) {
okText: '确认',
cancelText: '取消',
onOk: function () {
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4() {
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
var res;
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context4.next = 2;
_context3.next = 2;
return (0,fetch/* default */.ZP)("/api/competitions/".concat(identifier, "/exit_appointment.json"), {
method: 'get'
});
case 2:
res = _context4.sent;
res = _context3.sent;
if (res.status === 0) {
message/* default */.ZP.info('退考成功');
init();
}
case 4:
case "end":
return _context4.stop();
return _context3.stop();
}
}, _callee4);
}, _callee3);
}));
function onOk() {
return _onOk.apply(this, arguments);
@ -6223,16 +6220,16 @@ var competitionDetails = function competitionDetails(_ref) {
visible: isshow,
title: "\u573A\u6B21\u5217\u8868",
width: 950,
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7() {
return regeneratorRuntime_default()().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6() {
return regeneratorRuntime_default()().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
if (!((isredio === null || isredio === void 0 ? void 0 : isredio.length) <= 0)) {
_context7.next = 3;
_context6.next = 3;
break;
}
message/* default */.ZP.info('请选择要报考的场次');
return _context7.abrupt("return");
return _context6.abrupt("return");
case 3:
es_modal/* default */.Z.confirm({
title: '预约考试',
@ -6240,12 +6237,12 @@ var competitionDetails = function competitionDetails(_ref) {
okText: '确认',
cancelText: '取消',
onOk: function () {
var _onOk2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6() {
var _onOk2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5() {
var res, _items$, _items$2, _items$3, _items$4, resHeader;
return regeneratorRuntime_default()().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
_context6.next = 2;
_context5.next = 2;
return (0,fetch/* default */.ZP)("/api/competitions/".concat(identifier, "/appointment.json"), {
method: "post",
body: {
@ -6253,7 +6250,7 @@ var competitionDetails = function competitionDetails(_ref) {
}
});
case 2:
res = _context6.sent;
res = _context5.sent;
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
// const resHeader = await dispatch({
// type: 'competitions/getHeader',
@ -6281,12 +6278,12 @@ var competitionDetails = function competitionDetails(_ref) {
}),
okText: '确认',
onOk: function () {
var _onOk3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5() {
var _onOk3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4() {
var resHeader;
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context5.next = 2;
_context4.next = 2;
return dispatch({
type: 'competitions/getHeader',
payload: {
@ -6294,7 +6291,7 @@ var competitionDetails = function competitionDetails(_ref) {
}
});
case 2:
resHeader = _context5.sent;
resHeader = _context4.sent;
setHeaderDetail(resHeader);
setisshow(false);
setisredio([]);
@ -6302,9 +6299,9 @@ var competitionDetails = function competitionDetails(_ref) {
message/* default */.ZP.info('预约成功,请等待老师审核');
case 8:
case "end":
return _context5.stop();
return _context4.stop();
}
}, _callee5);
}, _callee4);
}));
function onOk() {
return _onOk3.apply(this, arguments);
@ -6314,10 +6311,10 @@ var competitionDetails = function competitionDetails(_ref) {
});
}
if (!((res === null || res === void 0 ? void 0 : res.status) === -2)) {
_context6.next = 9;
_context5.next = 9;
break;
}
_context6.next = 7;
_context5.next = 7;
return dispatch({
type: 'competitions/getHeader',
payload: {
@ -6325,13 +6322,13 @@ var competitionDetails = function competitionDetails(_ref) {
}
});
case 7:
resHeader = _context6.sent;
resHeader = _context5.sent;
setHeaderDetail(resHeader);
case 9:
case "end":
return _context6.stop();
return _context5.stop();
}
}, _callee6);
}, _callee5);
}));
function onOk() {
return _onOk2.apply(this, arguments);
@ -6341,9 +6338,9 @@ var competitionDetails = function competitionDetails(_ref) {
});
case 4:
case "end":
return _context7.stop();
return _context6.stop();
}
}, _callee7);
}, _callee6);
})),
onCancel: function onCancel() {
setisshow(false);

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