bhd-components 0.6.5 → 0.6.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/{8bda9e2e.esm.es5.production.js → 0acf50ef.esm.es5.production.js} +1 -1
  2. package/dist/{d4259367.esm.es5.development.js → 4fa3313f.esm.es5.development.js} +1402 -1140
  3. package/dist/index.esm.es5.development.css +864 -732
  4. package/dist/index.esm.es5.development.js +945 -780
  5. package/dist/index.esm.es5.production.css +1 -1
  6. package/dist/index.esm.es5.production.js +1 -1
  7. package/es2017/customerService/contactsList.d.ts +1 -1
  8. package/es2017/customerService/contactsList.js +11 -145
  9. package/es2017/customerService/function.js +20 -13
  10. package/es2017/customerService/historyFun.js +334 -154
  11. package/es2017/customerService/index.js +567 -437
  12. package/es2017/customerService/index.module.less +169 -65
  13. package/es2017/customerService/index2.module.less +170 -65
  14. package/es2017/icons/components/custom-expand.d.ts +4 -0
  15. package/es2017/icons/components/custom-expand.js +22 -0
  16. package/es2017/icons/components/index.d.ts +1 -0
  17. package/es2017/icons/components/index.js +1 -0
  18. package/esm/customerService/contactsList.d.ts +1 -1
  19. package/esm/customerService/contactsList.js +11 -158
  20. package/esm/customerService/function.js +20 -13
  21. package/esm/customerService/historyFun.js +338 -167
  22. package/esm/customerService/index.js +557 -445
  23. package/esm/customerService/index.module.less +169 -65
  24. package/esm/customerService/index2.module.less +170 -65
  25. package/esm/icons/components/custom-expand.d.ts +4 -0
  26. package/esm/icons/components/custom-expand.js +24 -0
  27. package/esm/icons/components/index.d.ts +1 -0
  28. package/esm/icons/components/index.js +1 -0
  29. package/package.json +1 -1
@@ -1,105 +1,75 @@
1
1
  import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
2
2
  import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
3
3
  import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
4
- import { jsx as _jsx, jsxs as _jsxs } from "@ice/jsx-runtime/jsx-runtime";
4
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@ice/jsx-runtime/jsx-runtime";
5
5
  import React, { useEffect, useState, useRef } from "react";
6
6
  import styles from "./index.module.less";
7
7
  import "highlight.js/styles/default.css";
8
8
  import { Input } from "antd";
9
- import { CustomClose } from "../icons/index";
9
+ import { CustomClose, CustomExpand, CustomAiIcon } from "../icons/index";
10
10
  import { SearchOutlined } from "@ant-design/icons";
11
11
  import { getDataTime } from "./function"; //录音使用文件
