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.
917 lines
39 KiB
917 lines
39 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[52829],{
|
|
|
|
/***/ 82699:
|
|
/*!**********************************************************!*\
|
|
!*** ./src/pages/Messages/Private/index.tsx + 2 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 */ Private; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js
|
|
var objectSpread2 = __webpack_require__(82242);
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js
|
|
var slicedToArray = __webpack_require__(79800);
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectWithoutProperties.js
|
|
var objectWithoutProperties = __webpack_require__(39647);
|
|
var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
|
|
// 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 + 15 modules
|
|
var _umi_production_exports = __webpack_require__(58308);
|
|
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.10@dayjs/dayjs.min.js
|
|
var dayjs_min = __webpack_require__(9498);
|
|
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/menu/index.js + 11 modules
|
|
var menu = __webpack_require__(20834);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/layout/index.js
|
|
var layout = __webpack_require__(44000);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/row/index.js
|
|
var row = __webpack_require__(95237);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/col/index.js
|
|
var col = __webpack_require__(43604);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/divider/index.js + 1 modules
|
|
var divider = __webpack_require__(28103);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/skeleton/index.js + 12 modules
|
|
var skeleton = __webpack_require__(59981);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/pagination/index.js + 10 modules
|
|
var pagination = __webpack_require__(41867);
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
var env = __webpack_require__(80548);
|
|
// EXTERNAL MODULE: ./src/components/NoData/index.tsx
|
|
var NoData = __webpack_require__(30038);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/defineProperty.js
|
|
var defineProperty = __webpack_require__(85573);
|
|
var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js
|
|
var regeneratorRuntime = __webpack_require__(7557);
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js
|
|
var asyncToGenerator = __webpack_require__(41498);
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules
|
|
var es_form = __webpack_require__(78241);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
|
var modal = __webpack_require__(43418);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
|
|
var message = __webpack_require__(8591);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
|
|
var input = __webpack_require__(1056);
|
|
// EXTERNAL MODULE: ./src/service/messages.ts
|
|
var service_messages = __webpack_require__(9373);
|
|
;// CONCATENATED MODULE: ./src/pages/Messages/Private/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var Privatemodules = ({"flex_box_center":"flex_box_center___N_gPw","flex_space_between":"flex_space_between___f_LaO","flex_box_vertical_center":"flex_box_vertical_center___silBX","flex_box_center_end":"flex_box_center_end___Nt5TD","flex_box_column":"flex_box_column___xc67X","tabs":"tabs___JYWDM","active":"active___siUX9","list":"list___IZLen","tags":"tags___V_Bdb","searchWrp":"searchWrp___MhTxO","newlight":"newlight___pybQh"});
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
;// CONCATENATED MODULE: ./src/pages/Messages/Private/components/WriteMessage.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var PublishShixun = function PublishShixun(_ref) {
|
|
var _data$users;
|
|
var messages = _ref.messages,
|
|
loading = _ref.loading,
|
|
user = _ref.user,
|
|
dispatch = _ref.dispatch;
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
var location = (0,_umi_production_exports.useLocation)();
|
|
var actionTabs = messages.actionTabs;
|
|
var _Form$useForm = es_form/* default */.Z.useForm(),
|
|
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
|
form = _Form$useForm2[0];
|
|
var recentContacts = messages.recentContacts;
|
|
var _useState = (0,_react_17_0_2_react.useState)(''),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
keyword = _useState2[0],
|
|
setKeyword = _useState2[1];
|
|
var _useState3 = (0,_react_17_0_2_react.useState)([]),
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
data = _useState4[0],
|
|
setData = _useState4[1];
|
|
var _useState5 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
showSearch = _useState6[0],
|
|
setShowSearch = _useState6[1];
|
|
var _useState7 = (0,_react_17_0_2_react.useState)(),
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
selectUser = _useState8[0],
|
|
setSelectUser = _useState8[1];
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
if (messages.actionTabs.key === '写私信') getData();
|
|
}, [messages.actionTabs.key]);
|
|
var getData = /*#__PURE__*/function () {
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
var _user$userInfo;
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
_context.next = 2;
|
|
return dispatch({
|
|
type: 'messages/getRecentContacts',
|
|
payload: {
|
|
id: user === null || user === void 0 || (_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.user_id,
|
|
keyword: keyword
|
|
}
|
|
});
|
|
case 2:
|
|
res = _context.sent;
|
|
setData(objectSpread2_default()({}, res));
|
|
case 4:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return function getData() {
|
|
return _ref2.apply(this, arguments);
|
|
};
|
|
}();
|
|
var getData2 = /*#__PURE__*/function () {
|
|
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
case 0:
|
|
if (!(keyword !== '')) {
|
|
_context2.next = 5;
|
|
break;
|
|
}
|
|
_context2.next = 3;
|
|
return dispatch({
|
|
type: 'messages/getUsersForPrivateMessages',
|
|
payload: {
|
|
keyword: keyword
|
|
}
|
|
});
|
|
case 3:
|
|
res = _context2.sent;
|
|
setData(objectSpread2_default()({}, res));
|
|
case 5:
|
|
case "end":
|
|
return _context2.stop();
|
|
}
|
|
}, _callee2);
|
|
}));
|
|
return function getData2() {
|
|
return _ref3.apply(this, arguments);
|
|
};
|
|
}();
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
getData2();
|
|
}, [keyword]);
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
|
centered: true,
|
|
title: "\u5199\u79C1\u4FE1",
|
|
open: messages.actionTabs.key === '写私信' ? true : false,
|
|
okText: "\u786E\u5B9A",
|
|
cancelText: "\u53D6\u6D88",
|
|
bodyStyle: {
|
|
height: 320
|
|
},
|
|
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
var _user$userInfo2;
|
|
var formValue, fetchUrl, res, _user$userInfo3, _res$private_message;
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
case 0:
|
|
_context3.next = 2;
|
|
return form.validateFields();
|
|
case 2:
|
|
formValue = form.getFieldValue();
|
|
fetchUrl = "/api/course_modules/".concat(params.categoryId, "/add_second_category.json");
|
|
_context3.next = 6;
|
|
return (0,service_messages/* postPrivateMessages */.w0)({
|
|
content: formValue.content,
|
|
target_id: selectUser,
|
|
userId: user === null || user === void 0 || (_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.user_id
|
|
});
|
|
case 6:
|
|
res = _context3.sent;
|
|
if (res.status === 0) {
|
|
message/* default */.ZP.success('添加成功');
|
|
dispatch({
|
|
type: 'messages/setActionTabs',
|
|
payload: {}
|
|
});
|
|
_umi_production_exports.history.push("/messages/".concat(user === null || user === void 0 || (_user$userInfo3 = user.userInfo) === null || _user$userInfo3 === void 0 ? void 0 : _user$userInfo3.login, "/message_detail?target_ids=").concat(res === null || res === void 0 || (_res$private_message = res.private_message) === null || _res$private_message === void 0 ? void 0 : _res$private_message.receiver_id));
|
|
}
|
|
case 8:
|
|
case "end":
|
|
return _context3.stop();
|
|
}
|
|
}, _callee3);
|
|
})),
|
|
onCancel: function onCancel() {
|
|
dispatch({
|
|
type: 'messages/setActionTabs',
|
|
payload: {}
|
|
});
|
|
},
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
|
|
form: form,
|
|
initialValues: defineProperty_default()({}, 'name', ""),
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
name: "users",
|
|
rules: [{
|
|
required: true,
|
|
message: "请选择发送对象"
|
|
}],
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.Search, {
|
|
onFocus: function onFocus() {
|
|
return setShowSearch(true);
|
|
},
|
|
onSearch: function onSearch(value) {
|
|
setKeyword(value);
|
|
},
|
|
placeholder: "\u53D1\u9001\u7ED9..."
|
|
})
|
|
}), showSearch && /*#__PURE__*/(0,jsx_runtime.jsx)(skeleton/* default */.Z, {
|
|
loading: loading['messages/getUsersForPrivateMessages'],
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
className: Privatemodules.searchWrp,
|
|
style: {
|
|
maxHeight: 260,
|
|
overflow: "auto"
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
className: "c-light-black mt10",
|
|
children: keyword === '' ? '最近联系人' : "搜索结果"
|
|
}), data === null || data === void 0 || (_data$users = data.users) === null || _data$users === void 0 ? void 0 : _data$users.map(function (item, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
align: "middle",
|
|
className: "mt15 current",
|
|
onClick: function onClick() {
|
|
setSelectUser(item.id);
|
|
form.setFieldsValue({
|
|
users: item.name
|
|
});
|
|
setShowSearch(false);
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
flex: "58px",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
style: {
|
|
width: 48,
|
|
borderRadius: 48
|
|
},
|
|
src: env/* default */.Z.IMG_SERVER + '/images/' + (item === null || item === void 0 ? void 0 : item.image_url),
|
|
alt: ""
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
children: item.name
|
|
})]
|
|
}, index);
|
|
})]
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
rules: [{
|
|
required: true,
|
|
message: "请输入发送内容"
|
|
}],
|
|
className: showSearch && 'hide',
|
|
name: "content",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.TextArea, {
|
|
rows: 10,
|
|
maxLength: 200
|
|
})
|
|
})]
|
|
})
|
|
});
|
|
};
|
|
/* harmony default export */ var WriteMessage = ((0,_umi_production_exports.connect)(function (_ref6) {
|
|
var messages = _ref6.messages,
|
|
loading = _ref6.loading,
|
|
user = _ref6.user;
|
|
return {
|
|
messages: messages,
|
|
user: user,
|
|
loading: loading.effects
|
|
};
|
|
})(PublishShixun));
|
|
// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx + 1 modules
|
|
var RenderHtml = __webpack_require__(41977);
|
|
// EXTERNAL MODULE: ./src/pages/Messages/component/LeftNav.tsx + 1 modules
|
|
var LeftNav = __webpack_require__(73375);
|
|
;// CONCATENATED MODULE: ./src/pages/Messages/Private/index.tsx
|
|
|
|
|
|
|
|
var _excluded = ["messages", "globalSetting", "loading", "user", "dispatch"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var SubMenu = menu/* default */.Z.SubMenu;
|
|
var Sider = layout/* default */.Z.Sider,
|
|
Content = layout/* default */.Z.Content;
|
|
var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
var _privateMessage$priva, _privateMessage$priva2;
|
|
var messages = _ref.messages,
|
|
globalSetting = _ref.globalSetting,
|
|
loading = _ref.loading,
|
|
user = _ref.user,
|
|
dispatch = _ref.dispatch,
|
|
props = objectWithoutProperties_default()(_ref, _excluded);
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
var userInfo = user.userInfo;
|
|
var tidingsList = messages.tidingsList,
|
|
privateMessage = messages.privateMessage;
|
|
var _useState = (0,_react_17_0_2_react.useState)({
|
|
per_page: 10,
|
|
page: 1
|
|
}),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
bodyParams = _useState2[0],
|
|
setBodyParams = _useState2[1];
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
bodyParams.page = 1;
|
|
getData();
|
|
}, [params.userId]);
|
|
var getData = function getData() {
|
|
dispatch({
|
|
type: 'messages/getPrivateMessages',
|
|
payload: objectSpread2_default()(objectSpread2_default()({}, bodyParams), params)
|
|
});
|
|
};
|
|
var toDetail = function toDetail(item) {
|
|
var _user$userInfo, _item$target;
|
|
props.history.push("/messages/".concat(user === null || user === void 0 || (_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.login, "/message_detail?target_ids=").concat(item === null || item === void 0 || (_item$target = item.target) === null || _item$target === void 0 ? void 0 : _item$target.id));
|
|
};
|
|
var toUser = function toUser(item) {
|
|
var _item$target2;
|
|
props.history.push("/users/".concat(item === null || item === void 0 || (_item$target2 = item.target) === null || _item$target2 === void 0 ? void 0 : _item$target2.login));
|
|
};
|
|
var privateMessageAuth = (0,_react_17_0_2_react.useMemo)(function () {
|
|
return (userInfo === null || userInfo === void 0 ? void 0 : userInfo.is_teacher) && (userInfo === null || userInfo === void 0 ? void 0 : userInfo.professional_certification);
|
|
}, [userInfo]);
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
className: Privatemodules.bg,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("section", {
|
|
className: "edu-container mt20",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
gutter: [20, 20],
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(LeftNav/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
flex: "1",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
className: "bg-white",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
className: "pt30 pl30 pr30 font16",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
flex: "1",
|
|
children: "\u5168\u90E8\u79C1\u4FE1"
|
|
}), privateMessageAuth && /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-blue current",
|
|
onClick: function onClick() {
|
|
var _user$userInfo2;
|
|
dispatch({
|
|
type: 'messages/setActionTabs',
|
|
payload: {
|
|
key: '写私信',
|
|
bodyParams: objectSpread2_default()(objectSpread2_default()({}, bodyParams), {}, {
|
|
user_id: user === null || user === void 0 || (_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.user_id
|
|
})
|
|
}
|
|
});
|
|
},
|
|
children: "\u5199\u79C1\u4FE1"
|
|
})
|
|
})]
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
className: Privatemodules.list,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(skeleton/* default */.Z, {
|
|
active: true,
|
|
avatar: {
|
|
size: 40
|
|
},
|
|
paragraph: {
|
|
rows: 5
|
|
},
|
|
loading: loading['messages/getPrivateMessages'],
|
|
children: [!(privateMessage !== null && privateMessage !== void 0 && (_privateMessage$priva = privateMessage.private_messages) !== null && _privateMessage$priva !== void 0 && _privateMessage$priva.length) && /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {}), privateMessage === null || privateMessage === void 0 || (_privateMessage$priva2 = privateMessage.private_messages) === null || _privateMessage$priva2 === void 0 ? void 0 : _privateMessage$priva2.map(function (item, index) {
|
|
var _item$target3, _item$target4;
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
flex: "58px",
|
|
onClick: function onClick() {
|
|
return toUser(item);
|
|
},
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
src: env/* default */.Z.IMG_SERVER + '/images/' + (item === null || item === void 0 || (_item$target3 = item.target) === null || _item$target3 === void 0 ? void 0 : _item$target3.image_url),
|
|
alt: ""
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
flex: 1,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
span: 24,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
flex: "1",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
onClick: function onClick() {
|
|
return toUser(item);
|
|
},
|
|
children: item === null || item === void 0 || (_item$target4 = item.target) === null || _item$target4 === void 0 ? void 0 : _item$target4.name
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "ml15",
|
|
children: "\u4E0E\u4F60\u7684\u79C1\u4FE1"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
className: "c-light-black mr15",
|
|
children: ["[", item === null || item === void 0 ? void 0 : item.message_count, "\u6761]"]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "ml15 c-light-black",
|
|
children: dayjs_min_default()(item.send_time).fromNow()
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
children: (item === null || item === void 0 ? void 0 : item.unread) && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: Privatemodules.newlight
|
|
})
|
|
})]
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
span: 24,
|
|
onClick: function onClick() {
|
|
return toDetail(item);
|
|
},
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: "mt15",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
value: item.content || ''
|
|
})
|
|
})
|
|
})]
|
|
})
|
|
})]
|
|
})
|
|
});
|
|
})]
|
|
})
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
className: "tc mt20",
|
|
children: !loading['messages/getTidings'] && /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
|
|
hideOnSinglePage: true,
|
|
showSizeChanger: false,
|
|
onChange: function onChange(page) {
|
|
bodyParams.page = page;
|
|
setBodyParams(objectSpread2_default()({}, bodyParams));
|
|
getData();
|
|
},
|
|
current: bodyParams.page || 1,
|
|
total: privateMessage === null || privateMessage === void 0 ? void 0 : privateMessage.count
|
|
})
|
|
})]
|
|
})]
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(WriteMessage, {})]
|
|
});
|
|
};
|
|
/* harmony default export */ var Private = ((0,_umi_production_exports.connect)(function (_ref2) {
|
|
var messages = _ref2.messages,
|
|
loading = _ref2.loading,
|
|
user = _ref2.user,
|
|
globalSetting = _ref2.globalSetting;
|
|
return {
|
|
messages: messages,
|
|
globalSetting: globalSetting,
|
|
user: user,
|
|
loading: loading.effects
|
|
};
|
|
})(ShixunsListPage));
|
|
|
|
/***/ }),
|
|
|
|
/***/ 73375:
|
|
/*!**************************************************************!*\
|
|
!*** ./src/pages/Messages/component/LeftNav.tsx + 1 modules ***!
|
|
\**************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: function() { return /* binding */ LeftNav; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js
|
|
var objectSpread2 = __webpack_require__(82242);
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js
|
|
var slicedToArray = __webpack_require__(79800);
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectWithoutProperties.js
|
|
var objectWithoutProperties = __webpack_require__(39647);
|
|
var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
|
|
// 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 + 15 modules
|
|
var _umi_production_exports = __webpack_require__(58308);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/menu/index.js + 11 modules
|
|
var menu = __webpack_require__(20834);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/layout/index.js
|
|
var layout = __webpack_require__(44000);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/col/index.js
|
|
var col = __webpack_require__(43604);
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
var env = __webpack_require__(80548);
|
|
;// CONCATENATED MODULE: ./src/pages/Messages/component/LeftNav.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var LeftNavmodules = ({"flex_box_center":"flex_box_center___cQVhO","flex_space_between":"flex_space_between___L36a6","flex_box_vertical_center":"flex_box_vertical_center___sIHwG","flex_box_center_end":"flex_box_center_end___OqNyE","flex_box_column":"flex_box_column___Ct7XG","userInfo":"userInfo____uyMZ","navInfo":"navInfo___acXs6","actived":"actived___WhZza","newTip":"newTip___Jdd6B"});
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
;// CONCATENATED MODULE: ./src/pages/Messages/component/LeftNav.tsx
|
|
|
|
|
|
|
|
var _excluded = ["messages", "globalSetting", "loading", "user", "dispatch"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var SubMenu = menu/* default */.Z.SubMenu;
|
|
var Sider = layout/* default */.Z.Sider,
|
|
Content = layout/* default */.Z.Content;
|
|
var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
var messages = _ref.messages,
|
|
globalSetting = _ref.globalSetting,
|
|
loading = _ref.loading,
|
|
user = _ref.user,
|
|
dispatch = _ref.dispatch,
|
|
props = objectWithoutProperties_default()(_ref, _excluded);
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
var userInfo = user.userInfo;
|
|
var location = (0,_umi_production_exports.useLocation)();
|
|
var tidingsList = messages.tidingsList,
|
|
privateMessage = messages.privateMessage,
|
|
unreadInfo = messages.unreadInfo;
|
|
var _useState = (0,_react_17_0_2_react.useState)({
|
|
per_page: 10,
|
|
page: 1
|
|
}),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
bodyParams = _useState2[0],
|
|
setBodyParams = _useState2[1];
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
getData();
|
|
}, [params.userId]);
|
|
var getData = function getData() {
|
|
dispatch({
|
|
type: 'messages/unreadMessageInfo',
|
|
payload: objectSpread2_default()(objectSpread2_default()({}, bodyParams), params)
|
|
});
|
|
};
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
flex: "264px",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
className: LeftNavmodules.userInfo,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
className: "mt40",
|
|
src: env/* default */.Z.IMG_SERVER + '/images/' + (userInfo === null || userInfo === void 0 ? void 0 : userInfo.image_url)
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
className: "font24 mt10",
|
|
children: userInfo === null || userInfo === void 0 ? void 0 : userInfo.username
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
className: "mt20",
|
|
children: userInfo === null || userInfo === void 0 ? void 0 : userInfo.user_identity
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("ul", {
|
|
className: LeftNavmodules.navInfo,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
to: "/messages/".concat(userInfo === null || userInfo === void 0 ? void 0 : userInfo.login, "/user_tidings"),
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
className: location.pathname.indexOf("user_tidings") > -1 && LeftNavmodules.actived,
|
|
children: ["\u6D88\u606F", !!(unreadInfo !== null && unreadInfo !== void 0 && unreadInfo.unread_tiding_count) && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: LeftNavmodules.newTip,
|
|
children: unreadInfo === null || unreadInfo === void 0 ? void 0 : unreadInfo.unread_tiding_count
|
|
})]
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
to: "/messages/".concat(userInfo === null || userInfo === void 0 ? void 0 : userInfo.login, "/private_messages"),
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
className: (location.pathname.indexOf("private_messages") > -1 || location.pathname.indexOf("message_detail") > -1) && LeftNavmodules.actived,
|
|
children: ["\u79C1\u4FE1", !!(unreadInfo !== null && unreadInfo !== void 0 && unreadInfo.unread_message_count) && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: LeftNavmodules.newTip,
|
|
children: unreadInfo === null || unreadInfo === void 0 ? void 0 : unreadInfo.unread_message_count
|
|
})]
|
|
})
|
|
})]
|
|
})]
|
|
});
|
|
};
|
|
/* harmony default export */ var LeftNav = ((0,_umi_production_exports.connect)(function (_ref2) {
|
|
var messages = _ref2.messages,
|
|
loading = _ref2.loading,
|
|
user = _ref2.user,
|
|
globalSetting = _ref2.globalSetting;
|
|
return {
|
|
messages: messages,
|
|
globalSetting: globalSetting,
|
|
user: user,
|
|
loading: loading.effects
|
|
};
|
|
})(ShixunsListPage));
|
|
|
|
/***/ }),
|
|
|
|
/***/ 28103:
|
|
/*!***********************************************************************!*\
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/divider/index.js + 1 modules ***!
|
|
\***********************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: function() { return /* binding */ divider; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
|
|
var _classnames_2_5_1_classnames = __webpack_require__(92310);
|
|
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
|
|
var context = __webpack_require__(36355);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/index.js
|
|
var style = __webpack_require__(17313);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js
|
|
var genComponentStyleHook = __webpack_require__(83116);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/statistic.js
|
|
var statistic = __webpack_require__(37613);
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/divider/style/index.js
|
|
|
|
|
|
// ============================== Shared ==============================
|
|
const genSharedDividerStyle = token => {
|
|
const {
|
|
componentCls,
|
|
sizePaddingEdgeHorizontal,
|
|
colorSplit,
|
|
lineWidth,
|
|
textPaddingInline,
|
|
orientationMargin,
|
|
verticalMarginInline
|
|
} = token;
|
|
return {
|
|
[componentCls]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
|
|
borderBlockStart: `${lineWidth}px solid ${colorSplit}`,
|
|
// vertical
|
|
'&-vertical': {
|
|
position: 'relative',
|
|
top: '-0.06em',
|
|
display: 'inline-block',
|
|
height: '0.9em',
|
|
marginInline: verticalMarginInline,
|
|
marginBlock: 0,
|
|
verticalAlign: 'middle',
|
|
borderTop: 0,
|
|
borderInlineStart: `${lineWidth}px solid ${colorSplit}`
|
|
},
|
|
'&-horizontal': {
|
|
display: 'flex',
|
|
clear: 'both',
|
|
width: '100%',
|
|
minWidth: '100%',
|
|
margin: `${token.dividerHorizontalGutterMargin}px 0`
|
|
},
|
|
[`&-horizontal${componentCls}-with-text`]: {
|
|
display: 'flex',
|
|
alignItems: 'center',
|
|
margin: `${token.dividerHorizontalWithTextGutterMargin}px 0`,
|
|
color: token.colorTextHeading,
|
|
fontWeight: 500,
|
|
fontSize: token.fontSizeLG,
|
|
whiteSpace: 'nowrap',
|
|
textAlign: 'center',
|
|
borderBlockStart: `0 ${colorSplit}`,
|
|
'&::before, &::after': {
|
|
position: 'relative',
|
|
width: '50%',
|
|
borderBlockStart: `${lineWidth}px solid transparent`,
|
|
// Chrome not accept `inherit` in `border-top`
|
|
borderBlockStartColor: 'inherit',
|
|
borderBlockEnd: 0,
|
|
transform: 'translateY(50%)',
|
|
content: "''"
|
|
}
|
|
},
|
|
[`&-horizontal${componentCls}-with-text-left`]: {
|
|
'&::before': {
|
|
width: `${orientationMargin * 100}%`
|
|
},
|
|
'&::after': {
|
|
width: `${100 - orientationMargin * 100}%`
|
|
}
|
|
},
|
|
[`&-horizontal${componentCls}-with-text-right`]: {
|
|
'&::before': {
|
|
width: `${100 - orientationMargin * 100}%`
|
|
},
|
|
'&::after': {
|
|
width: `${orientationMargin * 100}%`
|
|
}
|
|
},
|
|
[`${componentCls}-inner-text`]: {
|
|
display: 'inline-block',
|
|
paddingBlock: 0,
|
|
paddingInline: textPaddingInline
|
|
},
|
|
'&-dashed': {
|
|
background: 'none',
|
|
borderColor: colorSplit,
|
|
borderStyle: 'dashed',
|
|
borderWidth: `${lineWidth}px 0 0`
|
|
},
|
|
[`&-horizontal${componentCls}-with-text${componentCls}-dashed`]: {
|
|
'&::before, &::after': {
|
|
borderStyle: 'dashed none none'
|
|
}
|
|
},
|
|
[`&-vertical${componentCls}-dashed`]: {
|
|
borderInlineStartWidth: lineWidth,
|
|
borderInlineEnd: 0,
|
|
borderBlockStart: 0,
|
|
borderBlockEnd: 0
|
|
},
|
|
[`&-plain${componentCls}-with-text`]: {
|
|
color: token.colorText,
|
|
fontWeight: 'normal',
|
|
fontSize: token.fontSize
|
|
},
|
|
[`&-horizontal${componentCls}-with-text-left${componentCls}-no-default-orientation-margin-left`]: {
|
|
'&::before': {
|
|
width: 0
|
|
},
|
|
'&::after': {
|
|
width: '100%'
|
|
},
|
|
[`${componentCls}-inner-text`]: {
|
|
paddingInlineStart: sizePaddingEdgeHorizontal
|
|
}
|
|
},
|
|
[`&-horizontal${componentCls}-with-text-right${componentCls}-no-default-orientation-margin-right`]: {
|
|
'&::before': {
|
|
width: '100%'
|
|
},
|
|
'&::after': {
|
|
width: 0
|
|
},
|
|
[`${componentCls}-inner-text`]: {
|
|
paddingInlineEnd: sizePaddingEdgeHorizontal
|
|
}
|
|
}
|
|
})
|
|
};
|
|
};
|
|
// ============================== Export ==============================
|
|
/* harmony default export */ var divider_style = ((0,genComponentStyleHook/* default */.Z)('Divider', token => {
|
|
const dividerToken = (0,statistic/* merge */.TS)(token, {
|
|
dividerHorizontalWithTextGutterMargin: token.margin,
|
|
dividerHorizontalGutterMargin: token.marginLG,
|
|
sizePaddingEdgeHorizontal: 0
|
|
});
|
|
return [genSharedDividerStyle(dividerToken)];
|
|
}, token => ({
|
|
textPaddingInline: '1em',
|
|
orientationMargin: 0.05,
|
|
verticalMarginInline: token.marginXS
|
|
})));
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/divider/index.js
|
|
"use client";
|
|
|
|
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
var t = {};
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
}
|
|
return t;
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const Divider = props => {
|
|
const {
|
|
getPrefixCls,
|
|
direction,
|
|
divider
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
const {
|
|
prefixCls: customizePrefixCls,
|
|
type = 'horizontal',
|
|
orientation = 'center',
|
|
orientationMargin,
|
|
className,
|
|
rootClassName,
|
|
children,
|
|
dashed,
|
|
plain,
|
|
style
|
|
} = props,
|
|
restProps = __rest(props, ["prefixCls", "type", "orientation", "orientationMargin", "className", "rootClassName", "children", "dashed", "plain", "style"]);
|
|
const prefixCls = getPrefixCls('divider', customizePrefixCls);
|
|
const [wrapSSR, hashId] = divider_style(prefixCls);
|
|
const orientationPrefix = orientation.length > 0 ? `-${orientation}` : orientation;
|
|
const hasChildren = !!children;
|
|
const hasCustomMarginLeft = orientation === 'left' && orientationMargin != null;
|
|
const hasCustomMarginRight = orientation === 'right' && orientationMargin != null;
|
|
const classString = _classnames_2_5_1_classnames_default()(prefixCls, divider === null || divider === void 0 ? void 0 : divider.className, hashId, `${prefixCls}-${type}`, {
|
|
[`${prefixCls}-with-text`]: hasChildren,
|
|
[`${prefixCls}-with-text${orientationPrefix}`]: hasChildren,
|
|
[`${prefixCls}-dashed`]: !!dashed,
|
|
[`${prefixCls}-plain`]: !!plain,
|
|
[`${prefixCls}-rtl`]: direction === 'rtl',
|
|
[`${prefixCls}-no-default-orientation-margin-left`]: hasCustomMarginLeft,
|
|
[`${prefixCls}-no-default-orientation-margin-right`]: hasCustomMarginRight
|
|
}, className, rootClassName);
|
|
const memoizedOrientationMargin = _react_17_0_2_react.useMemo(() => {
|
|
if (typeof orientationMargin === 'number') {
|
|
return orientationMargin;
|
|
}
|
|
if (/^\d+$/.test(orientationMargin)) {
|
|
return Number(orientationMargin);
|
|
}
|
|
return orientationMargin;
|
|
}, [orientationMargin]);
|
|
const innerStyle = Object.assign(Object.assign({}, hasCustomMarginLeft && {
|
|
marginLeft: memoizedOrientationMargin
|
|
}), hasCustomMarginRight && {
|
|
marginRight: memoizedOrientationMargin
|
|
});
|
|
// Warning children not work in vertical mode
|
|
if (false) {}
|
|
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement("div", Object.assign({
|
|
className: classString,
|
|
style: Object.assign(Object.assign({}, divider === null || divider === void 0 ? void 0 : divider.style), style)
|
|
}, restProps, {
|
|
role: "separator"
|
|
}), children && type !== 'vertical' && /*#__PURE__*/_react_17_0_2_react.createElement("span", {
|
|
className: `${prefixCls}-inner-text`,
|
|
style: innerStyle
|
|
}, children)));
|
|
};
|
|
if (false) {}
|
|
/* harmony default export */ var divider = (Divider);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 44000:
|
|
/*!**********************************************************!*\
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/layout/index.js ***!
|
|
\**********************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony import */ var _layout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./layout */ 84966);
|
|
/* harmony import */ var _Sider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Sider */ 37534);
|
|
"use client";
|
|
|
|
|
|
|
|
const Layout = _layout__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP;
|
|
Layout.Header = _layout__WEBPACK_IMPORTED_MODULE_0__/* .Header */ .h4;
|
|
Layout.Footer = _layout__WEBPACK_IMPORTED_MODULE_0__/* .Footer */ .$_;
|
|
Layout.Content = _layout__WEBPACK_IMPORTED_MODULE_0__/* .Content */ .VY;
|
|
Layout.Sider = _Sider__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z;
|
|
/* harmony default export */ __webpack_exports__.Z = (Layout);
|
|
|
|
/***/ })
|
|
|
|
}]); |