|
|
|
|
@ -1445,6 +1445,42 @@ var User = function User(_ref) {
|
|
|
|
|
})) === null || _find3 === void 0 ? void 0 : _find3.hidden;
|
|
|
|
|
var isPaperlibraryShow = ((_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.admin) || ((_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.business) || ((_user$userInfo3 = user.userInfo) === null || _user$userInfo3 === void 0 ? void 0 : _user$userInfo3.is_shixun_marker) || ((_user$userInfo4 = user.userInfo) === null || _user$userInfo4 === void 0 ? void 0 : _user$userInfo4.is_teacher) || ((_user$userInfo5 = user.userInfo) === null || _user$userInfo5 === void 0 ? void 0 : _user$userInfo5.user_identity) !== '学生';
|
|
|
|
|
var isCollegeManageShow = (_user$userInfo6 = user.userInfo) === null || _user$userInfo6 === void 0 ? void 0 : _user$userInfo6.is_school_manage;
|
|
|
|
|
var handleLoginOut = /*#__PURE__*/function () {
|
|
|
|
|
var _ref2 = 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:
|
|
|
|
|
(0,util/* clearAllCookies */.m5)();
|
|
|
|
|
_context.prev = 1;
|
|
|
|
|
_context.next = 4;
|
|
|
|
|
return (0,service_user/* LoginOut */.vR)({});
|
|
|
|
|
case 4:
|
|
|
|
|
res = _context.sent;
|
|
|
|
|
message/* default */.ZP.success(res === null || res === void 0 ? void 0 : res.message);
|
|
|
|
|
_context.next = 10;
|
|
|
|
|
break;
|
|
|
|
|
case 8:
|
|
|
|
|
_context.prev = 8;
|
|
|
|
|
_context.t0 = _context["catch"](1);
|
|
|
|
|
case 10:
|
|
|
|
|
localStorage.removeItem('isfirst');
|
|
|
|
|
localStorage.removeItem('SystemUpdateadvtime');
|
|
|
|
|
localStorage.removeItem('item');
|
|
|
|
|
localStorage.removeItem('iscreate');
|
|
|
|
|
// localStorage.removeItem('CCshow')
|
|
|
|
|
_umi_production_exports.history.replace('/');
|
|
|
|
|
window.location.reload();
|
|
|
|
|
case 16:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee, null, [[1, 8]]);
|
|
|
|
|
}));
|
|
|
|
|
return function handleLoginOut() {
|
|
|
|
|
return _ref2.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
var DropdownMenu = function DropdownMenu() {
|
|
|
|
|
if ((0,util/* checkIsClientExam */.Ll)()) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(menu/* default */.Z, {
|
|
|
|
|
@ -1558,37 +1594,7 @@ var User = function User(_ref) {
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(menu/* default */.Z.Item, {
|
|
|
|
|
className: Usermodules.exit,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
|
|
onClick: /*#__PURE__*/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:
|
|
|
|
|
(0,util/* clearAllCookies */.m5)();
|
|
|
|
|
_context.prev = 1;
|
|
|
|
|
_context.next = 4;
|
|
|
|
|
return (0,service_user/* LoginOut */.vR)({});
|
|
|
|
|
case 4:
|
|
|
|
|
res = _context.sent;
|
|
|
|
|
message/* default */.ZP.success(res === null || res === void 0 ? void 0 : res.message);
|
|
|
|
|
_context.next = 10;
|
|
|
|
|
break;
|
|
|
|
|
case 8:
|
|
|
|
|
_context.prev = 8;
|
|
|
|
|
_context.t0 = _context["catch"](1);
|
|
|
|
|
case 10:
|
|
|
|
|
localStorage.removeItem('isfirst');
|
|
|
|
|
localStorage.removeItem('SystemUpdateadvtime');
|
|
|
|
|
localStorage.removeItem('item');
|
|
|
|
|
localStorage.removeItem('iscreate');
|
|
|
|
|
// localStorage.removeItem('CCshow')
|
|
|
|
|
_umi_production_exports.history.replace('/');
|
|
|
|
|
window.location.reload();
|
|
|
|
|
case 16:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee, null, [[1, 8]]);
|
|
|
|
|
})),
|
|
|
|
|
onClick: handleLoginOut,
|
|
|
|
|
children: "\u9000\u51FA"
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
@ -1597,38 +1603,52 @@ var User = function User(_ref) {
|
|
|
|
|
};
|
|
|
|
|
if ((0,authority/* isLogin */.bg)()) {
|
|
|
|
|
var _user$userInfo19, _user$userInfo21;
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(dropdown/* default */.Z, {
|
|
|
|
|
className: "".concat(Usermodules.height67),
|
|
|
|
|
dropdownRender: DropdownMenu,
|
|
|
|
|
placement: "bottomRight",
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("section", {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: shixunHomeworks.actionTabs.type === 1 ? Usermodules.classromediv : '',
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
|
|
|
className: "".concat(Usermodules.userPic, " current ml15"),
|
|
|
|
|
src: "".concat(env/* default */.Z === null || env/* default */.Z === void 0 ? void 0 : env/* default */.Z.IMG_SERVER, "/images/").concat((_user$userInfo19 = user.userInfo) === null || _user$userInfo19 === void 0 ? void 0 : _user$userInfo19.image_url),
|
|
|
|
|
alt: "",
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
var _user$userInfo20;
|
|
|
|
|
return _umi_production_exports.history.push((0,util/* checkIsClientExam */.Ll)() ? '/account/profile' : "/users/".concat((_user$userInfo20 = user.userInfo) === null || _user$userInfo20 === void 0 ? void 0 : _user$userInfo20.login, "/classrooms"));
|
|
|
|
|
}
|
|
|
|
|
}), (0,util/* checkIsClientExam */.Ll)() && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: "ml10 font16",
|
|
|
|
|
children: (_user$userInfo21 = user.userInfo) === null || _user$userInfo21 === void 0 ? void 0 : _user$userInfo21.username
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "iconfont icon-zhankai4 ".concat(Usermodules.icon)
|
|
|
|
|
})]
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
align: "middle",
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(dropdown/* default */.Z
|
|
|
|
|
// className={`${styles.height67}`}
|
|
|
|
|
, {
|
|
|
|
|
dropdownRender: DropdownMenu,
|
|
|
|
|
placement: "bottomRight",
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("section", {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: shixunHomeworks.actionTabs.type === 1 ? Usermodules.classromediv : '',
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
|
|
|
className: "".concat(Usermodules.userPic, " current ml15"),
|
|
|
|
|
alt: "",
|
|
|
|
|
src: "".concat(env/* default */.Z === null || env/* default */.Z === void 0 ? void 0 : env/* default */.Z.IMG_SERVER, "/images/").concat((_user$userInfo19 = user.userInfo) === null || _user$userInfo19 === void 0 ? void 0 : _user$userInfo19.image_url),
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
var _user$userInfo20;
|
|
|
|
|
return _umi_production_exports.history.push((0,util/* checkIsClientExam */.Ll)() ? '/account/profile' : "/users/".concat((_user$userInfo20 = user.userInfo) === null || _user$userInfo20 === void 0 ? void 0 : _user$userInfo20.login, "/classrooms"));
|
|
|
|
|
}
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: "ml10",
|
|
|
|
|
children: (_user$userInfo21 = user.userInfo) === null || _user$userInfo21 === void 0 ? void 0 : _user$userInfo21.username
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
|
|
className: "ml30",
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
|
|
onClick: handleLoginOut,
|
|
|
|
|
style: {
|
|
|
|
|
color: "#4CACFF"
|
|
|
|
|
},
|
|
|
|
|
children: "\u9000\u51FA"
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
var _globalSetting$settin4;
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: "font15 ".concat(globalSetting.isIlearning ? Usermodules.login : ""),
|
|
|
|
|
className: "".concat(globalSetting.isIlearning ? Usermodules.login : ""),
|
|
|
|
|
style: {
|
|
|
|
|
color: "#4CACFF"
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: "ml10 mr5 current c-white",
|
|
|
|
|
className: "ml10 mr5 current ",
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
dispatch({
|
|
|
|
|
type: 'user/showPopLogin',
|
|
|
|
|
@ -1645,7 +1665,10 @@ var User = function User(_ref) {
|
|
|
|
|
children: "|"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
|
|
|
to: "/user/register",
|
|
|
|
|
className: "ml5 current c-white pr25",
|
|
|
|
|
className: "ml5 current pr25",
|
|
|
|
|
style: {
|
|
|
|
|
color: "#4CACFF"
|
|
|
|
|
},
|
|
|
|
|
children: "\u6CE8\u518C"
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
|