|
|
|
|
@ -222,7 +222,7 @@ var tuijianzixue_namespaceObject = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUg
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var _excluded = ["globalSetting", "dispatch", "user"];
|
|
|
|
|
var _excluded = ["globalSetting", "dispatch", "user", "homePage"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -242,10 +242,11 @@ var _excluded = ["globalSetting", "dispatch", "user"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Page = function Page(_ref) {
|
|
|
|
|
var _user$userInfo4, _user$userInfo5, _globalSetting$settin2;
|
|
|
|
|
var _user$userInfo3, _globalSetting$settin, _user$userInfo4, _globalSetting$settin2;
|
|
|
|
|
var globalSetting = _ref.globalSetting,
|
|
|
|
|
dispatch = _ref.dispatch,
|
|
|
|
|
user = _ref.user,
|
|
|
|
|
homePage = _ref.homePage,
|
|
|
|
|
props = objectWithoutProperties_default()(_ref, _excluded);
|
|
|
|
|
var _useSearchParams = (0,_umi_production_exports.useSearchParams)(),
|
|
|
|
|
_useSearchParams2 = slicedToArray_default()(_useSearchParams, 2),
|
|
|
|
|
@ -354,6 +355,10 @@ var Page = function Page(_ref) {
|
|
|
|
|
if (window.location.href.split('&').length === 1) {
|
|
|
|
|
getList(params);
|
|
|
|
|
}
|
|
|
|
|
dispatch({
|
|
|
|
|
type: 'homePage/home',
|
|
|
|
|
payload: {}
|
|
|
|
|
});
|
|
|
|
|
}, []);
|
|
|
|
|
|
|
|
|
|
// 智能推荐--开始
|
|
|
|
|
@ -560,24 +565,24 @@ var Page = function Page(_ref) {
|
|
|
|
|
// trackEvent(['实践课程', '首页', type === 'next' ? "下一页" : "上一页"])
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var _useState17 = (0,_react_17_0_2_react.useState)([{
|
|
|
|
|
name: '新手指引',
|
|
|
|
|
click: open,
|
|
|
|
|
sign: true
|
|
|
|
|
}]),
|
|
|
|
|
_useState18 = slicedToArray_default()(_useState17, 2),
|
|
|
|
|
bannerBtns = _useState18[0],
|
|
|
|
|
setBannerBtns = _useState18[1];
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
var _user$userInfo3, _globalSetting$settin;
|
|
|
|
|
if (((_user$userInfo3 = user.userInfo) === null || _user$userInfo3 === void 0 ? void 0 : _user$userInfo3.user_identity) !== '学生' && !(globalSetting !== null && globalSetting !== void 0 && (_globalSetting$settin = globalSetting.setting) !== null && _globalSetting$settin !== void 0 && _globalSetting$settin.hide_subject)) {
|
|
|
|
|
setBannerBtns([{
|
|
|
|
|
name: '新建课程',
|
|
|
|
|
click: handleAddVerify,
|
|
|
|
|
sign: false
|
|
|
|
|
}].concat(toConsumableArray_default()(bannerBtns)));
|
|
|
|
|
}
|
|
|
|
|
}, [(_user$userInfo4 = user.userInfo) === null || _user$userInfo4 === void 0 ? void 0 : _user$userInfo4.user_identity]);
|
|
|
|
|
var bannerBtns = [{
|
|
|
|
|
name: '新建课程',
|
|
|
|
|
click: handleAddVerify,
|
|
|
|
|
isShow: ((_user$userInfo3 = user.userInfo) === null || _user$userInfo3 === void 0 ? void 0 : _user$userInfo3.user_identity) !== '学生' && !(globalSetting !== null && globalSetting !== void 0 && (_globalSetting$settin = globalSetting.setting) !== null && _globalSetting$settin !== void 0 && _globalSetting$settin.hide_subject)
|
|
|
|
|
}, {
|
|
|
|
|
name: '新手指引',
|
|
|
|
|
click: open,
|
|
|
|
|
sign: true,
|
|
|
|
|
isShow: true
|
|
|
|
|
}, {
|
|
|
|
|
name: '概览统计',
|
|
|
|
|
click: function click() {
|
|
|
|
|
(0,util/* openNewWindow */.xg)('/pathsoverview');
|
|
|
|
|
},
|
|
|
|
|
isShow: homePage === null || homePage === void 0 ? void 0 : homePage.is_show_btn
|
|
|
|
|
}].filter(function (item) {
|
|
|
|
|
return item.isShow;
|
|
|
|
|
});
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("section", {
|
|
|
|
|
className: Indexmodules.page,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
@ -601,7 +606,7 @@ var Page = function Page(_ref) {
|
|
|
|
|
value: (params === null || params === void 0 ? void 0 : params.sub_discipline_id) === 'all' ? params === null || params === void 0 ? void 0 : params.sub_discipline_id : Number(params === null || params === void 0 ? void 0 : params.sub_discipline_id),
|
|
|
|
|
onChange: handleSubclass,
|
|
|
|
|
fontColor: "#000000"
|
|
|
|
|
}), ((_user$userInfo5 = user.userInfo) === null || _user$userInfo5 === void 0 ? void 0 : _user$userInfo5.user_id) !== 2 && (0,authority/* isCommonStudent */.JA)() && (globalSetting === null || globalSetting === void 0 || (_globalSetting$settin2 = globalSetting.setting) === null || _globalSetting$settin2 === void 0 ? void 0 : _globalSetting$settin2.main_site) && !!(recommendData !== null && recommendData !== void 0 && recommendData.length) && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
|
|
}), ((_user$userInfo4 = user.userInfo) === null || _user$userInfo4 === void 0 ? void 0 : _user$userInfo4.user_id) !== 2 && (0,authority/* isCommonStudent */.JA)() && (globalSetting === null || globalSetting === void 0 || (_globalSetting$settin2 = globalSetting.setting) === null || _globalSetting$settin2 === void 0 ? void 0 : _globalSetting$settin2.main_site) && !!(recommendData !== null && recommendData !== void 0 && recommendData.length) && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
|
|
|
src: tuijianzixue_namespaceObject,
|
|
|
|
|
alt: "",
|
|
|
|
|
@ -652,10 +657,12 @@ var Page = function Page(_ref) {
|
|
|
|
|
};
|
|
|
|
|
/* harmony default export */ var Index = ((0,_umi_production_exports.connect)(function (_ref4) {
|
|
|
|
|
var user = _ref4.user,
|
|
|
|
|
globalSetting = _ref4.globalSetting;
|
|
|
|
|
globalSetting = _ref4.globalSetting,
|
|
|
|
|
homePage = _ref4.homePage;
|
|
|
|
|
return {
|
|
|
|
|
user: user,
|
|
|
|
|
globalSetting: globalSetting
|
|
|
|
|
globalSetting: globalSetting,
|
|
|
|
|
homePage: homePage
|
|
|
|
|
};
|
|
|
|
|
})(Page));
|
|
|
|
|
|