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.
1680 lines
89 KiB
1680 lines
89 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[47456],{
|
|
|
|
/***/ 48243:
|
|
/*!**********************************************************!*\
|
|
!*** ./src/pages/Practices/Detail/index.tsx + 4 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 */ Detail; }
|
|
});
|
|
|
|
// 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/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/_@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/_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__(88271);
|
|
// 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/spin/index.js + 1 modules
|
|
var spin = __webpack_require__(71418);
|
|
// 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-number/index.js + 14 modules
|
|
var input_number = __webpack_require__(5871);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 3 modules
|
|
var input = __webpack_require__(92832);
|
|
;// CONCATENATED MODULE: ./src/pages/Practices/Detail/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var Detailmodules = ({"flex_box_center":"flex_box_center___pvwAs","flex_space_between":"flex_space_between___WENga","flex_box_vertical_center":"flex_box_vertical_center___PDgj7","flex_box_center_end":"flex_box_center_end___zSf4b","flex_box_column":"flex_box_column____ALcs","flex-col":"flex-col___qNcgS","flex-row":"flex-row___qMYEn","justify-start":"justify-start___T0Cc7","justify-center":"justify-center___yqoTw","justify-end":"justify-end___uDvNm","justify-evenly":"justify-evenly___aON91","justify-around":"justify-around___KOXPc","justify-between":"justify-between____taWK","align-start":"align-start___ajIbz","align-center":"align-center___u5mve","align-end":"align-end___MxPdW","bg":"bg___brs55","wrap":"wrap___VkDWC","bottomContent":"bottomContent___qli0g","user_img":"user_img___yA6GZ","user_name":"user_name___fDNxi","time":"time___TE_sQ","buttonItem":"buttonItem___pIFcH","table_name":"table_name___FeYdL","content":"content___Trgvx","addTypeRadio":"addTypeRadio___oCzQf","addBtn":"addBtn___pn01U","shixunTooltip":"shixunTooltip___viZXd","pageStyle":"pageStyle___C3kVx","pageCan":"pageCan___MZgjz","pageUnCan":"pageUnCan___obXd6","dropList":"dropList___fOFvo","dropName":"dropName___WzJBJ","all_box":"all_box___o3wIk","right":"right___GkFBu","search-bar":"search-bar___B51SX","MenuStyles":"MenuStyles___LeGs0","MenuStylesItem":"MenuStylesItem___EIVSY","MenuStylesItemActive":"MenuStylesItemActive___jBgxf","ContentStyles":"ContentStyles___iEk1T","container":"container___vfIuH","messageItem":"messageItem___erT6o","topContent":"topContent___Csng8","btns":"btns___tY56n","messageStatus":"messageStatus___iYO3x","status":"status___EO2D5","resolved":"resolved___GOGVd","unresolved":"unresolved___fO99b","messageTitle":"messageTitle___N91L6","messageInfo":"messageInfo___MbNuP","text":"text___ZVhok"});
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/toConsumableArray.js
|
|
var toConsumableArray = __webpack_require__(37205);
|
|
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
var env = __webpack_require__(69423);
|
|
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.13@dayjs/dayjs.min.js
|
|
var dayjs_min = __webpack_require__(61186);
|
|
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
|
|
// EXTERNAL MODULE: ./src/components/markdown-editor/index.tsx + 10 modules
|
|
var markdown_editor = __webpack_require__(92042);
|
|
// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx + 2 modules
|
|
var RenderHtml = __webpack_require__(85681);
|
|
// 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/tooltip/index.js + 3 modules
|
|
var tooltip = __webpack_require__(6848);
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/DeleteOutlined.js + 1 modules
|
|
var DeleteOutlined = __webpack_require__(26227);
|
|
;// CONCATENATED MODULE: ./src/pages/Practices/Detail/Comment/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var Commentmodules = ({"flex_box_center":"flex_box_center___nQ7eW","flex_space_between":"flex_space_between___dMN6l","flex_box_vertical_center":"flex_box_vertical_center___TWpmy","flex_box_center_end":"flex_box_center_end___Fwxti","flex_box_column":"flex_box_column___AN1uY","flex-col":"flex-col___eSFHS","flex-row":"flex-row___DVEoK","justify-start":"justify-start___o3F5O","justify-center":"justify-center___uqs2N","justify-end":"justify-end___NQGXf","justify-evenly":"justify-evenly___iNsrE","justify-around":"justify-around___tdtOR","justify-between":"justify-between___LzXoR","align-start":"align-start___tTnFf","align-center":"align-center___cQDip","align-end":"align-end___sOPV_","reply":"reply___rli0J","replyList":"replyList___jIvxt","comment":"comment___qOVEL","content":"content___X6mMQ","commentItem":"commentItem___tXMv_","commentParItem":"commentParItem___c0o7J","commentContent":"commentContent___uNfSU","replyFooter":"replyFooter___xkI0j","cancelStyle":"cancelStyle___V1JRO","submitStyle":"submitStyle____Ri7Y"});
|
|
// EXTERNAL MODULE: ./src/service/forums.ts
|
|
var forums = __webpack_require__(35891);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
;// CONCATENATED MODULE: ./src/pages/Practices/Detail/Comment/components/Second.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dayjs_min_default().locale("ZH-cn");
|
|
function second(_ref) {
|
|
var user = _ref.user,
|
|
_ref$vlist = _ref.vlist,
|
|
vlist = _ref$vlist === void 0 ? [] : _ref$vlist,
|
|
dispatch = _ref.dispatch,
|
|
params = _ref.params,
|
|
id = _ref.id,
|
|
memo_replies = _ref.memo_replies,
|
|
forumsDetail = _ref.forumsDetail;
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
className: Commentmodules.comment,
|
|
children: vlist.map(function (val, key) {
|
|
var _user$userInfo, _user$userInfo2;
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
className: Commentmodules.commentItem,
|
|
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)("a", {
|
|
href: "/users/".concat(val.user_login),
|
|
target: "_blank",
|
|
style: {
|
|
color: '#ffffff',
|
|
fontSize: '20px'
|
|
},
|
|
children: val === null || val === void 0 ? void 0 : val.username
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
marginLeft: '10px'
|
|
},
|
|
children: val === null || val === void 0 ? void 0 : val.user_identity
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: '#ffffff',
|
|
fontSize: '14px',
|
|
marginLeft: '10px'
|
|
},
|
|
children: val.time
|
|
})]
|
|
}), (val.can_delete || val.user_id === ((_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.user_id) || val.user_login === ((_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.login)) && /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
className: "forums-comment-delete",
|
|
style: {
|
|
display: 'none'
|
|
},
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
title: "\u5220\u9664",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(DeleteOutlined/* default */.Z, {
|
|
className: "current",
|
|
onClick: function onClick() {
|
|
modal/* default */.Z.confirm({
|
|
centered: true,
|
|
width: 530,
|
|
okText: '确定',
|
|
cancelText: '取消',
|
|
title: '提示',
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: "font16 tc",
|
|
children: "\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417\uFF1F"
|
|
}),
|
|
onOk: function () {
|
|
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
var res, filterData;
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
_context.next = 2;
|
|
return (0,forums/* deleteForums */.sW)({
|
|
id: val.id
|
|
});
|
|
case 2:
|
|
res = _context.sent;
|
|
filterData = memo_replies.find(function (x) {
|
|
return x.id === id;
|
|
}).children.filter(function (y) {
|
|
return y.id !== val.id;
|
|
});
|
|
memo_replies.find(function (x) {
|
|
return x.id === id;
|
|
}).children = filterData;
|
|
dispatch({
|
|
type: 'forumsDetail/setForumsDetailData',
|
|
payload: objectSpread2_default()(objectSpread2_default()({}, forumsDetail.forumsDetailData), {}, {
|
|
memo_replies: toConsumableArray_default()(memo_replies)
|
|
})
|
|
});
|
|
case 6:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
function onOk() {
|
|
return _onOk.apply(this, arguments);
|
|
}
|
|
return onOk;
|
|
}()
|
|
});
|
|
}
|
|
})
|
|
})
|
|
})]
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
value: val.content,
|
|
style: {
|
|
color: '#ffffff',
|
|
fontSize: '14px'
|
|
}
|
|
})
|
|
})]
|
|
}, key);
|
|
})
|
|
});
|
|
}
|
|
/* harmony default export */ var Second = (second);
|
|
// EXTERNAL MODULE: ./src/service/practices.ts
|
|
var practices = __webpack_require__(90000);
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
var util = __webpack_require__(95972);
|
|
;// CONCATENATED MODULE: ./src/pages/Practices/Detail/Comment/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// import { reply, like, getMoreReply, deleteForums } from '@/service/forums';
|
|
|
|
|
|
|
|
|
|
|
|
dayjs_min_default().locale("ZH-cn");
|
|
var Comment = function Comment(_ref, ref) {
|
|
var user = _ref.user,
|
|
forumsDetail = _ref.forumsDetail,
|
|
globalSetting = _ref.globalSetting,
|
|
loading = _ref.loading,
|
|
dispatch = _ref.dispatch,
|
|
handleClick = _ref.handleClick,
|
|
memoId = _ref.memoId;
|
|
var _ref2 = forumsDetail.forumsDetailData || {},
|
|
memo = _ref2.memo,
|
|
memo_replies = _ref2.memo_replies;
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
var _useState = (0,_react_17_0_2_react.useState)(''),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
value = _useState2[0],
|
|
setValue = _useState2[1];
|
|
var _useState3 = (0,_react_17_0_2_react.useState)(''),
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
childValue = _useState4[0],
|
|
setChildValue = _useState4[1];
|
|
var _useState5 = (0,_react_17_0_2_react.useState)(-1),
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
showItemReply = _useState6[0],
|
|
setShowItemReply = _useState6[1];
|
|
var _useState7 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
hasMore = _useState8[0],
|
|
setHasMore = _useState8[1];
|
|
var _useState9 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
isMdFouch = _useState10[0],
|
|
setIsMdFouch = _useState10[1];
|
|
var _useState11 = (0,_react_17_0_2_react.useState)(1),
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
page = _useState12[0],
|
|
setPage = _useState12[1];
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
setHasMore((memo === null || memo === void 0 ? void 0 : memo.reply_for_memo_count) > 10);
|
|
}, [memo === null || memo === void 0 ? void 0 : memo.reply_for_memo_count]);
|
|
|
|
// useEffect(() => {
|
|
// dispatch({
|
|
// type: 'forumsDetail/getForumsDetailData',
|
|
// payload: { id: memoId }
|
|
// });
|
|
// }, [])
|
|
|
|
var handeGetMoreData = /*#__PURE__*/function () {
|
|
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
var currentPage, res, _res$memo_replies;
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
currentPage = page + 1;
|
|
setPage(currentPage);
|
|
_context.next = 4;
|
|
return (0,practices/* getMoreReply */.z5)({
|
|
id: memoId,
|
|
page: currentPage
|
|
});
|
|
case 4:
|
|
res = _context.sent;
|
|
if (res !== null && res !== void 0 && res.memo_replies) {
|
|
dispatch({
|
|
type: 'forumsDetail/setForumsDetailData',
|
|
payload: objectSpread2_default()(objectSpread2_default()({}, forumsDetail.forumsDetailData), {}, {
|
|
memo_replies: [].concat(toConsumableArray_default()(memo_replies), toConsumableArray_default()(res.memo_replies))
|
|
})
|
|
});
|
|
setHasMore(((_res$memo_replies = res.memo_replies) === null || _res$memo_replies === void 0 ? void 0 : _res$memo_replies.length) === 10);
|
|
}
|
|
case 6:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return function handeGetMoreData() {
|
|
return _ref3.apply(this, arguments);
|
|
};
|
|
}();
|
|
var formatReplieData = function formatReplieData(data) {
|
|
var _user$userInfo, _user$userInfo2, _user$userInfo3, _user$userInfo4;
|
|
return objectSpread2_default()(objectSpread2_default()({}, data), {}, {
|
|
image_url: (_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.image_url,
|
|
children: [],
|
|
user_id: (_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.user_id,
|
|
user_login: (_user$userInfo3 = user.userInfo) === null || _user$userInfo3 === void 0 ? void 0 : _user$userInfo3.login,
|
|
username: (_user$userInfo4 = user.userInfo) === null || _user$userInfo4 === void 0 ? void 0 : _user$userInfo4.username,
|
|
time: "".concat((0,util/* toTimeFormat */.li)((new Date().getTime() - new Date(data.created_at).getTime()) / 1000), "\u524D")
|
|
});
|
|
};
|
|
var showLogin = function showLogin() {
|
|
dispatch({
|
|
type: 'user/showPopLogin',
|
|
payload: {
|
|
showPopLogin: true,
|
|
showClosable: true
|
|
}
|
|
});
|
|
};
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
className: Commentmodules.wrap,
|
|
children: [!!(memo_replies !== null && memo_replies !== void 0 && memo_replies.length) && /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
className: Commentmodules.content,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
className: Commentmodules.replyList,
|
|
children: memo_replies === null || memo_replies === void 0 ? void 0 : memo_replies.map(function (v, k) {
|
|
var _user$userInfo5, _user$userInfo6, _v$children;
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
flex: "40px",
|
|
style: {
|
|
marginRight: '10px'
|
|
},
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
href: "/users/".concat(v.user_login),
|
|
target: "_blank",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
alt: "\u7528\u6237\u5934\u50CF",
|
|
width: "50rem",
|
|
height: "50rem",
|
|
src: "".concat(env/* default */.Z.IMG_SERVER, "/images/").concat(v === null || v === void 0 ? void 0 : v.image_url)
|
|
})
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
flex: "1",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
align: "middle",
|
|
className: Commentmodules.commentParItem,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
span: 24,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
flex: "1",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
display: 'flex',
|
|
alignItems: 'center'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
href: "/users/".concat(v.user_login),
|
|
target: "_blank",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: '#fff',
|
|
fontSize: '20px',
|
|
fontWeight: 600
|
|
},
|
|
children: v === null || v === void 0 ? void 0 : v.username
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
marginLeft: '10px'
|
|
},
|
|
children: v === null || v === void 0 ? void 0 : v.user_identity
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
marginLeft: '10px'
|
|
},
|
|
children: v.time
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
marginLeft: 'auto'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
className: "mr30 current",
|
|
style: {
|
|
display: 'inline-block',
|
|
width: '68px'
|
|
},
|
|
onClick: function onClick() {
|
|
return setShowItemReply(k);
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
className: "icon-zzxy-pinglunhudong",
|
|
style: {
|
|
marginRight: '8px'
|
|
}
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: "\u8BC4\u8BBA"
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
title: v.user_praise ? "取消点赞" : "点赞",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: v.user_praise ? "c-orange" : "c-gery-888",
|
|
style: {
|
|
cursor: 'pointer'
|
|
},
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
className: "iconfont icon-zzxy-dianzan current font16",
|
|
onClick: /*#__PURE__*/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:
|
|
_context2.next = 2;
|
|
return (0,practices/* like */.vL)({
|
|
id: v.id,
|
|
container_type: 'Memo',
|
|
type: v.user_praise ? 0 : 1
|
|
});
|
|
case 2:
|
|
res = _context2.sent;
|
|
if ((res === null || res === void 0 ? void 0 : res.praise_count) >= 0) {
|
|
memo_replies.find(function (x) {
|
|
return x.id === v.id;
|
|
}).user_praise = !v.user_praise;
|
|
memo_replies.find(function (x) {
|
|
return x.id === v.id;
|
|
}).praise_count = res === null || res === void 0 ? void 0 : res.praise_count;
|
|
dispatch({
|
|
type: 'forumsDetail/setForumsDetailData',
|
|
payload: objectSpread2_default()(objectSpread2_default()({}, forumsDetail.forumsDetailData), {}, {
|
|
memo_replies: toConsumableArray_default()(memo_replies)
|
|
})
|
|
});
|
|
}
|
|
case 4:
|
|
case "end":
|
|
return _context2.stop();
|
|
}
|
|
}, _callee2);
|
|
})),
|
|
style: {
|
|
marginRight: '8px'
|
|
}
|
|
})
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
style: {
|
|
display: 'inline-block',
|
|
width: '44px'
|
|
},
|
|
children: [" ", v.praise_count > 0 ? v.praise_count : '']
|
|
})]
|
|
}), (v.can_delete || v.user_id === ((_user$userInfo5 = user.userInfo) === null || _user$userInfo5 === void 0 ? void 0 : _user$userInfo5.user_id) || v.user_login === ((_user$userInfo6 = user.userInfo) === null || _user$userInfo6 === void 0 ? void 0 : _user$userInfo6.login)) &&
|
|
/*#__PURE__*/
|
|
// <Col className="forums-comment-par-delete" style={{ display: 'block' }}>
|
|
(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
title: "\u5220\u9664",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
style: {
|
|
cursor: 'pointer',
|
|
marginLeft: '10px'
|
|
},
|
|
onClick: function onClick() {
|
|
modal/* default */.Z.confirm({
|
|
centered: true,
|
|
width: 530,
|
|
okText: '确定',
|
|
cancelText: '取消',
|
|
title: '提示',
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: "font16 tc",
|
|
children: "\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417\uFF1F"
|
|
}),
|
|
onOk: function () {
|
|
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
var res, filterData;
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
case 0:
|
|
_context3.next = 2;
|
|
return (0,practices/* deleteForums */.sW)({
|
|
id: v.id
|
|
});
|
|
case 2:
|
|
res = _context3.sent;
|
|
filterData = memo_replies.filter(function (y) {
|
|
return y.id !== v.id;
|
|
});
|
|
dispatch({
|
|
type: 'forumsDetail/setForumsDetailData',
|
|
payload: objectSpread2_default()(objectSpread2_default()({}, forumsDetail.forumsDetailData), {}, {
|
|
memo_replies: toConsumableArray_default()(filterData)
|
|
})
|
|
});
|
|
case 5:
|
|
case "end":
|
|
return _context3.stop();
|
|
}
|
|
}, _callee3);
|
|
}));
|
|
function onOk() {
|
|
return _onOk.apply(this, arguments);
|
|
}
|
|
return onOk;
|
|
}()
|
|
});
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
className: "iconfont icon-zzxy-shanchu",
|
|
style: {
|
|
marginRight: '8px'
|
|
}
|
|
}), "\u5220\u9664"]
|
|
})
|
|
})
|
|
// </Col>
|
|
]
|
|
})
|
|
})
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Commentmodules.commentContent,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
onClick: handleClick,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
value: v.content,
|
|
style: {
|
|
color: '#ffffff',
|
|
fontSize: '14px'
|
|
}
|
|
})
|
|
})
|
|
}), !!(v !== null && v !== void 0 && (_v$children = v.children) !== null && _v$children !== void 0 && _v$children.length) && /*#__PURE__*/(0,jsx_runtime.jsx)(Second, {
|
|
user: user,
|
|
id: v === null || v === void 0 ? void 0 : v.id,
|
|
vlist: v === null || v === void 0 ? void 0 : v.children,
|
|
dispatch: dispatch,
|
|
params: params,
|
|
memo_replies: memo_replies,
|
|
forumsDetail: forumsDetail
|
|
}), showItemReply === k && /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
span: 24,
|
|
className: "mt5 c-light-white",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(markdown_editor/* default */.Z, {
|
|
onChange: function onChange(v) {
|
|
setChildValue(v);
|
|
},
|
|
height: 150,
|
|
isFocus: true,
|
|
placeholder: "\u6211\u8981\u56DE\u590D..."
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
span: 24,
|
|
className: "tr",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Commentmodules.replyFooter,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Commentmodules.cancelStyle,
|
|
onClick: function onClick() {
|
|
setChildValue(null);
|
|
setShowItemReply(-1);
|
|
},
|
|
children: "\u53D6\u6D88"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Commentmodules.submitStyle,
|
|
style: {
|
|
marginLeft: '20px'
|
|
},
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4() {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
case 0:
|
|
if (!(childValue === '')) {
|
|
_context4.next = 4;
|
|
break;
|
|
}
|
|
message/* default */.ZP.error('请输入内容');
|
|
_context4.next = 9;
|
|
break;
|
|
case 4:
|
|
_context4.next = 6;
|
|
return (0,practices/* reply */.ts)({
|
|
parent_id: v.id,
|
|
content: childValue
|
|
});
|
|
case 6:
|
|
res = _context4.sent;
|
|
setChildValue(null);
|
|
if (res) {
|
|
setShowItemReply(-1);
|
|
memo_replies.find(function (x) {
|
|
return x.id === res.parent_id;
|
|
}).children.push(formatReplieData(res));
|
|
dispatch({
|
|
type: 'forumsDetail/setForumsDetailData',
|
|
payload: objectSpread2_default()(objectSpread2_default()({}, forumsDetail.forumsDetailData), {}, {
|
|
memo: objectSpread2_default()(objectSpread2_default()({}, memo), {}, {
|
|
reply_for_memo_count: (memo === null || memo === void 0 ? void 0 : memo.reply_for_memo_count) + 1
|
|
}),
|
|
memo_replies: toConsumableArray_default()(memo_replies),
|
|
memo_type: 'specialist_question_record'
|
|
})
|
|
});
|
|
}
|
|
case 9:
|
|
case "end":
|
|
return _context4.stop();
|
|
}
|
|
}, _callee4);
|
|
})),
|
|
children: "\u53D1\u9001"
|
|
})]
|
|
})
|
|
})
|
|
})]
|
|
})
|
|
})]
|
|
})
|
|
})]
|
|
}, k);
|
|
})
|
|
})
|
|
}), hasMore && /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
className: "bg-white pb20",
|
|
style: {
|
|
display: 'flex',
|
|
justifyContent: 'center',
|
|
marginTop: '20px'
|
|
},
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
justify: "space-between",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
children: hasMore && /*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
|
|
style: {
|
|
color: '#3061D0',
|
|
fontSize: '14px'
|
|
},
|
|
onClick: handeGetMoreData,
|
|
children: ["\u67E5\u770B\u66F4\u591A\u8BC4\u8BBA", /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
className: "icon icon-zhankaixiaojiantou ",
|
|
style: {
|
|
fontSize: '10px',
|
|
marginLeft: '3px'
|
|
}
|
|
})]
|
|
})
|
|
})]
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
className: Commentmodules.reply,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(markdown_editor/* default */.Z, {
|
|
onBlur: function onBlur() {
|
|
return setIsMdFouch(false);
|
|
},
|
|
isFocus: isMdFouch,
|
|
defaultValue: value,
|
|
id: "writeForumsReviewId",
|
|
onChange: function onChange(v) {
|
|
setValue(v);
|
|
},
|
|
placeholder: "\u6211\u8981\u56DE\u590D...",
|
|
height: 240
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
flex: "1"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Commentmodules.submitStyle,
|
|
style: {
|
|
textAlign: 'center'
|
|
},
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5() {
|
|
var _user$userInfo7;
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
case 0:
|
|
if (!((user === null || user === void 0 || (_user$userInfo7 = user.userInfo) === null || _user$userInfo7 === void 0 ? void 0 : _user$userInfo7.login) == "")) {
|
|
_context5.next = 3;
|
|
break;
|
|
}
|
|
showLogin();
|
|
return _context5.abrupt("return");
|
|
case 3:
|
|
if (!(value === '')) {
|
|
_context5.next = 7;
|
|
break;
|
|
}
|
|
message/* default */.ZP.error('请输入内容');
|
|
_context5.next = 12;
|
|
break;
|
|
case 7:
|
|
_context5.next = 9;
|
|
return (0,practices/* reply */.ts)({
|
|
parent_id: memo === null || memo === void 0 ? void 0 : memo.id,
|
|
content: value
|
|
});
|
|
case 9:
|
|
res = _context5.sent;
|
|
setValue(null);
|
|
if (res) {
|
|
dispatch({
|
|
type: 'forumsDetail/setForumsDetailData',
|
|
payload: objectSpread2_default()(objectSpread2_default()({}, forumsDetail.forumsDetailData), {}, {
|
|
memo: objectSpread2_default()(objectSpread2_default()({}, memo), {}, {
|
|
reply_for_memo_count: (memo === null || memo === void 0 ? void 0 : memo.reply_for_memo_count) + 1
|
|
}),
|
|
memo_replies: [formatReplieData(res)].concat(toConsumableArray_default()(memo_replies)),
|
|
memo_type: 'specialist_question_record'
|
|
})
|
|
});
|
|
}
|
|
case 12:
|
|
case "end":
|
|
return _context5.stop();
|
|
}
|
|
}, _callee5);
|
|
})),
|
|
children: "\u53D1\u9001"
|
|
})
|
|
})]
|
|
})]
|
|
})]
|
|
});
|
|
};
|
|
/* harmony default export */ var Detail_Comment = ((0,_umi_production_exports.connect)(function (_ref7) {
|
|
var user = _ref7.user,
|
|
forumsDetail = _ref7.forumsDetail,
|
|
loading = _ref7.loading,
|
|
globalSetting = _ref7.globalSetting;
|
|
return {
|
|
user: user,
|
|
forumsDetail: forumsDetail,
|
|
globalSetting: globalSetting,
|
|
loading: loading.models.forumsDetail
|
|
};
|
|
}, null, null, {
|
|
forwardRef: true
|
|
})( /*#__PURE__*/(0,_react_17_0_2_react.forwardRef)(Comment)));
|
|
// EXTERNAL MODULE: ./src/service/counselling.ts
|
|
var counselling = __webpack_require__(39475);
|
|
// EXTERNAL MODULE: ./src/utils/authority.ts
|
|
var authority = __webpack_require__(64118);
|
|
// EXTERNAL MODULE: ./src/components/HeaderNav/index.tsx + 4 modules
|
|
var HeaderNav = __webpack_require__(59827);
|
|
// EXTERNAL MODULE: ./src/pages/Practices/logo.png
|
|
var logo = __webpack_require__(5933);
|
|
// EXTERNAL MODULE: ./src/utils/hooks/useResponsiveFontSize.tsx
|
|
var useResponsiveFontSize = __webpack_require__(9849);
|
|
// EXTERNAL MODULE: ./src/pages/Practices/PracticesModal/index.tsx
|
|
var PracticesModal = __webpack_require__(40395);
|
|
;// CONCATENATED MODULE: ./src/pages/Practices/Detail/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var PollDetail = function PollDetail(_ref) {
|
|
var _user$userInfo, _data$author_info, _user$userInfo2, _data$author_info2, _questionInfo$narrato;
|
|
var polls = _ref.polls,
|
|
globalSetting = _ref.globalSetting,
|
|
loading = _ref.loading,
|
|
dispatch = _ref.dispatch,
|
|
user = _ref.user;
|
|
(0,useResponsiveFontSize/* default */.Z)();
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
var _useSearchParams = (0,_umi_production_exports.useSearchParams)(),
|
|
_useSearchParams2 = slicedToArray_default()(_useSearchParams, 1),
|
|
searchParams = _useSearchParams2[0];
|
|
var _useState = (0,_react_17_0_2_react.useState)({}),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
questionInfo = _useState2[0],
|
|
setQuestionInfo = _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)(true),
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
indexLoading = _useState6[0],
|
|
setIndexLoading = _useState6[1];
|
|
var score = (0,_react_17_0_2_react.useRef)('');
|
|
var _Form$useForm = es_form/* default */.Z.useForm(),
|
|
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
|
form = _Form$useForm2[0];
|
|
var _useState7 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
visible = _useState8[0],
|
|
setVisible = _useState8[1];
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
//获取提问详情
|
|
getInfo();
|
|
}, []);
|
|
var getInfo = /*#__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:
|
|
setIndexLoading(true);
|
|
_context.next = 3;
|
|
return dispatch({
|
|
type: 'forumsDetail/getForumsDetailData',
|
|
payload: {
|
|
id: params === null || params === void 0 ? void 0 : params.id
|
|
}
|
|
});
|
|
case 3:
|
|
res = _context.sent;
|
|
if (res !== null && res !== void 0 && res.memo) {
|
|
setQuestionInfo(res === null || res === void 0 ? void 0 : res.memo);
|
|
setData(res);
|
|
setIndexLoading(false);
|
|
}
|
|
// memos_info({ id: params?.id }).then((res) => {
|
|
// if (res?.memo) {
|
|
// setQuestionInfo(res?.memo)
|
|
// setData(res)
|
|
// setIndexLoading(false)
|
|
// }
|
|
// })
|
|
setIndexLoading(false);
|
|
case 6:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return function getInfo() {
|
|
return _ref2.apply(this, arguments);
|
|
};
|
|
}();
|
|
var is_public = (questionInfo === null || questionInfo === void 0 ? void 0 : questionInfo.hidden) === 0;
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(spin/* default */.Z, {
|
|
spinning: indexLoading,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: "".concat(Detailmodules.all_box, " materials-wrp"),
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(HeaderNav/* default */.Z, {
|
|
goBackUrl: '/practices',
|
|
imgUrl: logo
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Detailmodules.wrap,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Detailmodules.right,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Detailmodules.container,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Detailmodules.messageItem,
|
|
onClick: function onClick() {},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Detailmodules.topContent,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
style: {
|
|
display: 'flex',
|
|
alignItems: 'center'
|
|
},
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Detailmodules.messageTitle,
|
|
children: questionInfo === null || questionInfo === void 0 ? void 0 : questionInfo.subject
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Detailmodules.btns,
|
|
children: [(user === null || user === void 0 || (_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.user_id) == (data === null || data === void 0 || (_data$author_info = data.author_info) === null || _data$author_info === void 0 ? void 0 : _data$author_info.user_id) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Detailmodules.publicStyle,
|
|
style: {
|
|
marginRight: '20rem'
|
|
},
|
|
onClick: function onClick() {
|
|
modal/* default */.Z.confirm({
|
|
centered: true,
|
|
okText: '确定',
|
|
cancelText: '取消',
|
|
title: '提示',
|
|
content: '是否确认删除该活动吗?',
|
|
onOk: function () {
|
|
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
case 0:
|
|
(0,practices/* memos_del */.n)({
|
|
id: params === null || params === void 0 ? void 0 : params.id
|
|
}).then(function (res) {
|
|
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
|
|
message/* default */.ZP.success('删除成功');
|
|
_umi_production_exports.history.push("/practices");
|
|
}
|
|
});
|
|
case 1:
|
|
case "end":
|
|
return _context2.stop();
|
|
}
|
|
}, _callee2);
|
|
}));
|
|
function onOk() {
|
|
return _onOk.apply(this, arguments);
|
|
}
|
|
return onOk;
|
|
}()
|
|
});
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
className: "icon-zzxy-shanchu",
|
|
style: {
|
|
marginTop: '2rem',
|
|
marginRight: '10rem',
|
|
fontSize: '16rem'
|
|
}
|
|
}), "\u5220\u9664"]
|
|
}), ((0,authority/* isSuperAdmins */.Ny)() || (user === null || user === void 0 || (_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.user_id) == (data === null || data === void 0 || (_data$author_info2 = data.author_info) === null || _data$author_info2 === void 0 ? void 0 : _data$author_info2.user_id)) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Detailmodules.publicStyle,
|
|
style: {
|
|
marginRight: '20rem'
|
|
},
|
|
onClick: function onClick() {
|
|
dispatch({
|
|
type: 'account/setActionTabs',
|
|
payload: {
|
|
key: '发布活动'
|
|
}
|
|
});
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
className: "icon-zzxy-bianji",
|
|
style: {
|
|
marginTop: '2rem',
|
|
marginRight: '10rem',
|
|
fontSize: '16rem'
|
|
}
|
|
}), "\u7F16\u8F91"]
|
|
}), (0,authority/* isSuperAdmins */.Ny)() && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Detailmodules.publicStyle,
|
|
style: {
|
|
marginRight: '20rem'
|
|
},
|
|
onClick: function onClick() {
|
|
modal/* default */.Z.confirm({
|
|
centered: true,
|
|
okText: '确定',
|
|
icon: null,
|
|
cancelText: '取消',
|
|
title: '提示',
|
|
content: is_public ? '是否取消公开' : '是否公开',
|
|
onOk: function () {
|
|
var _onOk2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
case 0:
|
|
(0,practices/* memos_status */.rE)({
|
|
id: params === null || params === void 0 ? void 0 : params.id,
|
|
is_public: is_public ? 0 : 1
|
|
}).then(function (res) {
|
|
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
|
|
message/* default */.ZP.success('操作成功');
|
|
getInfo();
|
|
}
|
|
});
|
|
case 1:
|
|
case "end":
|
|
return _context3.stop();
|
|
}
|
|
}, _callee3);
|
|
}));
|
|
function onOk() {
|
|
return _onOk2.apply(this, arguments);
|
|
}
|
|
return onOk;
|
|
}()
|
|
});
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
className: "".concat(is_public ? 'icon-zzxy-quxiaogongkai' : 'icon-zzxy-gongkai'),
|
|
style: {
|
|
marginTop: '2rem',
|
|
marginRight: '10rem',
|
|
fontSize: '16rem'
|
|
}
|
|
}), is_public ? '取消公开' : '公开']
|
|
}), !(questionInfo !== null && questionInfo !== void 0 && questionInfo.is_scoring) && (questionInfo === null || questionInfo === void 0 ? void 0 : questionInfo.has_public_auth) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Detailmodules.publicStyle,
|
|
onClick: function onClick() {
|
|
modal/* default */.Z.confirm({
|
|
centered: true,
|
|
okText: '确定',
|
|
icon: null,
|
|
cancelText: '取消',
|
|
title: '提示',
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
children: "\u5982\u679C\u60A8\u89C9\u5F97\u8BE5\u5B66\u5458\u7684\u63D0\u95EE\u5F88\u6709\u6C34\u5E73\u53EF\u4EE5\u5956\u52B1\u4E00\u5B9A\u7684\u79EF\u5206"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
height: '40rem',
|
|
display: "flex",
|
|
alignItems: 'center',
|
|
marginTop: '10rem'
|
|
},
|
|
children: ["\u5956\u52B1\u79EF\u5206", /*#__PURE__*/(0,jsx_runtime.jsx)(input_number/* default */.Z, {
|
|
size: "large",
|
|
precision: 0,
|
|
min: 0,
|
|
max: 100,
|
|
style: {
|
|
marginLeft: '10rem',
|
|
width: '270rem'
|
|
},
|
|
onChange: function onChange(e) {
|
|
score.current = e;
|
|
}
|
|
})]
|
|
})]
|
|
}),
|
|
onOk: function () {
|
|
var _onOk3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4() {
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
case 0:
|
|
(0,counselling/* specialist_scoring */.yK)({
|
|
score: score.current,
|
|
specialist_question_id: params === null || params === void 0 ? void 0 : params.questionId
|
|
}).then(function (res) {
|
|
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
|
|
message/* default */.ZP.success('给分成功');
|
|
getInfo();
|
|
}
|
|
});
|
|
case 1:
|
|
case "end":
|
|
return _context4.stop();
|
|
}
|
|
}, _callee4);
|
|
}));
|
|
function onOk() {
|
|
return _onOk3.apply(this, arguments);
|
|
}
|
|
return onOk;
|
|
}()
|
|
});
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
className: "icon-zzxy-geifen",
|
|
style: {
|
|
marginTop: '2rem',
|
|
marginRight: '10rem',
|
|
fontSize: '16rem'
|
|
}
|
|
}), "\u7ED9\u5206"]
|
|
})]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Detailmodules.messageInfo,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
children: ["\u89E3\u8BF4\u4EBA", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: Detailmodules.text,
|
|
children: questionInfo === null || questionInfo === void 0 || (_questionInfo$narrato = questionInfo.narrator_users) === null || _questionInfo$narrato === void 0 ? void 0 : _questionInfo$narrato.map(function (e) {
|
|
return e.user_name;
|
|
}).join('、')
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
style: {
|
|
marginLeft: '40rem'
|
|
},
|
|
children: ["\u53C2\u4E0E\u4EBA", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: Detailmodules.text,
|
|
children: questionInfo.participant || '--'
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
style: {
|
|
marginLeft: '40rem'
|
|
},
|
|
children: ["\u63D0\u95EE\u65F6\u95F4", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: Detailmodules.text,
|
|
children: questionInfo !== null && questionInfo !== void 0 && questionInfo.created_at ? dayjs_min_default()(questionInfo === null || questionInfo === void 0 ? void 0 : questionInfo.created_at).format('YYYY-MM-DD HH:mm:ss') : '--'
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
style: {
|
|
marginLeft: '40rem'
|
|
},
|
|
children: ["\u6D4F\u89C8", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: Detailmodules.text,
|
|
children: questionInfo.viewed_count || 0
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
style: {
|
|
marginLeft: '40rem'
|
|
},
|
|
children: ["\u8BC4\u8BBA", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: Detailmodules.text,
|
|
children: questionInfo.replies_count || 0
|
|
})]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
style: {
|
|
fontSize: '14rem',
|
|
color: "#fff",
|
|
marginTop: '6rem'
|
|
},
|
|
value: (questionInfo === null || questionInfo === void 0 ? void 0 : questionInfo.content) || ''
|
|
})]
|
|
}, questionInfo.id), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Detailmodules.content,
|
|
children: (questionInfo === null || questionInfo === void 0 ? void 0 : questionInfo.id) && /*#__PURE__*/(0,jsx_runtime.jsx)(Detail_Comment, {
|
|
memoId: questionInfo === null || questionInfo === void 0 ? void 0 : questionInfo.id
|
|
})
|
|
})]
|
|
})
|
|
})
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
|
centered: true,
|
|
title: "\u7F16\u8F91\u63D0\u95EE",
|
|
visible: visible,
|
|
okText: "\u786E\u5B9A",
|
|
cancelText: "\u53D6\u6D88",
|
|
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5() {
|
|
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
case 0:
|
|
_context5.next = 2;
|
|
return form.validateFields();
|
|
case 2:
|
|
(0,counselling/* edit_specialist_question */.UO)(objectSpread2_default()({
|
|
specialist_question_id: params === null || params === void 0 ? void 0 : params.questionId
|
|
}, form.getFieldsValue())).then(function (res) {
|
|
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
|
|
message/* default */.ZP.success('编辑成功');
|
|
getInfo();
|
|
}
|
|
setVisible(false);
|
|
form.resetFields();
|
|
});
|
|
case 3:
|
|
case "end":
|
|
return _context5.stop();
|
|
}
|
|
}, _callee5);
|
|
})),
|
|
onCancel: function onCancel() {
|
|
setVisible(false);
|
|
form.resetFields();
|
|
},
|
|
width: 600,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z, {
|
|
form: form,
|
|
layout: "vertical",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
label: "\u5185\u5BB9",
|
|
name: "question",
|
|
rules: [{
|
|
required: true,
|
|
message: '必填项'
|
|
}],
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.TextArea, {
|
|
placeholder: "\u8BF7\u5728\u6B64\u8F93\u5165\u60A8\u7684\u95EE\u9898",
|
|
rows: 6,
|
|
maxLength: 200,
|
|
showCount: true
|
|
})
|
|
})
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(PracticesModal/* default */.Z, {
|
|
data: data,
|
|
getData: getInfo
|
|
})]
|
|
});
|
|
};
|
|
/* harmony default export */ var Detail = ((0,_umi_production_exports.connect)(function (_ref4) {
|
|
var polls = _ref4.polls,
|
|
loading = _ref4.loading,
|
|
user = _ref4.user,
|
|
globalSetting = _ref4.globalSetting;
|
|
return {
|
|
polls: polls,
|
|
globalSetting: globalSetting,
|
|
user: user,
|
|
loading: loading.effects
|
|
};
|
|
})(PollDetail));
|
|
|
|
/***/ }),
|
|
|
|
/***/ 39475:
|
|
/*!************************************!*\
|
|
!*** ./src/service/counselling.ts ***!
|
|
\************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ $D: function() { return /* binding */ specialist_question; },
|
|
/* harmony export */ B5: function() { return /* binding */ del_specialist; },
|
|
/* harmony export */ CV: function() { return /* binding */ edit_specialist; },
|
|
/* harmony export */ Cc: function() { return /* binding */ hot_question; },
|
|
/* harmony export */ I_: function() { return /* binding */ getSpecialists; },
|
|
/* harmony export */ LI: function() { return /* binding */ get_duty_info; },
|
|
/* harmony export */ NG: function() { return /* binding */ add_or_cancel_duty; },
|
|
/* harmony export */ On: function() { return /* binding */ get_statis; },
|
|
/* harmony export */ U8: function() { return /* binding */ specialist_question_detail; },
|
|
/* harmony export */ UO: function() { return /* binding */ edit_specialist_question; },
|
|
/* harmony export */ e4: function() { return /* binding */ del_specialist_question; },
|
|
/* harmony export */ j6: function() { return /* binding */ get_duty_time; },
|
|
/* harmony export */ t1: function() { return /* binding */ question_is_answered; },
|
|
/* harmony export */ wr: function() { return /* binding */ add_specialists; },
|
|
/* harmony export */ y7: function() { return /* binding */ specialist_detail; },
|
|
/* harmony export */ yK: function() { return /* binding */ specialist_scoring; },
|
|
/* harmony export */ zB: function() { return /* binding */ my_specialist_question; },
|
|
/* harmony export */ zR: function() { return /* binding */ public_specialist_question; }
|
|
/* harmony export */ });
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js */ 7557);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js */ 82242);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js */ 41498);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/utils/fetch */ 82710);
|
|
|
|
|
|
|
|
|
|
|
|
//添加专家
|
|
function add_specialists(_x) {
|
|
return _add_specialists.apply(this, arguments);
|
|
}
|
|
|
|
//获取专家列表
|
|
function _add_specialists() {
|
|
_add_specialists = _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee(data) {
|
|
return _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
return _context.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/online_consults/add_specialists.json", {
|
|
method: 'post',
|
|
body: _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
|
|
}));
|
|
case 1:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return _add_specialists.apply(this, arguments);
|
|
}
|
|
function getSpecialists(_x2) {
|
|
return _getSpecialists.apply(this, arguments);
|
|
}
|
|
|
|
// 删除专家
|
|
function _getSpecialists() {
|
|
_getSpecialists = _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee2(params) {
|
|
return _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee2$(_context2) {
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
case 0:
|
|
return _context2.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/online_consults/specialists.json", {
|
|
method: 'get',
|
|
params: _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params)
|
|
}));
|
|
case 1:
|
|
case "end":
|
|
return _context2.stop();
|
|
}
|
|
}, _callee2);
|
|
}));
|
|
return _getSpecialists.apply(this, arguments);
|
|
}
|
|
function del_specialist(_x3) {
|
|
return _del_specialist.apply(this, arguments);
|
|
}
|
|
|
|
//编辑专家
|
|
function _del_specialist() {
|
|
_del_specialist = _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee3(data) {
|
|
return _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee3$(_context3) {
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
case 0:
|
|
return _context3.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/online_consults/del_specialist.json", {
|
|
method: 'delete',
|
|
body: _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
|
|
}));
|
|
case 1:
|
|
case "end":
|
|
return _context3.stop();
|
|
}
|
|
}, _callee3);
|
|
}));
|
|
return _del_specialist.apply(this, arguments);
|
|
}
|
|
function edit_specialist(_x4) {
|
|
return _edit_specialist.apply(this, arguments);
|
|
}
|
|
|
|
//值班信息
|
|
function _edit_specialist() {
|
|
_edit_specialist = _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee4(data) {
|
|
return _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee4$(_context4) {
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
case 0:
|
|
return _context4.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/online_consults/edit_specialist.json", {
|
|
method: 'put',
|
|
body: _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
|
|
}));
|
|
case 1:
|
|
case "end":
|
|
return _context4.stop();
|
|
}
|
|
}, _callee4);
|
|
}));
|
|
return _edit_specialist.apply(this, arguments);
|
|
}
|
|
function get_duty_info(_x5) {
|
|
return _get_duty_info.apply(this, arguments);
|
|
}
|
|
|
|
//添加或者取消值班
|
|
function _get_duty_info() {
|
|
_get_duty_info = _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee5(params) {
|
|
return _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee5$(_context5) {
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
case 0:
|
|
return _context5.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/online_consults/duty_info.json", {
|
|
method: 'get',
|
|
params: _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params)
|
|
}));
|
|
case 1:
|
|
case "end":
|
|
return _context5.stop();
|
|
}
|
|
}, _callee5);
|
|
}));
|
|
return _get_duty_info.apply(this, arguments);
|
|
}
|
|
function add_or_cancel_duty(_x6) {
|
|
return _add_or_cancel_duty.apply(this, arguments);
|
|
}
|
|
|
|
//专家详情
|
|
function _add_or_cancel_duty() {
|
|
_add_or_cancel_duty = _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee6(data) {
|
|
return _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee6$(_context6) {
|
|
while (1) switch (_context6.prev = _context6.next) {
|
|
case 0:
|
|
return _context6.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/online_consults/add_or_cancel_duty.json", {
|
|
method: 'post',
|
|
body: _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
|
|
}));
|
|
case 1:
|
|
case "end":
|
|
return _context6.stop();
|
|
}
|
|
}, _callee6);
|
|
}));
|
|
return _add_or_cancel_duty.apply(this, arguments);
|
|
}
|
|
function specialist_detail(_x7) {
|
|
return _specialist_detail.apply(this, arguments);
|
|
}
|
|
|
|
//发起提问
|
|
function _specialist_detail() {
|
|
_specialist_detail = _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee7(params) {
|
|
return _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee7$(_context7) {
|
|
while (1) switch (_context7.prev = _context7.next) {
|
|
case 0:
|
|
return _context7.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/online_consults/specialist_detail.json", {
|
|
method: 'get',
|
|
params: _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params)
|
|
}));
|
|
case 1:
|
|
case "end":
|
|
return _context7.stop();
|
|
}
|
|
}, _callee7);
|
|
}));
|
|
return _specialist_detail.apply(this, arguments);
|
|
}
|
|
function specialist_question(_x8) {
|
|
return _specialist_question.apply(this, arguments);
|
|
}
|
|
//编辑提问
|
|
function _specialist_question() {
|
|
_specialist_question = _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee8(data) {
|
|
return _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee8$(_context8) {
|
|
while (1) switch (_context8.prev = _context8.next) {
|
|
case 0:
|
|
return _context8.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/online_consults/specialist_question.json", {
|
|
method: 'post',
|
|
body: _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
|
|
}));
|
|
case 1:
|
|
case "end":
|
|
return _context8.stop();
|
|
}
|
|
}, _callee8);
|
|
}));
|
|
return _specialist_question.apply(this, arguments);
|
|
}
|
|
function edit_specialist_question(_x9) {
|
|
return _edit_specialist_question.apply(this, arguments);
|
|
}
|
|
|
|
//提问详情
|
|
function _edit_specialist_question() {
|
|
_edit_specialist_question = _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee9(data) {
|
|
return _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee9$(_context9) {
|
|
while (1) switch (_context9.prev = _context9.next) {
|
|
case 0:
|
|
return _context9.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/online_consults/edit_specialist_question.json", {
|
|
method: 'put',
|
|
body: _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
|
|
}));
|
|
case 1:
|
|
case "end":
|
|
return _context9.stop();
|
|
}
|
|
}, _callee9);
|
|
}));
|
|
return _edit_specialist_question.apply(this, arguments);
|
|
}
|
|
function specialist_question_detail(_x10) {
|
|
return _specialist_question_detail.apply(this, arguments);
|
|
}
|
|
//公开提问/取消提问
|
|
function _specialist_question_detail() {
|
|
_specialist_question_detail = _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee10(params) {
|
|
return _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee10$(_context10) {
|
|
while (1) switch (_context10.prev = _context10.next) {
|
|
case 0:
|
|
return _context10.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/online_consults/specialist_question_detail.json", {
|
|
method: 'get',
|
|
params: _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params)
|
|
}));
|
|
case 1:
|
|
case "end":
|
|
return _context10.stop();
|
|
}
|
|
}, _callee10);
|
|
}));
|
|
return _specialist_question_detail.apply(this, arguments);
|
|
}
|
|
function public_specialist_question(_x11) {
|
|
return _public_specialist_question.apply(this, arguments);
|
|
}
|
|
|
|
//提问已解答
|
|
function _public_specialist_question() {
|
|
_public_specialist_question = _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee11(data) {
|
|
return _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee11$(_context11) {
|
|
while (1) switch (_context11.prev = _context11.next) {
|
|
case 0:
|
|
return _context11.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/online_consults/public_specialist_question.json", {
|
|
method: 'post',
|
|
body: _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
|
|
}));
|
|
case 1:
|
|
case "end":
|
|
return _context11.stop();
|
|
}
|
|
}, _callee11);
|
|
}));
|
|
return _public_specialist_question.apply(this, arguments);
|
|
}
|
|
function question_is_answered(_x12) {
|
|
return _question_is_answered.apply(this, arguments);
|
|
}
|
|
|
|
//删除提问
|
|
function _question_is_answered() {
|
|
_question_is_answered = _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee12(data) {
|
|
return _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee12$(_context12) {
|
|
while (1) switch (_context12.prev = _context12.next) {
|
|
case 0:
|
|
return _context12.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/online_consults/question_is_answered.json", {
|
|
method: 'post',
|
|
body: _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
|
|
}));
|
|
case 1:
|
|
case "end":
|
|
return _context12.stop();
|
|
}
|
|
}, _callee12);
|
|
}));
|
|
return _question_is_answered.apply(this, arguments);
|
|
}
|
|
function del_specialist_question(_x13) {
|
|
return _del_specialist_question.apply(this, arguments);
|
|
}
|
|
|
|
//我的咨询
|
|
function _del_specialist_question() {
|
|
_del_specialist_question = _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee13(data) {
|
|
return _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee13$(_context13) {
|
|
while (1) switch (_context13.prev = _context13.next) {
|
|
case 0:
|
|
return _context13.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/online_consults/del_specialist_question.json", {
|
|
method: 'delete',
|
|
body: _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
|
|
}));
|
|
case 1:
|
|
case "end":
|
|
return _context13.stop();
|
|
}
|
|
}, _callee13);
|
|
}));
|
|
return _del_specialist_question.apply(this, arguments);
|
|
}
|
|
function my_specialist_question(_x14) {
|
|
return _my_specialist_question.apply(this, arguments);
|
|
}
|
|
//值班时间
|
|
function _my_specialist_question() {
|
|
_my_specialist_question = _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee14(params) {
|
|
return _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee14$(_context14) {
|
|
while (1) switch (_context14.prev = _context14.next) {
|
|
case 0:
|
|
return _context14.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/online_consults/my_specialist_question.json", {
|
|
method: 'get',
|
|
params: _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params)
|
|
}));
|
|
case 1:
|
|
case "end":
|
|
return _context14.stop();
|
|
}
|
|
}, _callee14);
|
|
}));
|
|
return _my_specialist_question.apply(this, arguments);
|
|
}
|
|
function get_duty_time(_x15) {
|
|
return _get_duty_time.apply(this, arguments);
|
|
}
|
|
//热门问题列表
|
|
function _get_duty_time() {
|
|
_get_duty_time = _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee15(params) {
|
|
return _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee15$(_context15) {
|
|
while (1) switch (_context15.prev = _context15.next) {
|
|
case 0:
|
|
return _context15.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/online_consults/my_duty_dates.json", {
|
|
method: 'get',
|
|
params: _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params)
|
|
}));
|
|
case 1:
|
|
case "end":
|
|
return _context15.stop();
|
|
}
|
|
}, _callee15);
|
|
}));
|
|
return _get_duty_time.apply(this, arguments);
|
|
}
|
|
function hot_question(_x16) {
|
|
return _hot_question.apply(this, arguments);
|
|
}
|
|
//给分
|
|
function _hot_question() {
|
|
_hot_question = _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee16(params) {
|
|
return _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee16$(_context16) {
|
|
while (1) switch (_context16.prev = _context16.next) {
|
|
case 0:
|
|
return _context16.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/online_consults/specialist_questions.json", {
|
|
method: 'get',
|
|
params: _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params)
|
|
}));
|
|
case 1:
|
|
case "end":
|
|
return _context16.stop();
|
|
}
|
|
}, _callee16);
|
|
}));
|
|
return _hot_question.apply(this, arguments);
|
|
}
|
|
function specialist_scoring(_x17) {
|
|
return _specialist_scoring.apply(this, arguments);
|
|
}
|
|
// 工作台数据统计
|
|
function _specialist_scoring() {
|
|
_specialist_scoring = _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee17(data) {
|
|
return _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee17$(_context17) {
|
|
while (1) switch (_context17.prev = _context17.next) {
|
|
case 0:
|
|
return _context17.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/online_consults/specialist_scoring.json", {
|
|
method: 'post',
|
|
body: _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
|
|
}));
|
|
case 1:
|
|
case "end":
|
|
return _context17.stop();
|
|
}
|
|
}, _callee17);
|
|
}));
|
|
return _specialist_scoring.apply(this, arguments);
|
|
}
|
|
function get_statis(_x18) {
|
|
return _get_statis.apply(this, arguments);
|
|
}
|
|
function _get_statis() {
|
|
_get_statis = _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee18(params) {
|
|
return _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee18$(_context18) {
|
|
while (1) switch (_context18.prev = _context18.next) {
|
|
case 0:
|
|
return _context18.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/online_consults/statis.json", {
|
|
method: 'get',
|
|
params: _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params)
|
|
}));
|
|
case 1:
|
|
case "end":
|
|
return _context18.stop();
|
|
}
|
|
}, _callee18);
|
|
}));
|
|
return _get_statis.apply(this, arguments);
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ 9849:
|
|
/*!***************************************************!*\
|
|
!*** ./src/utils/hooks/useResponsiveFontSize.tsx ***!
|
|
\***************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
|
|
|
|
var useResponsiveFontSize = function useResponsiveFontSize() {
|
|
var designWidth = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1920;
|
|
var minFontSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.6;
|
|
var maxFontSize = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 2;
|
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
var setRootFontSize = function setRootFontSize() {
|
|
var docEl = document.documentElement;
|
|
var clientWidth = docEl.clientWidth;
|
|
var fontSize = clientWidth / designWidth;
|
|
fontSize = fontSize > maxFontSize ? maxFontSize : fontSize < minFontSize ? minFontSize : fontSize;
|
|
docEl.style.fontSize = fontSize + 'px';
|
|
};
|
|
window.addEventListener('resize', setRootFontSize);
|
|
setRootFontSize(); // 初始化时设置字体大小
|
|
|
|
return function () {
|
|
// 清除font-size样式
|
|
document.documentElement.removeAttribute('style');
|
|
window.removeEventListener('resize', setRootFontSize);
|
|
};
|
|
}, [designWidth, minFontSize, maxFontSize]);
|
|
};
|
|
/* harmony default export */ __webpack_exports__.Z = (useResponsiveFontSize);
|
|
|
|
/***/ })
|
|
|
|
}]); |