Auto Submit

dev_local_v9_test3
autosubmit 2 years ago
parent a16f0bea8b
commit 1bcfba584c

@ -2678,101 +2678,95 @@ var SimpleLayouts = function SimpleLayouts(_ref) {
(0,_react_17_0_2_react.useEffect)(function () {
getData();
}, [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 () {});
}
});
}
;
}
// 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])
// 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())

@ -50655,7 +50655,6 @@ function del(url, params) {
/* harmony export */ Uw: function() { return /* binding */ CommonWorkStatus; },
/* harmony export */ VV: function() { return /* binding */ StatusClassroomsTags; },
/* harmony export */ W: function() { return /* binding */ isUnOrNull; },
/* harmony export */ WX: function() { return /* binding */ isLocalApp; },
/* harmony export */ Y: function() { return /* binding */ HomeWorkCommonDetailStatus; },
/* harmony export */ YA: function() { return /* binding */ getHiddenName; },
/* harmony export */ ZJ: function() { return /* binding */ toDataUrl; },
@ -50696,10 +50695,9 @@ function del(url, params) {
/* harmony export */ vA: function() { return /* binding */ HomeWorkShixunDetailStatus; },
/* harmony export */ vB: function() { return /* binding */ exerciseTips; },
/* harmony export */ xg: function() { return /* binding */ openNewWindow; },
/* harmony export */ y3: function() { return /* binding */ getBase64; },
/* harmony export */ yC: function() { return /* binding */ compareVersion; }
/* harmony export */ y3: function() { return /* binding */ getBase64; }
/* harmony export */ });
/* unused harmony exports parseParams, StatusTags, WorkStatus, timego, timeformat, delCookie, saveAs, isFirefox, isChromeOrFirefox, formatMoney, openNewWindows, formatTextMiddleIntercept, isEmpty, middleEllipsis, getUrlToken, checkDisabledExam, messageInfo, base64ToBlob, trackEventCustom */
/* unused harmony exports parseParams, StatusTags, WorkStatus, timego, timeformat, delCookie, saveAs, isFirefox, isChromeOrFirefox, formatMoney, openNewWindows, formatTextMiddleIntercept, isEmpty, middleEllipsis, getUrlToken, checkDisabledExam, messageInfo, base64ToBlob, trackEventCustom, compareVersion, isLocalApp */
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/toConsumableArray.js */ 93923);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js */ 10574);

Loading…
Cancel
Save