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.
552 lines
25 KiB
552 lines
25 KiB
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[28],{
|
|
|
|
/***/ "10oi":
|
|
/*!*****************************************************************!*\
|
|
!*** ./src/pages/Account/components/Sidebar/index.less?modules ***!
|
|
\*****************************************************************/
|
|
/*! no static exports found */
|
|
/*! exports used: default */
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
module.exports = {"wrap":"wrap___15YxZ","avatarWrap":"avatarWrap___1SK7M","avatar":"avatar___aE2NE","updateAvatarWrap":"updateAvatarWrap___1fuUU","img":"img___1hVau","updateAvatar":"updateAvatar___3eO7J","name":"name___3A4CD","role":"role___2fZYJ","title":"title___BMo5O","colorGary":"colorGary___1xzwA","colorGreen":"colorGreen___1cWMZ","colorRed":"colorRed___3vds7","item":"item___3kvAY","active":"active___2NtTm"};
|
|
|
|
/***/ }),
|
|
|
|
/***/ "5sM0":
|
|
/*!***************************************************************************!*\
|
|
!*** ./src/pages/Account/components/UpdateAvatarModal/index.less?modules ***!
|
|
\***************************************************************************/
|
|
/*! no static exports found */
|
|
/*! exports used: default */
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
module.exports = {"modal":"modal___2DX0z","avatarWrap":"avatarWrap___2lmFf","tip":"tip___220u_","previewWrap":"previewWrap___2BJLo","previewImg":"previewImg___29S6d","uploadButton":"uploadButton___30_6b"};
|
|
|
|
/***/ }),
|
|
|
|
/***/ "m3a9":
|
|
/*!*************************************************!*\
|
|
!*** ./src/pages/Account/index.tsx + 2 modules ***!
|
|
\*************************************************/
|
|
/*! exports provided: default */
|
|
/*! all exports used */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Account/components/Sidebar/index.less?modules (<- Module is not an ECMAScript module) */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Account/components/UpdateAvatarModal/index.less?modules (<- Module is not an ECMAScript module) */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Account/index.less?modules (<- Module is not an ECMAScript module) */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/core/umiExports.ts */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/index.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/spin/index.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/spin/style/index.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-cropper/dist/react-cropper.js (<- Module is not an ECMAScript module) */
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-router/esm/react-router.js */
|
|
/*! ModuleConcatenation bailout: Cannot concat with external "window.React" (<- Module is not an ECMAScript module) */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
// ESM COMPAT FLAG
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
|
|
var asyncToGenerator = __webpack_require__("9og8");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules
|
|
var objectWithoutProperties = __webpack_require__("PpiC");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator/index.js
|
|
var regenerator = __webpack_require__("WmNS");
|
|
var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
|
|
|
|
// EXTERNAL MODULE: external "window.React"
|
|
var external_window_React_ = __webpack_require__("cDcd");
|
|
var external_window_React_default = /*#__PURE__*/__webpack_require__.n(external_window_React_);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/react-router/esm/react-router.js
|
|
var react_router = __webpack_require__("Ty5D");
|
|
|
|
// EXTERNAL MODULE: ./src/.umi-production/core/umiExports.ts + 17 modules
|
|
var umiExports = __webpack_require__("9kvl");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
|
|
var slicedToArray = __webpack_require__("tJVT");
|
|
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
var env = __webpack_require__("m3rI");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/modal/style/index.js
|
|
var style = __webpack_require__("2qtc");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/modal/index.js + 7 modules
|
|
var modal = __webpack_require__("kLXV");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/spin/style/index.js
|
|
var spin_style = __webpack_require__("T2oS");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/spin/index.js
|
|
var spin = __webpack_require__("W9HT");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/message/style/index.js
|
|
var message_style = __webpack_require__("miYZ");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/message/index.js + 1 modules
|
|
var message = __webpack_require__("tsqr");
|
|
|
|
// EXTERNAL MODULE: ./node_modules/react-cropper/dist/react-cropper.js
|
|
var react_cropper = __webpack_require__("wyMu");
|
|
var react_cropper_default = /*#__PURE__*/__webpack_require__.n(react_cropper);
|
|
|
|
// EXTERNAL MODULE: ./src/pages/Account/components/UpdateAvatarModal/index.less?modules
|
|
var UpdateAvatarModalmodules = __webpack_require__("5sM0");
|
|
var UpdateAvatarModalmodules_default = /*#__PURE__*/__webpack_require__.n(UpdateAvatarModalmodules);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/cropperjs/dist/cropper.css
|
|
var dist_cropper = __webpack_require__("YQfW");
|
|
|
|
// CONCATENATED MODULE: ./src/pages/Account/components/UpdateAvatarModal/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var UpdateAvatarModal_UpdateAvatarModal = function UpdateAvatarModal(_ref) {
|
|
var user = _ref.user,
|
|
account = _ref.account,
|
|
globalSetting = _ref.globalSetting,
|
|
loading = _ref.loading,
|
|
dispatch = _ref.dispatch,
|
|
visible = _ref.visible,
|
|
onClose = _ref.onClose;
|
|
|
|
var _useState = Object(external_window_React_["useState"])(),
|
|
_useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
|
|
avatarImg = _useState2[0],
|
|
setAvatarImg = _useState2[1];
|
|
|
|
var cropper = Object(external_window_React_["useRef"])();
|
|
Object(external_window_React_["useEffect"])(function () {
|
|
if (visible) {
|
|
var _user$userInfo;
|
|
|
|
setAvatarImg("".concat(env["a" /* default */].IMG_SERVER, "/images/").concat((_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.image_url));
|
|
}
|
|
}, [user.userInfo, visible]);
|
|
|
|
var onChange = function onChange(e) {
|
|
var _files;
|
|
|
|
var files;
|
|
|
|
if (e.dataTransfer) {
|
|
files = e.dataTransfer.files;
|
|
} else if (e.target) {
|
|
files = e.target.files;
|
|
}
|
|
|
|
if (!((_files = files) !== null && _files !== void 0 && _files.length)) {
|
|
return;
|
|
}
|
|
|
|
var file = files[0];
|
|
|
|
if (!/^image\/\w+/.test(file.type)) {
|
|
message["b" /* default */].info('请选择一个图片格式的文件');
|
|
|
|
return;
|
|
}
|
|
|
|
if (file.size > 2 * 1024 * 1024) {
|
|
message["b" /* default */].info('仅支持文件大小小于2M的文件');
|
|
|
|
return;
|
|
}
|
|
|
|
var reader = new FileReader();
|
|
|
|
reader.onload = function () {
|
|
setAvatarImg(reader.result);
|
|
};
|
|
|
|
reader.readAsDataURL(files[0]);
|
|
};
|
|
|
|
var handleOk = /*#__PURE__*/function () {
|
|
var _ref2 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee() {
|
|
var _user$userInfo2;
|
|
|
|
var dataUrl, res;
|
|
return regenerator_default.a.wrap(function _callee$(_context) {
|
|
while (1) {
|
|
switch (_context.prev = _context.next) {
|
|
case 0:
|
|
dataUrl = cropper.current.getCroppedCanvas().toDataURL("image/jpeg");
|
|
|
|
if (!dataUrl) {
|
|
message["b" /* default */].info('请先上传图片');
|
|
}
|
|
|
|
_context.next = 4;
|
|
return dispatch({
|
|
type: 'account/updateAvatar',
|
|
payload: {
|
|
image: dataUrl,
|
|
login: (_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.login
|
|
}
|
|
});
|
|
|
|
case 4:
|
|
res = _context.sent;
|
|
handlerCancel();
|
|
|
|
if (res.status === 0) {
|
|
message["b" /* default */].info('修改头像成功');
|
|
|
|
dispatch({
|
|
type: 'user/getUserInfo'
|
|
});
|
|
}
|
|
|
|
case 7:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}
|
|
}, _callee);
|
|
}));
|
|
|
|
return function handleOk() {
|
|
return _ref2.apply(this, arguments);
|
|
};
|
|
}();
|
|
|
|
var handlerCancel = function handlerCancel() {
|
|
onClose();
|
|
};
|
|
|
|
return /*#__PURE__*/external_window_React_default.a.createElement(modal["a" /* default */], {
|
|
centered: true,
|
|
keyboard: false,
|
|
closable: false,
|
|
visible: visible,
|
|
title: "\u4E0A\u4F20\u5934\u50CF",
|
|
width: 550,
|
|
forceRender: true,
|
|
confirmLoading: loading['account/updateAvatar'],
|
|
onOk: handleOk,
|
|
onCancel: handlerCancel
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement(spin["a" /* default */], {
|
|
spinning: !!loading['account/updateAvatar']
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement("div", {
|
|
className: UpdateAvatarModalmodules_default.a.modal
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement("div", null, /*#__PURE__*/external_window_React_default.a.createElement("div", {
|
|
className: UpdateAvatarModalmodules_default.a.avatarWrap
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement(react_cropper_default.a, {
|
|
style: {
|
|
height: 320,
|
|
width: 320
|
|
},
|
|
ref: cropper,
|
|
src: avatarImg,
|
|
guides: false,
|
|
aspectRatio: 1,
|
|
preview: "#updateAvatarImg"
|
|
})), /*#__PURE__*/external_window_React_default.a.createElement("span", {
|
|
className: UpdateAvatarModalmodules_default.a.tip
|
|
}, "\u4EC5\u652F\u6301JPG\u3001GIF\u3001PNG\uFF0C\u4E14\u6587\u4EF6\u5C0F\u4E8E2M")), /*#__PURE__*/external_window_React_default.a.createElement("div", {
|
|
className: UpdateAvatarModalmodules_default.a.previewWrap
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement("div", null, /*#__PURE__*/external_window_React_default.a.createElement("div", {
|
|
className: UpdateAvatarModalmodules_default.a.previewImg,
|
|
id: "updateAvatarImg"
|
|
}), /*#__PURE__*/external_window_React_default.a.createElement("div", {
|
|
className: "".concat(UpdateAvatarModalmodules_default.a.tip, " tc")
|
|
}, "\u5934\u50CF\u9884\u89C8")), /*#__PURE__*/external_window_React_default.a.createElement("label", {
|
|
className: UpdateAvatarModalmodules_default.a.uploadButton,
|
|
id: "uploadBtn",
|
|
htmlFor: "inputImage"
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement("input", {
|
|
type: "file",
|
|
className: "sr-only",
|
|
id: "inputImage",
|
|
name: "file",
|
|
accept: "image/*",
|
|
style: {
|
|
display: "none"
|
|
},
|
|
onChange: onChange
|
|
}), "\u70B9\u51FB\u4E0A\u4F20")))));
|
|
};
|
|
|
|
/* harmony default export */ var components_UpdateAvatarModal = (Object(umiExports["a" /* connect */])(function (_ref3) {
|
|
var user = _ref3.user,
|
|
account = _ref3.account,
|
|
loading = _ref3.loading,
|
|
globalSetting = _ref3.globalSetting;
|
|
return {
|
|
user: user,
|
|
account: account,
|
|
globalSetting: globalSetting,
|
|
loading: loading.effects
|
|
};
|
|
})(UpdateAvatarModal_UpdateAvatarModal));
|
|
// EXTERNAL MODULE: ./src/pages/Account/components/Sidebar/index.less?modules
|
|
var Sidebarmodules = __webpack_require__("10oi");
|
|
var Sidebarmodules_default = /*#__PURE__*/__webpack_require__.n(Sidebarmodules);
|
|
|
|
// CONCATENATED MODULE: ./src/pages/Account/components/Sidebar/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var NavType;
|
|
|
|
(function (NavType) {
|
|
NavType["Profile"] = "profile";
|
|
NavType["Certification"] = "certification";
|
|
NavType["Secure"] = "secure";
|
|
NavType["Group"] = "teach-group";
|
|
NavType["Binding"] = "binding";
|
|
NavType["Results"] = "Results";
|
|
})(NavType || (NavType = {}));
|
|
|
|
var Sidebar_Sidebar = function Sidebar(_ref) {
|
|
var _user$userInfo, _user$userInfo2, _user$userInfo3, _user$userInfo3$usern, _user$userInfo4, _user$userInfo4$usern, _user$userInfo5, _user$userInfo6, _account$basicInfo, _account$basicInfo2, _account$basicInfo3, _globalSetting$settin, _account$actionTabs;
|
|
|
|
var user = _ref.user,
|
|
account = _ref.account,
|
|
globalSetting = _ref.globalSetting,
|
|
loading = _ref.loading,
|
|
dispatch = _ref.dispatch,
|
|
props = Object(objectWithoutProperties["a" /* default */])(_ref, ["user", "account", "globalSetting", "loading", "dispatch"]);
|
|
|
|
var _useState = Object(external_window_React_["useState"])(),
|
|
_useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
|
|
activeKey = _useState2[0],
|
|
setActiveKey = _useState2[1];
|
|
|
|
var location = Object(react_router["h" /* useLocation */])();
|
|
Object(external_window_React_["useEffect"])(function () {
|
|
var _location$pathname$sp;
|
|
|
|
var active = (_location$pathname$sp = location.pathname.split('/')) === null || _location$pathname$sp === void 0 ? void 0 : _location$pathname$sp[2];
|
|
setActiveKey(active);
|
|
}, [location.pathname]);
|
|
var avatarImg = "".concat(env["a" /* default */].IMG_SERVER, "/images/").concat((_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.image_url);
|
|
return /*#__PURE__*/external_window_React_default.a.createElement("section", {
|
|
className: Sidebarmodules_default.a.wrap
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement("div", {
|
|
className: Sidebarmodules_default.a.avatarWrap
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement("div", {
|
|
className: Sidebarmodules_default.a.avatar
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement("div", {
|
|
className: Sidebarmodules_default.a.updateAvatarWrap
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement("img", {
|
|
className: Sidebarmodules_default.a.img,
|
|
src: avatarImg
|
|
}), /*#__PURE__*/external_window_React_default.a.createElement("div", {
|
|
className: Sidebarmodules_default.a.updateAvatar,
|
|
onClick: function onClick() {
|
|
dispatch({
|
|
type: 'account/setActionTabs',
|
|
payload: {
|
|
key: 'Account-UpdateAvatar'
|
|
}
|
|
});
|
|
}
|
|
}, "\u4FEE\u6539\u5934\u50CF"))), /*#__PURE__*/external_window_React_default.a.createElement("span", {
|
|
className: Sidebarmodules_default.a.name,
|
|
title: (_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.username
|
|
}, ((_user$userInfo3 = user.userInfo) === null || _user$userInfo3 === void 0 ? void 0 : (_user$userInfo3$usern = _user$userInfo3.username) === null || _user$userInfo3$usern === void 0 ? void 0 : _user$userInfo3$usern.length) > 6 ? ((_user$userInfo4 = user.userInfo) === null || _user$userInfo4 === void 0 ? void 0 : (_user$userInfo4$usern = _user$userInfo4.username) === null || _user$userInfo4$usern === void 0 ? void 0 : _user$userInfo4$usern.substr(0, 6)) + '...' : (_user$userInfo5 = user.userInfo) === null || _user$userInfo5 === void 0 ? void 0 : _user$userInfo5.username), /*#__PURE__*/external_window_React_default.a.createElement("span", {
|
|
className: Sidebarmodules_default.a.role
|
|
}, (_user$userInfo6 = user.userInfo) === null || _user$userInfo6 === void 0 ? void 0 : _user$userInfo6.user_identity)), /*#__PURE__*/external_window_React_default.a.createElement("div", null, /*#__PURE__*/external_window_React_default.a.createElement("div", {
|
|
className: Sidebarmodules_default.a.title
|
|
}, "\u8D26\u53F7\u7BA1\u7406"), /*#__PURE__*/external_window_React_default.a.createElement("ul", {
|
|
className: "pl0"
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement("li", {
|
|
className: "".concat(Sidebarmodules_default.a.item, " ").concat(activeKey === NavType.Profile ? Sidebarmodules_default.a.active : ''),
|
|
onClick: function onClick() {
|
|
return umiExports["d" /* history */].push("/account/".concat(NavType.Profile));
|
|
}
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement("span", null, /*#__PURE__*/external_window_React_default.a.createElement("i", {
|
|
className: "iconfont icon-jibenxinxi font16 mr5 ".concat(Sidebarmodules_default.a.colorGary)
|
|
}), "\u57FA\u672C\u4FE1\u606F"), /*#__PURE__*/external_window_React_default.a.createElement("i", {
|
|
className: "iconfont font16 mr25 ".concat((_account$basicInfo = account.basicInfo) !== null && _account$basicInfo !== void 0 && _account$basicInfo.base_info_completed ? "".concat(Sidebarmodules_default.a.colorGreen, " icon-wancheng") : "".concat(Sidebarmodules_default.a.colorRed, " icon-tishi"))
|
|
})), /*#__PURE__*/external_window_React_default.a.createElement("li", {
|
|
className: "".concat(Sidebarmodules_default.a.item, " ").concat(activeKey === NavType.Certification ? Sidebarmodules_default.a.active : ''),
|
|
onClick: function onClick() {
|
|
return umiExports["d" /* history */].push("/account/".concat(NavType.Certification));
|
|
}
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement("span", null, /*#__PURE__*/external_window_React_default.a.createElement("i", {
|
|
className: "iconfont icon-renzhengxinxi font16 mr5 ".concat(Sidebarmodules_default.a.colorGary)
|
|
}), "\u8BA4\u8BC1\u4FE1\u606F"), /*#__PURE__*/external_window_React_default.a.createElement("i", {
|
|
className: "iconfont font16 mr25 ".concat(((_account$basicInfo2 = account.basicInfo) === null || _account$basicInfo2 === void 0 ? void 0 : _account$basicInfo2.professional_certification) === 'certified' && ((_account$basicInfo3 = account.basicInfo) === null || _account$basicInfo3 === void 0 ? void 0 : _account$basicInfo3.authentication) === 'certified' ? "".concat(Sidebarmodules_default.a.colorGreen, " icon-wancheng") : "".concat(Sidebarmodules_default.a.colorRed, " icon-tishi"))
|
|
})), /*#__PURE__*/external_window_React_default.a.createElement("li", {
|
|
className: "".concat(Sidebarmodules_default.a.item, " ").concat(activeKey === NavType.Secure ? Sidebarmodules_default.a.active : ''),
|
|
onClick: function onClick() {
|
|
return umiExports["d" /* history */].push("/account/".concat(NavType.Secure));
|
|
}
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement("span", null, /*#__PURE__*/external_window_React_default.a.createElement("i", {
|
|
className: "iconfont icon-anquanshezhi font16 mr5 ".concat(Sidebarmodules_default.a.colorGary)
|
|
}), "\u5B89\u5168\u8BBE\u7F6E")), !(globalSetting !== null && globalSetting !== void 0 && (_globalSetting$settin = globalSetting.setting) !== null && _globalSetting$settin !== void 0 && _globalSetting$settin.is_local) && /*#__PURE__*/external_window_React_default.a.createElement("li", {
|
|
className: "".concat(Sidebarmodules_default.a.item, " ").concat(activeKey === NavType.Binding ? Sidebarmodules_default.a.active : ''),
|
|
onClick: function onClick() {
|
|
return umiExports["d" /* history */].push("/account/".concat(NavType.Binding));
|
|
}
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement("span", null, /*#__PURE__*/external_window_React_default.a.createElement("i", {
|
|
className: "iconfont icon-lianjie font16 mr5 ".concat(Sidebarmodules_default.a.colorGary)
|
|
}), "\u7ED1\u5B9A\u767B\u5F55\u8D26\u53F7")))), /*#__PURE__*/external_window_React_default.a.createElement(components_UpdateAvatarModal, {
|
|
visible: ((_account$actionTabs = account.actionTabs) === null || _account$actionTabs === void 0 ? void 0 : _account$actionTabs.key) === 'Account-UpdateAvatar',
|
|
onClose: function onClose() {
|
|
dispatch({
|
|
type: 'account/setActionTabs'
|
|
});
|
|
}
|
|
}));
|
|
};
|
|
|
|
/* harmony default export */ var components_Sidebar = (Object(umiExports["a" /* connect */])(function (_ref2) {
|
|
var user = _ref2.user,
|
|
account = _ref2.account,
|
|
loading = _ref2.loading,
|
|
globalSetting = _ref2.globalSetting;
|
|
return {
|
|
user: user,
|
|
account: account,
|
|
globalSetting: globalSetting,
|
|
loading: loading.models.index
|
|
};
|
|
})(Sidebar_Sidebar));
|
|
// EXTERNAL MODULE: ./src/pages/Account/index.less?modules
|
|
var Accountmodules = __webpack_require__("n6JY");
|
|
var Accountmodules_default = /*#__PURE__*/__webpack_require__.n(Accountmodules);
|
|
|
|
// CONCATENATED MODULE: ./src/pages/Account/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// import BeginnerBottom from '@/components/HomeModal/Beginnerbottom'
|
|
|
|
var Account_AccountPage = function AccountPage(_ref) {
|
|
var _user$userInfo3;
|
|
|
|
var user = _ref.user,
|
|
account = _ref.account,
|
|
globalSetting = _ref.globalSetting,
|
|
loading = _ref.loading,
|
|
dispatch = _ref.dispatch,
|
|
props = Object(objectWithoutProperties["a" /* default */])(_ref, ["user", "account", "globalSetting", "loading", "dispatch"]);
|
|
|
|
var location = Object(react_router["h" /* useLocation */])();
|
|
Object(external_window_React_["useEffect"])(function () {
|
|
var _user$userInfo;
|
|
|
|
if (!((_user$userInfo = user.userInfo) !== null && _user$userInfo !== void 0 && _user$userInfo.login)) {
|
|
return;
|
|
}
|
|
|
|
Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee() {
|
|
var _user$userInfo2;
|
|
|
|
var res;
|
|
return regenerator_default.a.wrap(function _callee$(_context) {
|
|
while (1) {
|
|
switch (_context.prev = _context.next) {
|
|
case 0:
|
|
_context.next = 2;
|
|
return dispatch({
|
|
type: 'account/getBasicInfo',
|
|
payload: {
|
|
login: (_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.login
|
|
}
|
|
});
|
|
|
|
case 2:
|
|
res = _context.sent;
|
|
|
|
if (!(res !== null && res !== void 0 && res.base_info_completed)) {
|
|
if (localStorage.getItem('Noviceguide') === '0') {} else {
|
|
dispatch({
|
|
type: 'shixunHomeworks/setActionTabs',
|
|
payload: {
|
|
key: '底部弹窗',
|
|
type: 3,
|
|
text: /*#__PURE__*/external_window_React_default.a.createElement("div", null, "\u8BF7\u60A8\u5B8C\u5584\u4E00\u4E0B\u5E73\u53F0\u7684\u57FA\u672C\u4FE1\u606F\uFF0C\u5305\u62EC\uFF1A\u6635\u79F0\u3001\u804C\u4E1A\u3001\u5B66\u6821/\u5355\u4F4D\uFF0C \u70B9\u51FB\u4FDD\u5B58")
|
|
}
|
|
});
|
|
}
|
|
|
|
umiExports["d" /* history */].push("/account/profile/edit");
|
|
}
|
|
|
|
case 4:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}
|
|
}, _callee);
|
|
}))(); // console.log('--------编辑',loading['account/editAccount']);
|
|
|
|
}, [(_user$userInfo3 = user.userInfo) === null || _user$userInfo3 === void 0 ? void 0 : _user$userInfo3.login]);
|
|
return /*#__PURE__*/external_window_React_default.a.createElement("section", {
|
|
className: Accountmodules_default.a.bg
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement("div", {
|
|
className: Accountmodules_default.a.wrap
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement(components_Sidebar, null), props.children));
|
|
};
|
|
|
|
/* harmony default export */ var Account = __webpack_exports__["default"] = (Object(umiExports["a" /* connect */])(function (_ref3) {
|
|
var user = _ref3.user,
|
|
account = _ref3.account,
|
|
loading = _ref3.loading,
|
|
globalSetting = _ref3.globalSetting;
|
|
return {
|
|
user: user,
|
|
account: account,
|
|
globalSetting: globalSetting,
|
|
loading: loading.models.index
|
|
};
|
|
})(Account_AccountPage));
|
|
|
|
/***/ }),
|
|
|
|
/***/ "n6JY":
|
|
/*!**********************************************!*\
|
|
!*** ./src/pages/Account/index.less?modules ***!
|
|
\**********************************************/
|
|
/*! no static exports found */
|
|
/*! exports used: default */
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
module.exports = {"bg":"bg___wq3H6","wrap":"wrap___13xuI"};
|
|
|
|
/***/ })
|
|
|
|
}]); |