|
|
|
|
@ -97,7 +97,7 @@ var showSearchMapping = [{
|
|
|
|
|
placeholder: '搜索视频'
|
|
|
|
|
}];
|
|
|
|
|
var Banner = function Banner(_ref) {
|
|
|
|
|
var _user$userInfo, _userDetail$homepageI, _userDetail$homepageI2, _userDetail$homepageI3, _userDetail$homepageI4, _userDetail$homepageI5, _userDetail$homepageI6, _userDetail$homepageI7, _user$userInfo2;
|
|
|
|
|
var _user$userInfo, _userDetail$homepageI, _userDetail$homepageI2, _userDetail$homepageI3, _userDetail$homepageI4, _userDetail$homepageI5, _userDetail$homepageI6, _userDetail$homepageI7, _userDetail$homepageI8, _userDetail$homepageI9, _userDetail$homepageI10, _find, _globalSetting$settin, _find2, _globalSetting$settin2, _find3, _globalSetting$settin3, _user$userInfo2, _globalSetting$settin4, _user$userInfo3, _user$userInfo4, _globalSetting$settin5, _user$userInfo5, _user$userInfo6, _user$userInfo7, _user$userInfo8, _user$userInfo9, _user$userInfo10, _user$userInfo11, _user$userInfo12, _user$userInfo13, _user$userInfo14, _userDetail$homepageI11, _userDetail$homepageI12;
|
|
|
|
|
var userDetail = _ref.userDetail,
|
|
|
|
|
user = _ref.user,
|
|
|
|
|
globalSetting = _ref.globalSetting,
|
|
|
|
|
@ -213,9 +213,82 @@ var Banner = function Banner(_ref) {
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: Menusmodules.number,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", {
|
|
|
|
|
children: (_userDetail$homepageI8 = userDetail.homepageInfo) === null || _userDetail$homepageI8 === void 0 ? void 0 : _userDetail$homepageI8.experience
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
|
|
children: [isCurrent ? '我' : 'TA', "\u7684\u7ECF\u9A8C\u503C"]
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", {
|
|
|
|
|
children: dealWith(((_userDetail$homepageI9 = userDetail.homepageInfo) === null || _userDetail$homepageI9 === void 0 ? void 0 : _userDetail$homepageI9.grade) || 0)
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
|
|
children: [isCurrent ? '我' : 'TA', "\u7684\u91D1\u5E01"]
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
}), isCurrent && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: Menusmodules.attendance,
|
|
|
|
|
children: (_userDetail$homepageI10 = userDetail.homepageInfo) !== null && _userDetail$homepageI10 !== void 0 && _userDetail$homepageI10.attendance_signed ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: Menusmodules.btn,
|
|
|
|
|
children: "\u5DF2\u7B7E\u5230"
|
|
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
cursor: 'pointer'
|
|
|
|
|
},
|
|
|
|
|
onClick: handleSigned,
|
|
|
|
|
className: Menusmodules.btn,
|
|
|
|
|
children: "\u7ACB\u5373\u7B7E\u5230"
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: Menusmodules.nav,
|
|
|
|
|
children: ((_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.login) === (params === null || params === void 0 ? void 0 : params.username) && /*#__PURE__*/(0,jsx_runtime.jsxs)(_umi_production_exports.Link, {
|
|
|
|
|
children: [!((_find = (((_globalSetting$settin = globalSetting.setting) === null || _globalSetting$settin === void 0 ? void 0 : _globalSetting$settin.navbar) || []).find(function (item) {
|
|
|
|
|
return item.link === "/".concat(NavType.Classrooms);
|
|
|
|
|
})) !== null && _find !== void 0 && _find.hidden) && /*#__PURE__*/(0,jsx_runtime.jsxs)(_umi_production_exports.Link, {
|
|
|
|
|
className: activeKey === NavType.Classrooms ? Menusmodules.active : '',
|
|
|
|
|
to: "/users/".concat(username.current, "/classrooms"),
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
return setActiveKey(NavType.Classrooms);
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "iconfont icon-jiaoxueketang1 "
|
|
|
|
|
}), "\u6559\u5B66\u8BFE\u5802"]
|
|
|
|
|
}), !((_find2 = (((_globalSetting$settin2 = globalSetting.setting) === null || _globalSetting$settin2 === void 0 ? void 0 : _globalSetting$settin2.navbar) || []).find(function (item) {
|
|
|
|
|
return item.link === "/".concat(NavType.Shixuns);
|
|
|
|
|
})) !== null && _find2 !== void 0 && _find2.hidden) && /*#__PURE__*/(0,jsx_runtime.jsxs)(_umi_production_exports.Link, {
|
|
|
|
|
className: activeKey === NavType.Shixuns ? Menusmodules.active : '',
|
|
|
|
|
to: "/users/".concat(username.current, "/shixuns"),
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
return setActiveKey(NavType.Shixuns);
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "iconfont icon-shijianxiangmu "
|
|
|
|
|
}), "\u5B9E\u8DF5\u9879\u76EE"]
|
|
|
|
|
}), !((_find3 = (((_globalSetting$settin3 = globalSetting.setting) === null || _globalSetting$settin3 === void 0 ? void 0 : _globalSetting$settin3.navbar) || []).find(function (item) {
|
|
|
|
|
return item.link === "/".concat(NavType.Paths);
|
|
|
|
|
})) !== null && _find3 !== void 0 && _find3.hidden) && /*#__PURE__*/(0,jsx_runtime.jsxs)(_umi_production_exports.Link, {
|
|
|
|
|
className: activeKey === NavType.Paths ? Menusmodules.active : '',
|
|
|
|
|
to: "/users/".concat(username.current, "/paths"),
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
return setActiveKey(NavType.Paths);
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "iconfont icon-shijiankecheng "
|
|
|
|
|
}), "\u5B9E\u8DF5\u8BFE\u7A0B"]
|
|
|
|
|
}), ((_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.main_site) && !((_globalSetting$settin4 = globalSetting.setting) !== null && _globalSetting$settin4 !== void 0 && _globalSetting$settin4.is_local) && /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
|
|
|
className: "".concat(activeKey === NavType.Projects ? Menusmodules.active : ''),
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(_umi_production_exports.Link, {
|
|
|
|
|
className: activeKey === NavType.Projects ? Menusmodules.active : '',
|
|
|
|
|
to: "/users/".concat(username.current, "/projects"),
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
return setActiveKey(NavType.Projects);
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "iconfont icon-kaifaxiangmu "
|
|
|
|
|
}), "\u5F00\u53D1\u9879\u76EE"]
|
|
|
|
|
})
|
|
|
|
|
}), ((_user$userInfo3 = user.userInfo) === null || _user$userInfo3 === void 0 ? void 0 : _user$userInfo3.login) === (params === null || params === void 0 ? void 0 : params.username) && /*#__PURE__*/(0,jsx_runtime.jsxs)(_umi_production_exports.Link, {
|
|
|
|
|
to: "/users/".concat(username.current, "/competitions"),
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
return setActiveKey(NavType.Teach);
|
|
|
|
|
@ -224,7 +297,79 @@ var Banner = function Banner(_ref) {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "iconfont icon-xuexipaiming"
|
|
|
|
|
}), "\u7ADE\u8D5B\u7BA1\u7406"]
|
|
|
|
|
})
|
|
|
|
|
}), ((_user$userInfo4 = user.userInfo) === null || _user$userInfo4 === void 0 ? void 0 : _user$userInfo4.main_site) && !((_globalSetting$settin5 = globalSetting.setting) !== null && _globalSetting$settin5 !== void 0 && _globalSetting$settin5.is_local) && (isCurrent && ((_user$userInfo5 = user.userInfo) === null || _user$userInfo5 === void 0 ? void 0 : _user$userInfo5.is_teacher) || ((_user$userInfo6 = user.userInfo) === null || _user$userInfo6 === void 0 ? void 0 : _user$userInfo6.admin)) && /*#__PURE__*/(0,jsx_runtime.jsxs)(_umi_production_exports.Link, {
|
|
|
|
|
className: activeKey === NavType.Videos ? Menusmodules.active : '',
|
|
|
|
|
to: "/users/".concat(username.current, "/videos"),
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
return setActiveKey(NavType.Videos);
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "iconfont icon-shipinwenjian "
|
|
|
|
|
}), "\u89C6\u9891\u6587\u4EF6"]
|
|
|
|
|
}), ((_user$userInfo7 = user.userInfo) === null || _user$userInfo7 === void 0 ? void 0 : _user$userInfo7.main_site) && isCurrent && ((_user$userInfo8 = user.userInfo) === null || _user$userInfo8 === void 0 ? void 0 : _user$userInfo8.is_teacher) && /*#__PURE__*/(0,jsx_runtime.jsxs)(_umi_production_exports.Link, {
|
|
|
|
|
className: activeKey === NavType.Topics ? Menusmodules.active : '',
|
|
|
|
|
to: "/users/".concat(username.current, "/topics/personal"),
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
return setActiveKey(NavType.Topics);
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "iconfont icon-ziyuan2 "
|
|
|
|
|
}), "\u8BFE\u5802\u8D44\u6E90"]
|
|
|
|
|
}), ((_user$userInfo9 = user.userInfo) === null || _user$userInfo9 === void 0 ? void 0 : _user$userInfo9.user_identity) !== '学生' && /*#__PURE__*/(0,jsx_runtime.jsxs)(_umi_production_exports.Link, {
|
|
|
|
|
to: "/users/".concat(username.current, "/vspaces"),
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
return setActiveKey(NavType.virtualSpaces);
|
|
|
|
|
},
|
|
|
|
|
className: activeKey === NavType.virtualSpaces ? Menusmodules.active : '',
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "iconfont icon-xunishequ "
|
|
|
|
|
}), "\u865A\u62DF\u793E\u533A"]
|
|
|
|
|
}), ((_user$userInfo10 = user.userInfo) === null || _user$userInfo10 === void 0 ? void 0 : _user$userInfo10.login) === (params === null || params === void 0 ? void 0 : params.username) && ((_user$userInfo11 = user.userInfo) === null || _user$userInfo11 === void 0 ? void 0 : _user$userInfo11.mirror_marker_auth) && /*#__PURE__*/(0,jsx_runtime.jsxs)(_umi_production_exports.Link, {
|
|
|
|
|
to: "/users/".concat(username.current, "/experiment-img"),
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
return setActiveKey(NavType.CreateImg);
|
|
|
|
|
},
|
|
|
|
|
className: activeKey === NavType.CreateImg ? Menusmodules.active : '',
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "iconfont icon-jingxiang2 "
|
|
|
|
|
}), "\u5B9E\u9A8C\u955C\u50CF"]
|
|
|
|
|
}), ((_user$userInfo12 = user.userInfo) === null || _user$userInfo12 === void 0 ? void 0 : _user$userInfo12.user_identity) !== '学生' && /*#__PURE__*/(0,jsx_runtime.jsxs)(_umi_production_exports.Link, {
|
|
|
|
|
to: "/users/".concat(username.current, "/certificate"),
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
return setActiveKey(NavType.Certificate);
|
|
|
|
|
},
|
|
|
|
|
className: activeKey === NavType.Certificate ? Menusmodules.active : '',
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "iconfont icon-zhengshuguanli "
|
|
|
|
|
}), "\u8BC1\u4E66\u7BA1\u7406"]
|
|
|
|
|
}), ((_user$userInfo13 = user.userInfo) === null || _user$userInfo13 === void 0 ? void 0 : _user$userInfo13.login) === (params === null || params === void 0 ? void 0 : params.username) && ((_user$userInfo14 = user.userInfo) === null || _user$userInfo14 === void 0 ? void 0 : _user$userInfo14.user_identity) !== '学生' && /*#__PURE__*/(0,jsx_runtime.jsxs)(_umi_production_exports.Link, {
|
|
|
|
|
to: "/users/".concat(username.current, "/teach-group"),
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
return setActiveKey(NavType.Teach);
|
|
|
|
|
},
|
|
|
|
|
className: activeKey === NavType.Teach ? Menusmodules.active : '',
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "iconfont icon-tuandui "
|
|
|
|
|
}), "\u6559\u7814\u56E2\u961F"]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(_umi_production_exports.Link, {
|
|
|
|
|
to: "/users/".concat(username.current, "/otherResources"),
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
return setActiveKey(NavType.OtherResources);
|
|
|
|
|
},
|
|
|
|
|
className: activeKey === NavType.OtherResources ? Menusmodules.active : '',
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "iconfont icon-ziyuan2 "
|
|
|
|
|
}), "\u8D44\u6E90\u94FE\u63A5"]
|
|
|
|
|
}), user.userInfo.is_teacher && /*#__PURE__*/(0,jsx_runtime.jsxs)(_umi_production_exports.Link, {
|
|
|
|
|
to: "/users/".concat(username.current, "/classmanagement"),
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
return setActiveKey(NavType.Classmanagement);
|
|
|
|
|
},
|
|
|
|
|
className: activeKey === NavType.Classmanagement ? Menusmodules.active : '',
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "iconfont icon-banjiguanli"
|
|
|
|
|
}), "\u73ED\u7EA7\u7BA1\u7406", (_userDetail$homepageI11 = userDetail.homepageInfo) !== null && _userDetail$homepageI11 !== void 0 && _userDetail$homepageI11.student_group_count ? "\uFF08".concat((_userDetail$homepageI12 = userDetail.homepageInfo) === null || _userDetail$homepageI12 === void 0 ? void 0 : _userDetail$homepageI12.student_group_count, "\uFF09") : "\uFF080\uFF09"]
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|