12
12
  var HistoryFun = function(props) {
13
13
  var type = props.type, roomId = props.roomId, userData = props.userData, http = props.http, urllocation = props.urllocation, onClose = props.onClose, loadSpecifiedData = props.loadSpecifiedData;
14
14
  var _useState = _sliced_to_array(useState(""), 2), keyWordProblem = _useState[0], setKeyWordProblem = _useState[1]; //搜索内容
15
- var _useState1 = _sliced_to_array(useState([]), 2), keyHistoryMessageList = _useState1[0], setKeyHistoryMessageList = _useState1[1]; //搜索的历史记录
16
- var _useState2 = _sliced_to_array(useState(1), 2), showLoadingState = _useState2[0], setShowLoadingState = _useState2[1]; //1,初始状态,2、无数据 ,3、不显示图片
17
- var _useState3 = _sliced_to_array(useState(1), 2), pageNum = _useState3[0], setPageNum = _useState3[1];
18
- var _useState4 = _sliced_to_array(useState(0), 2), pageCount = _useState4[0], setPageCount = _useState4[1];
19
- var _useState5 = _sliced_to_array(useState(false), 2), load = _useState5[0], setLoad = _useState5[1];
15
+ var _useState1 = _sliced_to_array(useState(1), 2), showLoadingState = _useState1[0], setShowLoadingState = _useState1[1]; //1,初始状态,2、无数据 ,3、不显示图片
16
+ var _useState2 = _sliced_to_array(useState(1), 2), pageNum = _useState2[0], setPageNum = _useState2[1];
17
+ var _useState3 = _sliced_to_array(useState(0), 2), pageCount = _useState3[0], setPageCount = _useState3[1];
18
+ var _useState4 = _sliced_to_array(useState(10), 2), maxPageSize = _useState4[0], setMaxPageSize = _useState4[1];
19
+ var _useState5 = _sliced_to_array(useState([]), 2), totalData = _useState5[0], setTotalData = _useState5[1]; //总数据
20
20
  var timer = useRef(null); //文本框输入时
21
- var objName = useRef([]);
22
- // useEffect(() => {
23
- // function handleScroll() {
24
- // const container = document.getElementById('history_list');
25
- // const scrollTop = container.scrollTop;
26
- // const clientHeight = container.clientHeight;
27
- // const scrollHeight = container.scrollHeight;
28
- // // console.log(scrollTop,clientHeight,scrollHeight,'333dfkvmdfv')
29
- // // if((clientHeight + scrollTop + 10) >= scrollHeight && pageCount > pageNum && pageCount > 0){
30
- // // // console.log(11111111,pageNumHistory)
31
- // // let number = pageNum + 1;
32
- // // console.log('到底部了22222',number)
33
- // // setPageNum((pageNum) => {
34
- // // return pageNum + 1;
35
- // // });
36
- // // getKeyHistoryMessage(keyWordProblem,number);
37
- // // }
38
- // }
39
- // const content = document.getElementById('history_list');
40
- // if (content) {
41
- // content.addEventListener("scroll", handleScroll);
42
- // }
43
- // return () => {
44
- // const content = document.getElementById('history_list');
45
- // if (content) {
46
- // content.removeEventListener("scroll", handleScroll);
47
- // }
48
- // };
49
- // }, [keyHistoryMessageList]);
50
21
  useEffect(function() {
51
- setKeyHistoryMessageList(function(list) {
52
- var newList = list.map(function(item) {
53
- var name = "";
54
- var nameList = objName.current.filter(function(a) {
55
- return a.id == item.receiver;
22
+ var handleScroll = function handleScroll() {
23
+ var container = document.getElementById("history_list");
24
+ var scrollTop = container.scrollTop;
25
+ var clientHeight = container.clientHeight;
26
+ var scrollHeight = container.scrollHeight;
27
+ // console.log(pageCount, pageNum, "333dfkvmdfv");
28
+ if (clientHeight + scrollTop + 10 >= scrollHeight && pageCount > pageNum && pageCount > 0) {
29
+ // console.log("到底部了22222", number);
30
+ setPageNum(function(page) {
31
+ return page + 1;
56
32
  });
57
- if (nameList.length > 0) {
58
- name = nameList[0].name;
59
- }
60
- return _object_spread_props(_object_spread({}, item), {
61
- name: name
62
- });
63
- });
64
- return newList;
65
- });
33
+ // console.log(pageNum,444455556666)
34
+ getList(keyWordProblem, pageNum + 1);
35
+ }
36
+ };
37
+ var content = document.getElementById("history_list");
38
+ if (content) {
39
+ content.addEventListener("scroll", handleScroll);
40
+ }
41
+ return function() {
42
+ var content = document.getElementById("history_list");
43
+ if (content) {
44
+ content.removeEventListener("scroll", handleScroll);
45
+ }
46
+ };
66
47
  }, [
67
- load
48
+ pageCount,
49
+ pageNum
68
50
  ]);
69
- //获取搜索中的历史消息记录
70
- var getKeyHistoryMessage = function(keyWordProblem) {
71
- var page = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
72
- if (roomId == "") return;
73
- setLoad(false);
74
- setKeyHistoryMessageList([]);
75
- return http.get("".concat(urllocation, "/chat-service/public/v1.0/history-messages"), {
51
+ var getList = function(val, pageNum) {
52
+ return http.get("".concat(urllocation, "/chat-service/public/v1.0/history-messages-total"), {
76
53
  params: {
77
- roomId: "",
78
- message: keyWordProblem,
79
- page: page,
80
- maxPageSize: 1000,
81
- direction: "desc"
82
- },
83
- headers: {
84
- "x-module-id": userData.modules.find(function(ele) {
85
- return ele.short == "IntelligentCustomerService";
86
- }).id,
87
- "x-auth-jwt": window.localStorage.getItem("usertoken") || ""
54
+ message: val,
55
+ page: pageNum,
56
+ maxPageSize: maxPageSize
88
57
  }
89
58
  }).then(function(res) {
90
- if (res.data.messages.length > 0) {
91
- var total = res.data.total;
92
- var maxPageSize = 20;
93
- setPageCount(Math.ceil(total / maxPageSize));
59
+ console.log(res, 7777779999);
60
+ var data = res.data;
61
+ if (data.total > 0) {
94
62
  setShowLoadingState(3);
95
- var dataList = res.data.messages;
96
- setKeyHistoryMessageList(function(list) {
97
- var newList = list.concat(dataList);
98
- return newList;
63
+ var list = data.messageHistories;
64
+ setPageCount(Math.ceil(data.total / maxPageSize));
65
+ // setTotalData(totalData.concat(list));
66
+ setTotalData(function(list1) {
67
+ var new_list = list1;
68
+ new_list = new_list.concat(list);
69
+ return new_list;
99
70
  });
100
- getUserName(dataList);
71
+ getUserName(list);
101
72
  } else {
102
- // setKeyHistoryMessageList([]);
103
73
  setShowLoadingState(2);
104
74
  }
105
75
  }).catch(function(res) {});
@@ -111,13 +81,7 @@ var HistoryFun = function(props) {
111
81
  params: {
112
82
  roomId: roomId,
113
83
  page: 1,
114
- maxPageSize: 9999999
115
- },
116
- headers: {
117
- "x-module-id": userData.modules.find(function(ele) {
118
- return ele.short == "IntelligentCustomerService";
119
- }).id,
120
- "x-auth-jwt": window.localStorage.getItem("usertoken") || ""
84
+ maxPageSize: 99999999
121
85
  }
122
86
  });
123
87
  };
@@ -143,47 +107,153 @@ var HistoryFun = function(props) {
143
107
  }
144
108
  });
145
109
  var pageNumber = findPageNumber(30, Math.ceil(total / 30), number);
146
- // console.log(
147
- // roomId, pageNumber, id,
148
- // "第几页第几页第几页第几页第几页第几页"
149
- // );
110
+ console.log(roomId, pageNumber, id, receiver, "第几页第几页第几页第几页第几页第几页");
150
111
  loadSpecifiedData(roomId, pageNumber, id, receiver);
151
112
  onClose();
152
113
  setKeyWordProblem("");
153
- setKeyHistoryMessageList([]);
114
+ setTotalData([]);
115
+ // setKeyHistoryMessageList([]);
154
116
  }
155
117
  });
156
118
  };
157
119
  var getUserName = function(dataList) {
158
120
  try {
159
- // let objName: { id: string; name: String; }[] = [];//[{id:'用户id',name:'用户名字‘}]
160
- var obj = [];
161
- //去重
162
- var res = new Map();
163
- var filterList = dataList.filter(function(a) {
164
- return !res.has(a.receiver) && res.set(a.receiver, 1);
165
- });
166
- filterList = filterList.filter(function(item) {
167
- return item.receiver != userData.mid && item.receiver != "AI";
121
+ var list = dataList;
122
+ var ids = [];
123
+ list = list.map(function(item) {
124
+ if (item.member != "AI") {
125
+ ids.push(item.member);
126
+ }
168
127
  });
169
- console.log(filterList, "wefwekfjwef");
170
- filterList.map(function(item) {
171
- userName(item.receiver).then(function(res) {
128
+ if (ids.length > 0) {
129
+ userName(ids.join(",")).then(function(res) {
172
130
  if (res.data) {
173
- obj.push({
174
- id: item.receiver,
175
- name: res.data.name
131
+ var nameList = res.data;
132
+ setTotalData(function(list1) {
133
+ var list = list1;
134
+ list = list.map(function(item) {
135
+ var name = nameList.filter(function(v) {
136
+ return v.uid == item.member;
137
+ });
138
+ if (name.length > 0) {
139
+ return _object_spread({}, item, name[0]);
140
+ } else {
141
+ return item;
142
+ }
143
+ });
144
+ return list;
176
145
  });
177
- console.log(objName, "kdfvdfdfvjkdfnv");
178
- if (obj.length == filterList.length) {
179
- objName.current = obj;
180
- setLoad(true);
181
- }
182
146
  }
183
147
  });
184
- });
148
+ }
149
+ // let objName: { id: string; name: String; }[] = [];//[{id:'用户id',name:'用户名字‘}]
150
+ // let obj: any[] = [];
151
+ // //去重
152
+ // let res = new Map();
153
+ // let filterList = dataList.filter(
154
+ // (a: { receiver: string }) =>
155
+ // !res.has(a.receiver) && res.set(a.receiver, 1)
156
+ // );
157
+ // filterList = filterList.filter(
158
+ // (item) => item.receiver != userData.mid && item.receiver != "AI"
159
+ // );
160
+ // console.log(filterList, "wefwekfjwef");
161
+ // filterList.map((item)=>{
162
+ // userName(item.receiver).then((res: { data: { name: String } }) => {
163
+ // if (res.data) {
164
+ // obj.push({id:item.receiver,name:res.data.name,});
165
+ // console.log(objName,'kdfvdfdfvjkdfnv');
166
+ // if(obj.length == filterList.length){
167
+ // objName.current = obj;
168
+ // setLoad(true)
169
+ // }
170
+ // }
171
+ // });
172
+ // })
185
173
  } catch (error) {}
186
174
  };
175
+ //显示详情
176
+ var showDetails = function(roomId, show) {
177
+ //展开
178
+ if (show === true || show === false) {
179
+ setTotalData(function(list) {
180
+ console.log(list, 33333);
181
+ var new_list = list;
182
+ new_list = new_list.map(function(item) {
183
+ if (roomId == item.roomId) {
184
+ return _object_spread_props(_object_spread({}, item), {
185
+ show: !show
186
+ });
187
+ } else {
188
+ return _object_spread_props(_object_spread({}, item), {
189
+ show: item.show == undefined ? undefined : false
190
+ });
191
+ }
192
+ });
193
+ return new_list;
194
+ });
195
+ } else {
196
+ return http.get("".concat(urllocation, "/chat-service/public/v1.0/history-messages"), {
197
+ params: {
198
+ roomId: roomId,
199
+ message: keyWordProblem,
200
+ page: 1,
201
+ maxPageSize: 20,
202
+ direction: "desc"
203
+ }
204
+ }).then(function(res) {
205
+ if (res.data.messages.length > 0) {
206
+ setTotalData(function(list) {
207
+ var new_list = list;
208
+ new_list = new_list.map(function(item) {
209
+ if (item.roomId == roomId) {
210
+ return _object_spread_props(_object_spread({}, item), {
211
+ detailsList: res.data.messages,
212
+ pageCount: Math.ceil(res.data.total / 20),
213
+ show: true,
214
+ pageNum: 1
215
+ });
216
+ } else {
217
+ return item;
218
+ }
219
+ });
220
+ return new_list;
221
+ });
222
+ }
223
+ });
224
+ }
225
+ };
226
+ //加载更多
227
+ var loadMore = function(pageNum, roomId) {
228
+ return http.get("".concat(urllocation, "/chat-service/public/v1.0/history-messages"), {
229
+ params: {
230
+ roomId: roomId,
231
+ message: keyWordProblem,
232
+ page: pageNum,
233
+ maxPageSize: 20,
234
+ direction: "desc"
235
+ }
236
+ }).then(function(res) {
237
+ if (res.data.messages.length > 0) {
238
+ setTotalData(function(list) {
239
+ var new_list = list;
240
+ new_list = new_list.map(function(item) {
241
+ if (item.roomId == roomId) {
242
+ return _object_spread_props(_object_spread({}, item), {
243
+ detailsList: item.detailsList.concat(res.data.messages),
244
+ pageCount: Math.ceil(res.data.total / 20),
245
+ show: true,
246
+ pageNum: pageNum
247
+ });
248
+ } else {
249
+ return item;
250
+ }
251
+ });
252
+ return new_list;
253
+ });
254
+ }
255
+ });
256
+ };
187
257
  var userName = function(uid) {
188
258
  return http.get("".concat(urllocation, "/chat-service/public/v1.0/userinfo"), {
189
259
  params: {
@@ -191,7 +261,7 @@ var HistoryFun = function(props) {
191
261
  },
192
262
  headers: {
193
263
  "x-module-id": userData.modules.find(function(ele) {
194
- return ele.short == "TeacherAnswer";
264
+ return ele.short == "IntelligentCustomerService";
195
265
  }).id,
196
266
  "x-auth-jwt": window.localStorage.getItem("usertoken") || ""
197
267
  }
@@ -210,6 +280,7 @@ var HistoryFun = function(props) {
210
280
  }),
211
281
  /*#__PURE__*/ _jsx("span", {
212
282
  onClick: function() {
283
+ loadSpecifiedData();
213
284
  onClose();
214
285
  },
215
286
  children: /*#__PURE__*/ _jsx(CustomClose, {})
@@ -229,11 +300,11 @@ var HistoryFun = function(props) {
229
300
  clearTimeout(timer.current);
230
301
  timer.current = setTimeout(function() {
231
302
  if (val != "") {
232
- getKeyHistoryMessage(val);
303
+ setTotalData([]);
304
+ getList(val, 1);
233
305
  } else {
234
306
  setShowLoadingState(1);
235
- setKeyHistoryMessageList([]);
236
- setLoad(false);
307
+ setTotalData([]);
237
308
  }
238
309
  }, 1000);
239
310
  }
@@ -243,8 +314,7 @@ var HistoryFun = function(props) {
243
314
  onClick: function() {
244
315
  setShowLoadingState(1);
245
316
  setKeyWordProblem("");
246
- setKeyHistoryMessageList([]);
247
- setLoad(false);
317
+ setTotalData([]);
248
318
  },
249
319
  children: /*#__PURE__*/ _jsx(CustomClose, {})
250
320
  })
@@ -276,56 +346,157 @@ var HistoryFun = function(props) {
276
346
  })
277
347
  ]
278
348
  }),
279
- keyHistoryMessageList.map(function(item, index) {
280
- var span = item.message.replaceAll(keyWordProblem, function() {
281
- return "<span class=".concat(styles.sign, ">").concat(keyWordProblem, "</span>");
282
- });
283
- var name = "";
284
- if (item.receiver == userData.mid) {
285
- name = userData.real_name;
286
- } else if (item.receiver == "AI") {
287
- name = "AI助手";
288
- if (item.extraInfo != null) {
289
- name = "智能客服";
349
+ /*#__PURE__*/ _jsx("div", {
350
+ className: styles.list_item,
351
+ children: totalData.map(function(item) {
352
+ var span = "";
353
+ var time = "";
354
+ if (item.count == 1) {
355
+ var reg = /[`~!@#$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、]/im;
356
+ //搜索内容是否有特殊字符
357
+ if (reg.test(keyWordProblem)) {
358
+ span = item.message.replaceAll(keyWordProblem, function(e) {
359
+ return "<span class=".concat(styles.sign, ">").concat(e, "</span>");
360
+ });
361
+ } else {
362
+ span = item.message.replaceAll(new RegExp(keyWordProblem, "ig"), function(i) {
363
+ // console.log(i,'skdcnsdjk')
364
+ return "<span class=".concat(styles.sign, ">").concat(i, "</span>");
365
+ });
366
+ }
367
+ var currentTime = getDataTime(-1, 1); //当前时间
368
+ var createdAt = getDataTime(item.createdAt, 1);
369
+ if (currentTime == createdAt) {
370
+ time = getDataTime(item.createdAt, 2);
371
+ } else {
372
+ time = getDataTime(item.createdAt);
373
+ }
290
374
  }
291
- } else {
292
- name = item.name;
293
- }
294
- var time = "";
295
- var currentTime = getDataTime(-1, 1); //当前时间
296
- var updatedAt = getDataTime(item.updatedAt, 1);
297
- if (currentTime == updatedAt) {
298
- time = getDataTime(item.updatedAt, 2);
299
- } else {
300
- time = getDataTime(item.updatedAt);
301
- }
302
- return /*#__PURE__*/ _jsxs("div", {
303
- className: styles.list,
304
- onClick: function() {
305
- var id = item.receiver; // == userData.mid ? item.sender : item.receiver
306
- calculationData(item.roomId, item.id, id);
307
- },
308
- children: [
309
- /*#__PURE__*/ _jsxs("div", {
310
- className: styles.name,
311
- children: [
312
- /*#__PURE__*/ _jsx("p", {
313
- children: name
314
- }),
315
- /*#__PURE__*/ _jsx("span", {
316
- className: styles.time,
317
- children: time
318
- })
319
- ]
320
- }),
321
- /*#__PURE__*/ _jsx("div", {
322
- className: styles.con,
323
- dangerouslySetInnerHTML: {
324
- __html: span
325
- }
326
- })
327
- ]
328
- }, item.id);
375
+ return /*#__PURE__*/ _jsxs(_Fragment, {
376
+ children: [
377
+ /*#__PURE__*/ _jsxs("div", {
378
+ className: styles.list_summary,
379
+ id: item.roomId,
380
+ onClick: function() {
381
+ if (item.count == 1) {
382
+ calculationData(item.roomId, item.id, item.member);
383
+ } else {
384
+ showDetails(item.roomId, item.show);
385
+ }
386
+ },
387
+ children: [
388
+ /*#__PURE__*/ _jsx("div", {
389
+ className: styles.head_img,
390
+ children: item.member == "AI" ? /*#__PURE__*/ _jsx(CustomAiIcon, {}) : /*#__PURE__*/ _jsx("img", {
391
+ src: item.headImg
392
+ })
393
+ }),
394
+ /*#__PURE__*/ _jsxs("div", {
395
+ className: styles.list_desc,
396
+ children: [
397
+ /*#__PURE__*/ _jsxs("p", {
398
+ className: styles.name,
399
+ children: [
400
+ item.member == "AI" ? "AI助手" : item.name,
401
+ item.count == 1 ? /*#__PURE__*/ _jsx("span", {
402
+ className: styles.time,
403
+ children: time
404
+ }) : ""
405
+ ]
406
+ }),
407
+ item.count == 1 ? /*#__PURE__*/ _jsx("p", {
408
+ className: styles.decs,
409
+ style: {
410
+ width: "calc(100% - 36px)"
411
+ },
412
+ dangerouslySetInnerHTML: {
413
+ __html: span
414
+ }
415
+ }) : /*#__PURE__*/ _jsx("p", {
416
+ className: styles.decs,
417
+ children: "".concat(item.count, "条相关聊天记录")
418
+ })
419
+ ]
420
+ }),
421
+ item.count != 1 ? /*#__PURE__*/ _jsx("div", {
422
+ className: "".concat(styles.open, " ").concat(item.show ? styles.active : ""),
423
+ children: /*#__PURE__*/ _jsx(CustomExpand, {})
424
+ }) : ""
425
+ ]
426
+ }),
427
+ /*#__PURE__*/ _jsxs("div", {
428
+ className: styles.list_detail,
429
+ children: [
430
+ item.show && item.detailsList && item.detailsList.map(function(list) {
431
+ // console.log(list,item,'dklfvmdflkvmdfklv')
432
+ var name = "";
433
+ if (list.sender == "AI") {
434
+ name = "AI助手";
435
+ } else if (list.sender == item.member) {
436
+ name = item.name;
437
+ } else {
438
+ name = userData.real_name;
439
+ }
440
+ var time = "";
441
+ var currentTime = getDataTime(-1, 1); //当前时间
442
+ var updatedAt = getDataTime(list.updatedAt, 1);
443
+ if (currentTime == updatedAt) {
444
+ time = getDataTime(list.updatedAt, 2);
445
+ } else {
446
+ time = getDataTime(list.updatedAt);
447
+ }
448
+ var reg = /[`~!@#$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、]/im;
449
+ var span = "";
450
+ //搜索内容是否有特殊字符
451
+ if (reg.test(keyWordProblem)) {
452
+ span = list.message.replaceAll(keyWordProblem, function(e) {
453
+ return "<span class=".concat(styles.sign, ">").concat(e, "</span>");
454
+ });
455
+ } else {
456
+ span = list.message.replaceAll(new RegExp(keyWordProblem, "ig"), function(i) {
457
+ // console.log(i,'skdcnsdjk')
458
+ return "<span class=".concat(styles.sign, ">").concat(i, "</span>");
459
+ });
460
+ }
461
+ return /*#__PURE__*/ _jsxs("div", {
462
+ className: styles.list,
463
+ onClick: function() {
464
+ calculationData(item.roomId, list.id, list.receiver);
465
+ },
466
+ children: [
467
+ /*#__PURE__*/ _jsxs("div", {
468
+ className: styles.name,
469
+ children: [
470
+ /*#__PURE__*/ _jsx("p", {
471
+ children: name
472
+ }),
473
+ /*#__PURE__*/ _jsx("span", {
474
+ className: styles.time,
475
+ children: time
476
+ })
477
+ ]
478
+ }),
479
+ /*#__PURE__*/ _jsx("div", {
480
+ className: styles.con,
481
+ dangerouslySetInnerHTML: {
482
+ __html: span
483
+ }
484
+ })
485
+ ]
486
+ }, list.id);
487
+ }),
488
+ item.show && item.pageCount > 1 && item.pageCount > item.pageNum && /*#__PURE__*/ _jsx("div", {
489
+ className: "".concat(styles.list, " ").concat(styles.list_more),
490
+ onClick: function() {
491
+ loadMore(item.pageNum + 1, item.roomId);
492
+ },
493
+ children: "点击加载更多"
494
+ })
495
+ ]
496
+ })
497
+ ]
498
+ });
499
+ })
329
500
  })
330
501
  ]
331
502
  })