|
|
|
|
@ -117,7 +117,7 @@ var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
|
|
var _umi_production_exports = __webpack_require__(88271);
|
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/Counselling/HotQuestions/index.less?modules
|
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
/* harmony default export */ var HotQuestionsmodules = ({"container":"container___WZIBs","left":"left___wD1f_","right":"right___m0Fzc","top":"top___sh9Jy","content":"content___Wr5v6","messageList":"messageList___cbspy","messageItem":"messageItem___mfsN_","messageStatus":"messageStatus___JeBg2","status":"status___cNepJ","resolved":"resolved___C5ej6","unresolved":"unresolved___KXMbp","messageTitle":"messageTitle___isXW5","messageInfo":"messageInfo___YGYeB","text":"text___VS6F0","search":"search___t547o","searchIcon":"searchIcon___TPDgS"});
|
|
|
|
|
/* harmony default export */ var HotQuestionsmodules = ({"container":"container___WZIBs","left":"left___wD1f_","right":"right___m0Fzc","top":"top___sh9Jy","top_title":"top_title___dvGy2","content":"content___Wr5v6","messageList":"messageList___cbspy","messageItem":"messageItem___mfsN_","messageStatus":"messageStatus___JeBg2","status":"status___cNepJ","resolved":"resolved___C5ej6","unresolved":"unresolved___KXMbp","messageTitle":"messageTitle___isXW5","messageInfo":"messageInfo___YGYeB","text":"text___VS6F0","search":"search___t547o","searchIcon":"searchIcon___TPDgS"});
|
|
|
|
|
// EXTERNAL MODULE: ./src/service/counselling.ts
|
|
|
|
|
var counselling = __webpack_require__(39475);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 3 modules
|
|
|
|
|
@ -197,26 +197,28 @@ var HotQuestions = function HotQuestions(_ref) {
|
|
|
|
|
setkeyword = _useState16[1];
|
|
|
|
|
var _useState17 = (0,_react_17_0_2_react.useState)(),
|
|
|
|
|
_useState18 = slicedToArray_default()(_useState17, 2),
|
|
|
|
|
order = _useState18[0],
|
|
|
|
|
setOrder = _useState18[1];
|
|
|
|
|
var _useState19 = (0,_react_17_0_2_react.useState)({
|
|
|
|
|
keyword1 = _useState18[0],
|
|
|
|
|
setkeyword1 = _useState18[1];
|
|
|
|
|
var _useState19 = (0,_react_17_0_2_react.useState)(),
|
|
|
|
|
_useState20 = slicedToArray_default()(_useState19, 2),
|
|
|
|
|
order = _useState20[0],
|
|
|
|
|
setOrder = _useState20[1];
|
|
|
|
|
var _useState21 = (0,_react_17_0_2_react.useState)({
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 10,
|
|
|
|
|
keyword: '',
|
|
|
|
|
order: 'hot'
|
|
|
|
|
}),
|
|
|
|
|
_useState20 = slicedToArray_default()(_useState19, 2),
|
|
|
|
|
params = _useState20[0],
|
|
|
|
|
setParams = _useState20[1];
|
|
|
|
|
var _useState21 = (0,_react_17_0_2_react.useState)({
|
|
|
|
|
_useState22 = slicedToArray_default()(_useState21, 2),
|
|
|
|
|
params = _useState22[0],
|
|
|
|
|
setParams = _useState22[1];
|
|
|
|
|
var _useState23 = (0,_react_17_0_2_react.useState)({
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 10,
|
|
|
|
|
keyword: '',
|
|
|
|
|
order: 'newest'
|
|
|
|
|
}),
|
|
|
|
|
_useState22 = slicedToArray_default()(_useState21, 2),
|
|
|
|
|
params1 = _useState22[0],
|
|
|
|
|
setParams1 = _useState22[1];
|
|
|
|
|
_useState24 = slicedToArray_default()(_useState23, 2),
|
|
|
|
|
params1 = _useState24[0],
|
|
|
|
|
setParams1 = _useState24[1];
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
getData();
|
|
|
|
|
}, [params]);
|
|
|
|
|
@ -224,14 +226,18 @@ var HotQuestions = function HotQuestions(_ref) {
|
|
|
|
|
getData1();
|
|
|
|
|
}, [params1]);
|
|
|
|
|
var getData = function getData() {
|
|
|
|
|
(0,counselling/* hot_question */.Cc)(objectSpread2_default()({}, params)).then(function (res) {
|
|
|
|
|
(0,counselling/* hot_question */.Cc)(objectSpread2_default()(objectSpread2_default()({}, params), {}, {
|
|
|
|
|
keyword: keyword
|
|
|
|
|
})).then(function (res) {
|
|
|
|
|
var _res$data, _res$data2;
|
|
|
|
|
setTableData(res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.specialist_question_records);
|
|
|
|
|
setTotal(res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.count);
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
var getData1 = function getData1() {
|
|
|
|
|
(0,counselling/* hot_question */.Cc)(objectSpread2_default()({}, params1)).then(function (res) {
|
|
|
|
|
(0,counselling/* hot_question */.Cc)(objectSpread2_default()(objectSpread2_default()({}, params1), {}, {
|
|
|
|
|
keyword: keyword1
|
|
|
|
|
})).then(function (res) {
|
|
|
|
|
var _res$data3, _res$data4;
|
|
|
|
|
setTableData1(res === null || res === void 0 || (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.specialist_question_records);
|
|
|
|
|
setTotal1(res === null || res === void 0 || (_res$data4 = res.data) === null || _res$data4 === void 0 ? void 0 : _res$data4.count);
|
|
|
|
|
@ -247,6 +253,7 @@ var HotQuestions = function HotQuestions(_ref) {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: HotQuestionsmodules.top,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: HotQuestionsmodules.top_title,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "iconfont icon-remenwenti font20"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
@ -269,7 +276,7 @@ var HotQuestions = function HotQuestions(_ref) {
|
|
|
|
|
getData();
|
|
|
|
|
},
|
|
|
|
|
suffix: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "iconfont icon-sousuo9 font14 ".concat(HotQuestionsmodules.searchIcon),
|
|
|
|
|
className: "iconfont icon-sousuo font14 ".concat(HotQuestionsmodules.searchIcon),
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
setkeyword(keyword);
|
|
|
|
|
getData();
|
|
|
|
|
@ -297,7 +304,7 @@ var HotQuestions = function HotQuestions(_ref) {
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: HotQuestionsmodules.messageTitle,
|
|
|
|
|
children: message.title
|
|
|
|
|
children: message.question
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: HotQuestionsmodules.messageInfo,
|
|
|
|
|
@ -323,7 +330,7 @@ var HotQuestions = function HotQuestions(_ref) {
|
|
|
|
|
},
|
|
|
|
|
children: ["\u63D0\u95EE\u65F6\u95F4", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: HotQuestionsmodules.text,
|
|
|
|
|
children: message !== null && message !== void 0 && message.created_at ? dayjs_min_default()(message === null || message === void 0 ? void 0 : message.created_at).format('YYYY-MM-DD HH:mm:ss') : '--'
|
|
|
|
|
children: message !== null && message !== void 0 && message.created_at ? dayjs_min_default()(message === null || message === void 0 ? void 0 : message.created_at).format('YYYY-MM-DD HH:mm') : '--'
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
@ -339,6 +346,7 @@ var HotQuestions = function HotQuestions(_ref) {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: HotQuestionsmodules.top,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: HotQuestionsmodules.top_title,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "iconfont icon-zuixinwenti font20"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
@ -347,24 +355,23 @@ var HotQuestions = function HotQuestions(_ref) {
|
|
|
|
|
fontSize: '18rem',
|
|
|
|
|
fontWeight: 600
|
|
|
|
|
},
|
|
|
|
|
children: "\u6700\u70ED\u95EE\u9898"
|
|
|
|
|
children: "\u6700\u65B0\u95EE\u9898"
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.Search, {
|
|
|
|
|
placeholder: "\u8BF7\u8F93\u5165\u95EE\u9898\u8FDB\u884C\u641C\u7D22",
|
|
|
|
|
size: "large",
|
|
|
|
|
className: HotQuestionsmodules.search,
|
|
|
|
|
value: keyword,
|
|
|
|
|
value: keyword1,
|
|
|
|
|
onChange: function onChange(e) {
|
|
|
|
|
setkeyword(e.target.value);
|
|
|
|
|
setkeyword1(e.target.value);
|
|
|
|
|
},
|
|
|
|
|
onSearch: function onSearch(value) {
|
|
|
|
|
getData();
|
|
|
|
|
getData1();
|
|
|
|
|
},
|
|
|
|
|
suffix: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "iconfont icon-sousuo9 font14 ".concat(HotQuestionsmodules.searchIcon),
|
|
|
|
|
className: "iconfont icon-sousuo font14 ".concat(HotQuestionsmodules.searchIcon),
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
setkeyword(keyword);
|
|
|
|
|
getData();
|
|
|
|
|
getData1();
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
@ -372,31 +379,51 @@ var HotQuestions = function HotQuestions(_ref) {
|
|
|
|
|
className: HotQuestionsmodules.content,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: HotQuestionsmodules.messageList,
|
|
|
|
|
children: messages.map(function (message) {
|
|
|
|
|
children: tableData1.map(function (message) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: HotQuestionsmodules.messageItem,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: "mb20",
|
|
|
|
|
style: {
|
|
|
|
|
display: 'flex',
|
|
|
|
|
alignItems: 'center'
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
marginBottom: '20rem'
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: HotQuestionsmodules.messageStatus,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: "".concat(HotQuestionsmodules.status, " ").concat(message.status === '已解决' ? HotQuestionsmodules.resolved : HotQuestionsmodules.unresolved),
|
|
|
|
|
children: message.status
|
|
|
|
|
className: "".concat(HotQuestionsmodules.status, " ").concat(message.is_answered === '已解决' ? HotQuestionsmodules.resolved : HotQuestionsmodules.unresolved),
|
|
|
|
|
children: message.is_answered ? '已解答' : '待解答'
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: HotQuestionsmodules.messageTitle,
|
|
|
|
|
children: message.title
|
|
|
|
|
children: message.question
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: HotQuestionsmodules.messageInfo,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
|
|
children: ["\u89E3\u7B54\u4E13\u5BB6\uFF1A", message.expert]
|
|
|
|
|
style: {
|
|
|
|
|
width: '160rem'
|
|
|
|
|
},
|
|
|
|
|
children: ["\u63D0\u95EE\u4EBA\u5458", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: HotQuestionsmodules.text,
|
|
|
|
|
children: message.specialist || '--'
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
|
|
style: {
|
|
|
|
|
marginLeft: '40rem'
|
|
|
|
|
},
|
|
|
|
|
children: ["\u6D4F\u89C8\u6B21\u6570", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: HotQuestionsmodules.text,
|
|
|
|
|
children: (message === null || message === void 0 ? void 0 : message.viewed_count) || '--'
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
|
|
children: ["\u63D0\u95EE\u65F6\u95F4\uFF1A", message.time]
|
|
|
|
|
style: {
|
|
|
|
|
marginLeft: 'auto'
|
|
|
|
|
},
|
|
|
|
|
children: ["\u63D0\u95EE\u65F6\u95F4", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: HotQuestionsmodules.text,
|
|
|
|
|
children: message !== null && message !== void 0 && message.created_at ? dayjs_min_default()(message === null || message === void 0 ? void 0 : message.created_at).format('YYYY-MM-DD HH:mm') : '--'
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
}, message.id);
|