|
|
|
|
@ -116,6 +116,9 @@ var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js
|
|
|
|
|
var asyncToGenerator = __webpack_require__(41498);
|
|
|
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js
|
|
|
|
|
var slicedToArray = __webpack_require__(79800);
|
|
|
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectWithoutProperties.js
|
|
|
|
|
var objectWithoutProperties = __webpack_require__(39647);
|
|
|
|
|
var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
|
|
|
|
|
@ -129,9 +132,6 @@ var modal = __webpack_require__(43418);
|
|
|
|
|
var zh_CN = __webpack_require__(81863);
|
|
|
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
|
|
|
|
|
var _umi_production_exports = __webpack_require__(87167);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js
|
|
|
|
|
var slicedToArray = __webpack_require__(79800);
|
|
|
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules
|
|
|
|
|
var es_form = __webpack_require__(78241);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
|
|
|
|
|
@ -226,23 +226,51 @@ var LoginPopComponents = function LoginPopComponents(_ref) {
|
|
|
|
|
}];
|
|
|
|
|
var onFinish = /*#__PURE__*/function () {
|
|
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
|
|
var res, from;
|
|
|
|
|
var _res2;
|
|
|
|
|
var res, _res, _res3, from;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
_context.next = 2;
|
|
|
|
|
return form.validateFields();
|
|
|
|
|
case 2:
|
|
|
|
|
_context.next = 4;
|
|
|
|
|
if (!(accountInfo !== null && accountInfo !== void 0 && accountInfo.code)) {
|
|
|
|
|
_context.next = 8;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
_context.next = 5;
|
|
|
|
|
return (0,service_user/* LoginForPhone */.Gq)(objectSpread2_default()(objectSpread2_default()({}, accountInfo), {}, {
|
|
|
|
|
phone: accountInfo === null || accountInfo === void 0 ? void 0 : accountInfo.login
|
|
|
|
|
}, form.getFieldValue()));
|
|
|
|
|
case 5:
|
|
|
|
|
res = _context.sent;
|
|
|
|
|
_context.next = 17;
|
|
|
|
|
break;
|
|
|
|
|
case 8:
|
|
|
|
|
if (!(accountInfo !== null && accountInfo !== void 0 && accountInfo.user_token)) {
|
|
|
|
|
_context.next = 14;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
_context.next = 11;
|
|
|
|
|
return (0,service_user/* getUserInfo */.bG)(objectSpread2_default()(objectSpread2_default()({}, accountInfo), {}, {
|
|
|
|
|
websiteName: "exercise_unlock"
|
|
|
|
|
}, form.getFieldsValue()));
|
|
|
|
|
case 11:
|
|
|
|
|
res = _context.sent;
|
|
|
|
|
_context.next = 17;
|
|
|
|
|
break;
|
|
|
|
|
case 14:
|
|
|
|
|
_context.next = 16;
|
|
|
|
|
return (0,service_user/* LoginIn */.Es)(objectSpread2_default()(objectSpread2_default()({}, accountInfo), form.getFieldValue()));
|
|
|
|
|
case 4:
|
|
|
|
|
case 16:
|
|
|
|
|
res = _context.sent;
|
|
|
|
|
case 17:
|
|
|
|
|
if (!res.status) {
|
|
|
|
|
_context.next = 12;
|
|
|
|
|
_context.next = 24;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if (!(res.status === -4)) {
|
|
|
|
|
_context.next = 10;
|
|
|
|
|
_context.next = 22;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
dispatch({
|
|
|
|
|
@ -260,65 +288,65 @@ var LoginPopComponents = function LoginPopComponents(_ref) {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return _context.abrupt("return");
|
|
|
|
|
case 10:
|
|
|
|
|
setErrorValue(res === null || res === void 0 ? void 0 : res.message);
|
|
|
|
|
case 22:
|
|
|
|
|
setErrorValue((_res = res) === null || _res === void 0 ? void 0 : _res.message);
|
|
|
|
|
return _context.abrupt("return");
|
|
|
|
|
case 12:
|
|
|
|
|
case 24:
|
|
|
|
|
setOpenModal(false);
|
|
|
|
|
if (res !== null && res !== void 0 && res.show) {
|
|
|
|
|
if ((_res2 = res) !== null && _res2 !== void 0 && _res2.show) {
|
|
|
|
|
localStorage.setItem('extension-modal', 'exist');
|
|
|
|
|
localStorage.setItem('extension-date', res === null || res === void 0 ? void 0 : res.start_date);
|
|
|
|
|
localStorage.setItem('extension-date', (_res3 = res) === null || _res3 === void 0 ? void 0 : _res3.start_date);
|
|
|
|
|
} else {
|
|
|
|
|
localStorage.removeItem('extension-modal');
|
|
|
|
|
}
|
|
|
|
|
if (!(location.pathname === '/user/login' || location.pathname === '/login')) {
|
|
|
|
|
_context.next = 29;
|
|
|
|
|
_context.next = 41;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
from = searchParams.get("form") || searchParams.get("back_url");
|
|
|
|
|
if (!from) {
|
|
|
|
|
_context.next = 20;
|
|
|
|
|
_context.next = 32;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
window.location.href = decodeURIComponent(from);
|
|
|
|
|
_context.next = 27;
|
|
|
|
|
_context.next = 39;
|
|
|
|
|
break;
|
|
|
|
|
case 20:
|
|
|
|
|
if (password.test(accountInfo.password)) {
|
|
|
|
|
_context.next = 25;
|
|
|
|
|
case 32:
|
|
|
|
|
if (!(!password.test(accountInfo.password) && !(accountInfo !== null && accountInfo !== void 0 && accountInfo.code))) {
|
|
|
|
|
_context.next = 37;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
message/* default */.ZP.info('系统检测您的密码强度过低,请及时修改');
|
|
|
|
|
window.location.href = '/account/secure';
|
|
|
|
|
_context.next = 27;
|
|
|
|
|
_context.next = 39;
|
|
|
|
|
break;
|
|
|
|
|
case 25:
|
|
|
|
|
window.location.reload();
|
|
|
|
|
case 37:
|
|
|
|
|
window.location.href = "/";
|
|
|
|
|
return _context.abrupt("return");
|
|
|
|
|
case 27:
|
|
|
|
|
_context.next = 37;
|
|
|
|
|
case 39:
|
|
|
|
|
_context.next = 49;
|
|
|
|
|
break;
|
|
|
|
|
case 29:
|
|
|
|
|
if (password.test(accountInfo.password)) {
|
|
|
|
|
_context.next = 35;
|
|
|
|
|
case 41:
|
|
|
|
|
if (!(!password.test(accountInfo.password) && !(accountInfo !== null && accountInfo !== void 0 && accountInfo.code))) {
|
|
|
|
|
_context.next = 47;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
message/* default */.ZP.info('系统检测您的密码强度过低,请及时修改');
|
|
|
|
|
_umi_production_exports.history.replace('/account/secure?active=3');
|
|
|
|
|
window.location.href = '/account/secure?active=3';
|
|
|
|
|
dispatch({
|
|
|
|
|
type: 'user/showPopLogin',
|
|
|
|
|
payload: {
|
|
|
|
|
showPopLogin: false
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
_context.next = 37;
|
|
|
|
|
_context.next = 49;
|
|
|
|
|
break;
|
|
|
|
|
case 35:
|
|
|
|
|
case 47:
|
|
|
|
|
window.location.reload();
|
|
|
|
|
return _context.abrupt("return");
|
|
|
|
|
case 37:
|
|
|
|
|
case 49:
|
|
|
|
|
form.resetFields();
|
|
|
|
|
case 38:
|
|
|
|
|
case 50:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context.stop();
|
|
|
|
|
}
|
|
|
|
|
@ -2950,6 +2978,7 @@ var es = __webpack_require__(18353);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var _excluded = ["loading", "globalSetting", "user", "dispatch"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -2970,6 +2999,7 @@ var _excluded = ["loading", "globalSetting", "user", "dispatch"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dayjs_min_default().locale('zh-cn');
|
|
|
|
|
var SimpleLayouts = function SimpleLayouts(_ref) {
|
|
|
|
|
var loading = _ref.loading,
|
|
|
|
|
@ -2980,6 +3010,10 @@ var SimpleLayouts = function SimpleLayouts(_ref) {
|
|
|
|
|
var location = (0,_umi_production_exports.useLocation)();
|
|
|
|
|
var payload = (0,Header/* getCourseParam */.g)();
|
|
|
|
|
var globalLoading = globalSetting.globalLoading;
|
|
|
|
|
var _useState = (0,_react_17_0_2_react.useState)(false),
|
|
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
|
|
showUnlock = _useState2[0],
|
|
|
|
|
setShowUnlock = _useState2[1];
|
|
|
|
|
var getData = /*#__PURE__*/function () {
|
|
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
|
|
var _res;
|
|
|
|
|
@ -3029,7 +3063,15 @@ var SimpleLayouts = function SimpleLayouts(_ref) {
|
|
|
|
|
if ((_res = res) !== null && _res !== void 0 && _res.username && location.pathname === '/login') {
|
|
|
|
|
_umi_production_exports.history.push("/");
|
|
|
|
|
}
|
|
|
|
|
case 15:
|
|
|
|
|
if (res.status === -5) {
|
|
|
|
|
setShowUnlock({
|
|
|
|
|
data: [res.message],
|
|
|
|
|
accountInfo: {
|
|
|
|
|
user_token: res.message.user_token
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
case 16:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context.stop();
|
|
|
|
|
}
|
|
|
|
|
@ -3271,7 +3313,11 @@ var SimpleLayouts = function SimpleLayouts(_ref) {
|
|
|
|
|
autoInsertSpaceInButton: false,
|
|
|
|
|
componentSize: "middle",
|
|
|
|
|
theme: antd_theme,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(PopLogin, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(User_BindAccountPanel, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(components_PodModal, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(PopLogin, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(UnlockLogin, {
|
|
|
|
|
open: showUnlock ? true : false,
|
|
|
|
|
accountInfo: showUnlock === null || showUnlock === void 0 ? void 0 : showUnlock.accountInfo,
|
|
|
|
|
data: showUnlock === null || showUnlock === void 0 ? void 0 : showUnlock.data
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(User_BindAccountPanel, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(components_PodModal, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, {
|
|
|
|
|
size: 'middle',
|
|
|
|
|
spinning: globalLoading.show,
|
|
|
|
|
tip: globalLoading.text,
|