You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
421 lines
22 KiB
421 lines
22 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[72529],{
|
|
|
|
/***/ 97322:
|
|
/*!****************************************************!*\
|
|
!*** ./src/pages/User/Detail/[id].tsx + 3 modules ***!
|
|
\****************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
// ESM COMPAT FLAG
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
"default": function() { return /* binding */ _id_; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js
|
|
var slicedToArray = __webpack_require__(11006);
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
|
|
var _umi_production_exports = __webpack_require__(22211);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js
|
|
var regeneratorRuntime = __webpack_require__(10574);
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js
|
|
var asyncToGenerator = __webpack_require__(39343);
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectWithoutProperties.js
|
|
var objectWithoutProperties = __webpack_require__(27161);
|
|
var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
|
|
;// CONCATENATED MODULE: ./src/pages/User/Detail/Menus/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var Menusmodules = ({"flex_box_center":"flex_box_center___gzO10","flex_space_between":"flex_space_between___HD4df","flex_box_vertical_center":"flex_box_vertical_center___biRrw","flex_box_center_end":"flex_box_center_end___vGSp5","flex_box_column":"flex_box_column___M8cXk","menuWrap":"menuWrap___PO4bq","crumbs":"crumbs___deUWl","info":"info___yqdBj","avatar":"avatar___AAwgi","name":"name___StpT8","approve":"approve___Uf6lz","number":"number___wTMVZ","attendance":"attendance___EUyoc","btn":"btn___TFPf7","nav":"nav___kkv6O","active":"active___s1gIo"});
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
var env = __webpack_require__(67871);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
;// CONCATENATED MODULE: ./src/pages/User/Detail/Menus/index.tsx
|
|
|
|
|
|
|
|
|
|
var _excluded = ["userDetail", "user", "globalSetting", "loading", "dispatch"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var NavType = /*#__PURE__*/function (NavType) {
|
|
NavType["Classrooms"] = "classrooms";
|
|
NavType["Shixuns"] = "shixuns";
|
|
NavType["Paths"] = "paths";
|
|
NavType["Projects"] = "projects";
|
|
NavType["Videos"] = "videos";
|
|
NavType["Topics"] = "topics";
|
|
NavType["Teach"] = "teach-group";
|
|
NavType["CreateImg"] = "experiment-img";
|
|
NavType["Certificate"] = "certificate";
|
|
NavType["OtherResources"] = "otherResources";
|
|
NavType["UserPortrait"] = "userPortrait";
|
|
NavType["LearningPath"] = "learningPath";
|
|
NavType["virtualSpaces"] = "vspaces";
|
|
NavType["Competitions"] = "competitions";
|
|
NavType["Classmanagement"] = "classmanagement";
|
|
return NavType;
|
|
}(NavType || {});
|
|
var showSearchMapping = [{
|
|
name: 'classrooms',
|
|
placeholder: '请搜索课堂/课程名称'
|
|
}, {
|
|
name: 'shixuns',
|
|
placeholder: '搜索实践项目'
|
|
}, {
|
|
name: 'paths',
|
|
placeholder: '搜索实践课程'
|
|
}, {
|
|
name: 'videos',
|
|
placeholder: '搜索视频'
|
|
}];
|
|
var Banner = function Banner(_ref) {
|
|
var _user$userInfo, _userDetail$homepageI, _userDetail$homepageI2, _userDetail$homepageI3, _userDetail$homepageI4, _userDetail$homepageI5, _userDetail$homepageI6, _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$homepageI7, _userDetail$homepageI8;
|
|
var userDetail = _ref.userDetail,
|
|
user = _ref.user,
|
|
globalSetting = _ref.globalSetting,
|
|
loading = _ref.loading,
|
|
dispatch = _ref.dispatch,
|
|
props = objectWithoutProperties_default()(_ref, _excluded);
|
|
var location = (0,_umi_production_exports.useLocation)();
|
|
var username = (0,_react_17_0_2_react.useRef)();
|
|
var _useState = (0,_react_17_0_2_react.useState)(),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
activeKey = _useState2[0],
|
|
setActiveKey = _useState2[1];
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
var _location$pathname$sp, _location$pathname$sp2;
|
|
username.current = (_location$pathname$sp = location.pathname.split('/')) === null || _location$pathname$sp === void 0 ? void 0 : _location$pathname$sp[2];
|
|
var active = (_location$pathname$sp2 = location.pathname.split('/')) === null || _location$pathname$sp2 === void 0 ? void 0 : _location$pathname$sp2[3];
|
|
setActiveKey(active || NavType.Classrooms);
|
|
}, [location.pathname]);
|
|
var handleSigned = /*#__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:
|
|
_context.next = 2;
|
|
return dispatch({
|
|
type: 'userDetail/signed'
|
|
});
|
|
case 2:
|
|
res = _context.sent;
|
|
if (res) {
|
|
dispatch({
|
|
type: 'userDetail/getHomepageInfo',
|
|
payload: {
|
|
username: username.current
|
|
}
|
|
});
|
|
}
|
|
case 4:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return function handleSigned() {
|
|
return _ref2.apply(this, arguments);
|
|
};
|
|
}();
|
|
console.log('user.userInfo', user.userInfo);
|
|
var dealWith = function dealWith(value) {
|
|
var num = Number(value || 0);
|
|
if (value > 10000) {
|
|
num = num / 10000;
|
|
num = Math.floor(num * 10) / 10;
|
|
return num + '万';
|
|
}
|
|
return num;
|
|
};
|
|
var isCurrent = ((_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.login) === username.current;
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Menusmodules.menuWrap,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Menusmodules.crumbs,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
children: ["\u6211\u7684\xA0", '>', "\xA0"]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("b", {
|
|
children: "\u4E2A\u4EBA\u4E3B\u9875"
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Menusmodules.info,
|
|
children: [((_userDetail$homepageI = userDetail.homepageInfo) === null || _userDetail$homepageI === void 0 ? void 0 : _userDetail$homepageI.avatar_url) && /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
className: Menusmodules.avatar,
|
|
width: 56,
|
|
alt: "\u5934\u50CF",
|
|
src: "".concat(env/* default */.Z.IMG_SERVER, "/images/").concat((_userDetail$homepageI2 = userDetail.homepageInfo) === null || _userDetail$homepageI2 === void 0 ? void 0 : _userDetail$homepageI2.avatar_url)
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("b", {
|
|
className: Menusmodules.name,
|
|
children: (_userDetail$homepageI3 = userDetail.homepageInfo) === null || _userDetail$homepageI3 === void 0 ? void 0 : _userDetail$homepageI3.name
|
|
})
|
|
})]
|
|
}), /*#__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$homepageI4 = userDetail.homepageInfo) === null || _userDetail$homepageI4 === void 0 ? void 0 : _userDetail$homepageI4.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$homepageI5 = userDetail.homepageInfo) === null || _userDetail$homepageI5 === void 0 ? void 0 : _userDetail$homepageI5.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$homepageI6 = userDetail.homepageInfo) !== null && _userDetail$homepageI6 !== void 0 && _userDetail$homepageI6.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: [!((_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);
|
|
},
|
|
className: activeKey === NavType.Competitions ? Menusmodules.active : '',
|
|
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$homepageI7 = userDetail.homepageInfo) !== null && _userDetail$homepageI7 !== void 0 && _userDetail$homepageI7.student_group_count ? "\uFF08".concat((_userDetail$homepageI8 = userDetail.homepageInfo) === null || _userDetail$homepageI8 === void 0 ? void 0 : _userDetail$homepageI8.student_group_count, "\uFF09") : "\uFF080\uFF09"]
|
|
})]
|
|
})]
|
|
});
|
|
};
|
|
/* harmony default export */ var Menus = ((0,_umi_production_exports.connect)(function (_ref3) {
|
|
var user = _ref3.user,
|
|
userDetail = _ref3.userDetail,
|
|
loading = _ref3.loading,
|
|
globalSetting = _ref3.globalSetting;
|
|
return {
|
|
user: user,
|
|
userDetail: userDetail,
|
|
globalSetting: globalSetting,
|
|
loading: loading.models.index
|
|
};
|
|
})(Banner));
|
|
;// CONCATENATED MODULE: ./src/pages/User/Detail/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var Detailmodules = ({"flex_box_center":"flex_box_center___fbdiq","flex_space_between":"flex_space_between___BQn7e","flex_box_vertical_center":"flex_box_vertical_center___Oa32s","flex_box_center_end":"flex_box_center_end___O1PRd","flex_box_column":"flex_box_column___tbM4u","content":"content___CfMWZ","leftBox":"leftBox___xeHyR","leftWrap":"leftWrap___OLOk_","rightBox":"rightBox___MjarR","rightWrap":"rightWrap___VCOtb","hiddenBar":"hiddenBar___v2ORW"});
|
|
;// CONCATENATED MODULE: ./src/pages/User/Detail/[id].tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var UserDetailPage = function UserDetailPage(_ref) {
|
|
var userDetail = _ref.userDetail,
|
|
globalSetting = _ref.globalSetting,
|
|
loading = _ref.loading,
|
|
dispatch = _ref.dispatch;
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
var username = (0,_react_17_0_2_react.useRef)();
|
|
var _useState = (0,_react_17_0_2_react.useState)(false),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
overflow = _useState2[0],
|
|
setOverflow = _useState2[1];
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
username.current = params.username;
|
|
dispatch({
|
|
type: 'userDetail/getHomepageInfo',
|
|
payload: {
|
|
username: username.current
|
|
}
|
|
});
|
|
dispatch({
|
|
type: 'globalSetting/footerToggle',
|
|
payload: false
|
|
});
|
|
return function () {
|
|
dispatch({
|
|
type: 'globalSetting/footerToggle',
|
|
payload: true
|
|
});
|
|
};
|
|
}, [params]);
|
|
var handleMouseEnter = function handleMouseEnter(event) {
|
|
var element = event.currentTarget;
|
|
if (element.scrollHeight > element.clientHeight) {
|
|
setOverflow(true);
|
|
}
|
|
};
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Detailmodules.content,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Detailmodules.leftBox,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: "".concat(Detailmodules.leftWrap, " ").concat(overflow ? '' : Detailmodules.hiddenBar),
|
|
onMouseEnter: handleMouseEnter,
|
|
onMouseLeave: function onMouseLeave() {
|
|
return setOverflow(false);
|
|
},
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(Menus, {})
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Detailmodules.rightBox,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Detailmodules.rightWrap,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Outlet, {})
|
|
})
|
|
})]
|
|
});
|
|
};
|
|
/* harmony default export */ var _id_ = ((0,_umi_production_exports.connect)(function (_ref2) {
|
|
var userDetail = _ref2.userDetail,
|
|
loading = _ref2.loading,
|
|
globalSetting = _ref2.globalSetting;
|
|
return {
|
|
userDetail: userDetail,
|
|
globalSetting: globalSetting,
|
|
loading: loading.models.index
|
|
};
|
|
})(UserDetailPage));
|
|
|
|
/***/ })
|
|
|
|
}]); |