|
|
|
|
@ -2324,23 +2324,25 @@ var PopLogin_LoginPopComponents = function LoginPopComponents(_ref) {
|
|
|
|
|
ishidden = _useState2[0],
|
|
|
|
|
setIsHidden = _useState2[1];
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
var _globalSetting$settin3;
|
|
|
|
|
console.log(globalSetting.setting);
|
|
|
|
|
console.log(user.showPopLogin);
|
|
|
|
|
if ((_globalSetting$settin3 = globalSetting.setting) !== null && _globalSetting$settin3 !== void 0 && _globalSetting$settin3.hide_account_login) {
|
|
|
|
|
if (globalSetting.setting) {
|
|
|
|
|
var _globalSetting$settin3;
|
|
|
|
|
// window.location.href = globalSetting?.setting?.sso_login_url
|
|
|
|
|
if (user.showPopLogin) {
|
|
|
|
|
var _globalSetting$settin4;
|
|
|
|
|
_umi_production_exports.history.push(globalSetting === null || globalSetting === void 0 || (_globalSetting$settin4 = globalSetting.setting) === null || _globalSetting$settin4 === void 0 ? void 0 : _globalSetting$settin4.sso_login_url);
|
|
|
|
|
dispatch({
|
|
|
|
|
type: 'user/showPopLogin',
|
|
|
|
|
payload: {
|
|
|
|
|
showPopLogin: false
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
if ((_globalSetting$settin3 = globalSetting.setting) !== null && _globalSetting$settin3 !== void 0 && _globalSetting$settin3.hide_account_login) {
|
|
|
|
|
if (user.showPopLogin) {
|
|
|
|
|
var _globalSetting$settin4;
|
|
|
|
|
_umi_production_exports.history.push(globalSetting === null || globalSetting === void 0 || (_globalSetting$settin4 = globalSetting.setting) === null || _globalSetting$settin4 === void 0 ? void 0 : _globalSetting$settin4.sso_login_url);
|
|
|
|
|
dispatch({
|
|
|
|
|
type: 'user/showPopLogin',
|
|
|
|
|
payload: {
|
|
|
|
|
showPopLogin: false
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
setIsHidden(false);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
setIsHidden(false);
|
|
|
|
|
}
|
|
|
|
|
}, [globalSetting === null || globalSetting === void 0 ? void 0 : globalSetting.setting, user.showPopLogin]);
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
|
|
|
|
@ -3083,6 +3085,9 @@ var SimpleLayouts = function SimpleLayouts(_ref) {
|
|
|
|
|
dispatch = _ref.dispatch,
|
|
|
|
|
props = objectWithoutProperties_default()(_ref, _excluded);
|
|
|
|
|
var location = (0,_umi_production_exports.useLocation)();
|
|
|
|
|
var _useSearchParams = (0,_umi_production_exports.useSearchParams)(),
|
|
|
|
|
_useSearchParams2 = slicedToArray_default()(_useSearchParams, 1),
|
|
|
|
|
searchParams = _useSearchParams2[0];
|
|
|
|
|
var payload = (0,Header/* getCourseParam */.g)();
|
|
|
|
|
var globalLoading = globalSetting.globalLoading;
|
|
|
|
|
var _useState = (0,_react_17_0_2_react.useState)(false),
|
|
|
|
|
@ -3239,9 +3244,13 @@ var SimpleLayouts = function SimpleLayouts(_ref) {
|
|
|
|
|
window.location.href = "https://kepukehuan.educoder.net/classrooms/c5q9bsp2/exercise";
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
console.log(location.pathname);
|
|
|
|
|
console.log(searchParams.get('admin_login'));
|
|
|
|
|
dispatch({
|
|
|
|
|
type: 'globalSetting/query',
|
|
|
|
|
payload: {}
|
|
|
|
|
payload: {
|
|
|
|
|
admin_login: searchParams.get('admin_login') ? searchParams.get('admin_login') : null
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
dispatch({
|
|
|
|
|
type: "globalSetting/setGlobalLoading",
|