|
|
|
|
@ -74,7 +74,6 @@ var jsx_runtime = __webpack_require__(37712);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var inputStyle = {
|
|
|
|
|
height: 48,
|
|
|
|
|
borderRadius: 4
|
|
|
|
|
@ -258,31 +257,19 @@ var LoginPopComponents = function LoginPopComponents(_ref) {
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: "flex-container",
|
|
|
|
|
style: {
|
|
|
|
|
justifyContent: 'space-between'
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
|
|
name: "autologin",
|
|
|
|
|
noStyle: true,
|
|
|
|
|
valuePropName: "checked",
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
|
|
|
|
|
children: "\u4E0B\u6B21\u81EA\u52A8\u767B\u5F55"
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: "current font14 c-blue",
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
|
|
|
className: "c-grey-333 font14",
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
return handleClick();
|
|
|
|
|
},
|
|
|
|
|
to: "/user/reset-password?from=".concat(location.pathname),
|
|
|
|
|
children: "\u627E\u56DE\u5BC6\u7801"
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
|
|
@ -2678,95 +2665,101 @@ var SimpleLayouts = function SimpleLayouts(_ref) {
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
getData();
|
|
|
|
|
}, [location.pathname]);
|
|
|
|
|
// useEffect(() => {
|
|
|
|
|
|
|
|
|
|
// if (location.pathname.indexOf("classrooms") > -1 && location.pathname.indexOf("detail") === -1) {
|
|
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
// document.body.scrollIntoView()
|
|
|
|
|
// }
|
|
|
|
|
// // 教育部考试系统
|
|
|
|
|
// if (location.pathname.indexOf("/classrooms/4RW9CYHY") > -1 && document.domain !== "localhost" && document.domain !== "kepukehuan.educoder.net") {
|
|
|
|
|
// window.location.href = "https://kepukehuan.educoder.net/classrooms/4RW9CYHY/exercise"
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// if (location.pathname.indexOf("/classrooms/qb4ft587") > -1 && document.domain !== "localhost" && document.domain !== "kepukehuan.educoder.net") {
|
|
|
|
|
// window.location.href = "https://kepukehuan.educoder.net/classrooms/qb4ft587/exercise"
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// if (location.pathname.indexOf("/classrooms/c5q9bsp2") > -1 && document.domain !== "localhost" && document.domain !== "kepukehuan.educoder.net") {
|
|
|
|
|
// window.location.href = "https://kepukehuan.educoder.net/classrooms/c5q9bsp2/exercise"
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// dispatch({
|
|
|
|
|
// type: 'globalSetting/query',
|
|
|
|
|
// payload: {},
|
|
|
|
|
// })
|
|
|
|
|
// dispatch({ type: "globalSetting/setGlobalLoading", payload: { show: false, text: "" } })
|
|
|
|
|
// // dispatch({ type: "globalSetting/getSystemUpdate", payload: { show: false, text: "" } })
|
|
|
|
|
// // http://localhost:8000
|
|
|
|
|
// // https://jetcoder.educoder.net
|
|
|
|
|
// if (window.location.href === 'https://jetcoder.educoder.net' || window.location.href === 'https://jetcoder.educoder.net/') {
|
|
|
|
|
// window.location.href = 'https://www.educoder.net/problems'
|
|
|
|
|
// return
|
|
|
|
|
// }
|
|
|
|
|
// //在线刷题分享
|
|
|
|
|
// if (window.location.href?.includes('/problems') && window.location.href?.includes('/share')) {
|
|
|
|
|
// const ojId = window.location?.pathname?.split('/')?.[2];
|
|
|
|
|
// const p = Fetch(`/api/practices/${ojId}/start`, {
|
|
|
|
|
// method: 'get',
|
|
|
|
|
// })
|
|
|
|
|
// p.then((res: any) => {
|
|
|
|
|
// if (res?.status === 0) {
|
|
|
|
|
// history.replace(`/problems/${res?.identifier}/oj/${ojId}`)
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
// return
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if (location.pathname === '/admins' || location.pathname === '/sidekiq') {
|
|
|
|
|
// const domain = document.domain
|
|
|
|
|
// if (domain.indexOf("educoder.net") > -1) {
|
|
|
|
|
// switch (domain) {
|
|
|
|
|
// case "www.educoder.net":
|
|
|
|
|
// case "educoder.net":
|
|
|
|
|
// window.location.href = `https://data.educoder.net${location.pathname}`
|
|
|
|
|
// break;
|
|
|
|
|
// default:
|
|
|
|
|
// let str = document.domain.split(".")
|
|
|
|
|
// str[0] = str[0] + "-data";
|
|
|
|
|
// window.location.href = `https://${str.join(".")}${location.pathname}`
|
|
|
|
|
// break;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// Modal.destroyAll();
|
|
|
|
|
|
|
|
|
|
// if (isLocalApp()) {
|
|
|
|
|
// if (compareVersion("2.0.0") > 0) {
|
|
|
|
|
// Modal.info({
|
|
|
|
|
// title: "客户端版本过低",
|
|
|
|
|
// centered: true,
|
|
|
|
|
// content: <div>
|
|
|
|
|
// <span className="c-red">您的头歌考试系统柜客户端版本过低</span>,请升级至最新版本后再使用,点击"确定"后将下载最新版本的客户端,<span className="c-red">下载后请先退出客户端再安装</span>
|
|
|
|
|
// </div>,
|
|
|
|
|
// okText: "立即升级",
|
|
|
|
|
// visible: true,
|
|
|
|
|
// maskClosable: false,
|
|
|
|
|
// onOk: () => {
|
|
|
|
|
// downLoadFile("Educoder.exe", "https://www-cdn.educoder.net/app/Educoder.exe")
|
|
|
|
|
// return new Promise(() => {
|
|
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
// };
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// // setLocale('zh-CN', false);
|
|
|
|
|
// }, [location.pathname])
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
var _window$location$href, _window$location$href2;
|
|
|
|
|
if (location.pathname.indexOf("classrooms") > -1 && location.pathname.indexOf("detail") === -1) {} else {
|
|
|
|
|
document.body.scrollIntoView();
|
|
|
|
|
}
|
|
|
|
|
// 教育部考试系统
|
|
|
|
|
if (location.pathname.indexOf("/classrooms/4RW9CYHY") > -1 && document.domain !== "localhost" && document.domain !== "kepukehuan.educoder.net") {
|
|
|
|
|
window.location.href = "https://kepukehuan.educoder.net/classrooms/4RW9CYHY/exercise";
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (location.pathname.indexOf("/classrooms/qb4ft587") > -1 && document.domain !== "localhost" && document.domain !== "kepukehuan.educoder.net") {
|
|
|
|
|
window.location.href = "https://kepukehuan.educoder.net/classrooms/qb4ft587/exercise";
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (location.pathname.indexOf("/classrooms/c5q9bsp2") > -1 && document.domain !== "localhost" && document.domain !== "kepukehuan.educoder.net") {
|
|
|
|
|
window.location.href = "https://kepukehuan.educoder.net/classrooms/c5q9bsp2/exercise";
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
dispatch({
|
|
|
|
|
type: 'globalSetting/query',
|
|
|
|
|
payload: {}
|
|
|
|
|
});
|
|
|
|
|
dispatch({
|
|
|
|
|
type: "globalSetting/setGlobalLoading",
|
|
|
|
|
payload: {
|
|
|
|
|
show: false,
|
|
|
|
|
text: ""
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
// dispatch({ type: "globalSetting/getSystemUpdate", payload: { show: false, text: "" } })
|
|
|
|
|
// http://localhost:8000
|
|
|
|
|
// https://jetcoder.educoder.net
|
|
|
|
|
if (window.location.href === 'https://jetcoder.educoder.net' || window.location.href === 'https://jetcoder.educoder.net/') {
|
|
|
|
|
window.location.href = 'https://www.educoder.net/problems';
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
//在线刷题分享
|
|
|
|
|
if ((_window$location$href = window.location.href) !== null && _window$location$href !== void 0 && _window$location$href.includes('/problems') && (_window$location$href2 = window.location.href) !== null && _window$location$href2 !== void 0 && _window$location$href2.includes('/share')) {
|
|
|
|
|
var _window$location;
|
|
|
|
|
var ojId = (_window$location = window.location) === null || _window$location === void 0 || (_window$location = _window$location.pathname) === null || _window$location === void 0 || (_window$location = _window$location.split('/')) === null || _window$location === void 0 ? void 0 : _window$location[2];
|
|
|
|
|
var p = (0,fetch/* default */.ZP)("/api/practices/".concat(ojId, "/start"), {
|
|
|
|
|
method: 'get'
|
|
|
|
|
});
|
|
|
|
|
p.then(function (res) {
|
|
|
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
|
|
|
_umi_production_exports.history.replace("/problems/".concat(res === null || res === void 0 ? void 0 : res.identifier, "/oj/").concat(ojId));
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (location.pathname === '/admins' || location.pathname === '/sidekiq') {
|
|
|
|
|
var domain = document.domain;
|
|
|
|
|
if (domain.indexOf("educoder.net") > -1) {
|
|
|
|
|
switch (domain) {
|
|
|
|
|
case "www.educoder.net":
|
|
|
|
|
case "educoder.net":
|
|
|
|
|
window.location.href = "https://data.educoder.net".concat(location.pathname);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
var str = document.domain.split(".");
|
|
|
|
|
str[0] = str[0] + "-data";
|
|
|
|
|
window.location.href = "https://".concat(str.join(".")).concat(location.pathname);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
modal/* default */.Z.destroyAll();
|
|
|
|
|
if ((0,util/* isLocalApp */.WX)()) {
|
|
|
|
|
if ((0,util/* compareVersion */.yC)("2.0.0") > 0) {
|
|
|
|
|
modal/* default */.Z.info({
|
|
|
|
|
title: "客户端版本过低",
|
|
|
|
|
centered: true,
|
|
|
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: "c-red",
|
|
|
|
|
children: "\u60A8\u7684\u5934\u6B4C\u8003\u8BD5\u7CFB\u7EDF\u67DC\u5BA2\u6237\u7AEF\u7248\u672C\u8FC7\u4F4E"
|
|
|
|
|
}), "\uFF0C\u8BF7\u5347\u7EA7\u81F3\u6700\u65B0\u7248\u672C\u540E\u518D\u4F7F\u7528\uFF0C\u70B9\u51FB\"\u786E\u5B9A\"\u540E\u5C06\u4E0B\u8F7D\u6700\u65B0\u7248\u672C\u7684\u5BA2\u6237\u7AEF,", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: "c-red",
|
|
|
|
|
children: "\u4E0B\u8F7D\u540E\u8BF7\u5148\u9000\u51FA\u5BA2\u6237\u7AEF\u518D\u5B89\u88C5"
|
|
|
|
|
})]
|
|
|
|
|
}),
|
|
|
|
|
okText: "立即升级",
|
|
|
|
|
visible: true,
|
|
|
|
|
maskClosable: false,
|
|
|
|
|
onOk: function onOk() {
|
|
|
|
|
(0,util/* downLoadFile */.FH)("Educoder.exe", "https://www-cdn.educoder.net/app/Educoder.exe");
|
|
|
|
|
return new Promise(function () {});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// setLocale('zh-CN', false);
|
|
|
|
|
}, [location.pathname]);
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
if (globalSetting.updateData.system_update) {
|
|
|
|
|
// if(new Date().getTime() < new Date(globalSetting.updateData.end_time).getTime())
|
|
|
|
|
|