bhd-components 0.7.15 → 0.7.16

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.
@@ -1,5 +1,5 @@
1
- import { z as zhCN, C as ConfigProvider, _ as _extends, a as _object_destructuring_empty, j as jsx, b as _object_spread_props, S as StyleProvider, t as transform, c as _object_spread, d as _sliced_to_array, T as Tooltip, e as Table$2, I as Icon, f as jsxs, m as message, E as ExclamationCircleFilled, P as Pagination, g as Select, h as CaretDownOutlined, M as Modal, i as _inherits, k as _create_super, l as _create_class, n as _class_call_check, o as _define_property, p as _assert_this_initialized, q as _async_to_generator, L as LeftOutlined, R as RightOutlined, r as MinusOutlined, s as PlusOutlined, u as __generator, v as Input, w as SearchOutlined, x as CloseOutlined, X, y as I, H, A as Remarkable, D as Drawer, B as HighlightJS, Z as ZoomInOutlined, F as _to_consumable_array } from './954539dd.esm.es5.development.js';
2
- export { G as Affix, J as Alert, K as Anchor, aF as App, N as AutoComplete, O as Avatar, U as BackTop, V as Badge, W as Breadcrumb, Y as Button, $ as Calendar, a0 as Card, a1 as Carousel, a2 as Cascader, a3 as Checkbox, a4 as Col, a5 as Collapse, a6 as DatePicker, a7 as Descriptions, a8 as Divider, D as Drawer, a9 as Dropdown, aa as Empty, Q as FloatButton, ab as Form, ac as Grid, ad as Image, v as Input, ae as InputNumber, af as Layout, ag as List, ah as Mentions, ai as Menu, M as Modal, ak as Popconfirm, al as Popover, am as Progress, aM as QRCode, an as Radio, ao as Rate, ap as Result, aq as Row, ar as Segmented, g as Select, as as Skeleton, at as Slider, au as Space, av as Spin, aw as Statistic, ax as Steps, ay as Switch, az as Tabs, aA as Tag, aC as TimePicker, aD as Timeline, T as Tooltip, aE as Tour, aG as Transfer, aH as Tree, aI as TreeSelect, aJ as Typography, aK as Upload, aL as Watermark, aO as en_US, aj as notification, aB as theme, aN as version, z as zh_CN } from './954539dd.esm.es5.development.js';
1
+ import { z as zhCN, C as ConfigProvider, _ as _extends, a as _object_destructuring_empty, j as jsx, b as _object_spread_props, S as StyleProvider, t as transform, c as _object_spread, d as _sliced_to_array, T as Tooltip, e as Table$2, I as Icon, f as jsxs, m as message, E as ExclamationCircleFilled, P as Pagination, g as Select, h as CaretDownOutlined, M as Modal, i as _inherits, k as _create_super, l as _create_class, n as _class_call_check, o as _define_property, p as _assert_this_initialized, q as _async_to_generator, L as LeftOutlined, R as RightOutlined, r as MinusOutlined, s as PlusOutlined, u as __generator, v as Input, w as SearchOutlined, x as CloseOutlined, X, y as I, H, A as Remarkable, D as Drawer, B as HighlightJS, Z as ZoomInOutlined, F as _to_consumable_array } from './cb6a18bd.esm.es5.development.js';
2
+ export { G as Affix, J as Alert, K as Anchor, aF as App, N as AutoComplete, O as Avatar, U as BackTop, V as Badge, W as Breadcrumb, Y as Button, $ as Calendar, a0 as Card, a1 as Carousel, a2 as Cascader, a3 as Checkbox, a4 as Col, a5 as Collapse, a6 as DatePicker, a7 as Descriptions, a8 as Divider, D as Drawer, a9 as Dropdown, aa as Empty, Q as FloatButton, ab as Form, ac as Grid, ad as Image, v as Input, ae as InputNumber, af as Layout, ag as List, ah as Mentions, ai as Menu, M as Modal, ak as Popconfirm, al as Popover, am as Progress, aM as QRCode, an as Radio, ao as Rate, ap as Result, aq as Row, ar as Segmented, g as Select, as as Skeleton, at as Slider, au as Space, av as Spin, aw as Statistic, ax as Steps, ay as Switch, az as Tabs, aA as Tag, aC as TimePicker, aD as Timeline, T as Tooltip, aE as Tour, aG as Transfer, aH as Tree, aI as TreeSelect, aJ as Typography, aK as Upload, aL as Watermark, aO as en_US, aj as notification, aB as theme, aN as version, z as zh_CN } from './cb6a18bd.esm.es5.development.js';
3
3
  import * as React from 'react';
4
4
  import { useState, useRef, useEffect, useLayoutEffect, forwardRef, useImperativeHandle } from 'react';
5
5
  import { Fragment } from 'react/jsx-runtime';
@@ -4448,47 +4448,48 @@ var CustomerService = function(props) {
4448
4448
  ],
4449
4449
  "maximum": 3
4450
4450
  }).then(function(res) {
4451
- var data = res.data.questions;
4452
- var questionsList = null;
4453
- if (data.length > 0) {
4454
- questionsList = data.map(function(item, index) {
4455
- if (index < 3) {
4451
+ try {
4452
+ var data = res.data.questions;
4453
+ var questionsList = null;
4454
+ if (data.length > 0) {
4455
+ questionsList = data.map(function(item, index) {
4456
4456
  return {
4457
4457
  key: "messageSource",
4458
4458
  value: item.id,
4459
4459
  question: item.question,
4460
4460
  answer: item.answer
4461
4461
  };
4462
- } else {
4463
- return null;
4464
- }
4465
- });
4466
- }
4467
- var obj = {
4468
- roomId: roomId,
4469
- sender: "AI",
4470
- recevier: mid,
4471
- message: "Hi,我是智能学习助手,你遇到了什么问题?",
4472
- extraInfos: questionsList.length > 0 ? questionsList : null
4473
- };
4474
- if (pageNumHistory <= 1) {
4475
- setHistoryMessageList(function(historyMessageList) {
4476
- var newHistoryMessageList = historyMessageList.filter(function(e) {
4477
- return e.id != "123456_date";
4478
4462
  });
4479
- newHistoryMessageList.push(_object_spread_props(_object_spread({}, obj), {
4480
- id: "123456_date",
4481
- upvoted: false,
4482
- downvoted: false,
4483
- quotedMessage: "",
4484
- createdAt: getDataTime(-1),
4485
- extraInfo: JSON.stringify(obj.extraInfos)
4486
- }));
4487
- return newHistoryMessageList;
4488
- });
4489
- scrollToBottom();
4490
- }
4491
- return;
4463
+ }
4464
+ console.log("dflkvmdfklvdf欢迎语", data);
4465
+ var obj = {
4466
+ roomId: roomId,
4467
+ sender: "AI",
4468
+ recevier: mid,
4469
+ message: "Hi,我是智能学习助手,你遇到了什么问题?",
4470
+ extraInfos: questionsList == null ? null : questionsList
4471
+ };
4472
+ if (pageNumHistory <= 1) {
4473
+ console.log("欢迎语");
4474
+ setHistoryMessageList(function(historyMessageList) {
4475
+ var newHistoryMessageList = historyMessageList.filter(function(e) {
4476
+ return e.id != "123456_date";
4477
+ });
4478
+ newHistoryMessageList.push(_object_spread_props(_object_spread({}, obj), {
4479
+ id: "123456_date",
4480
+ upvoted: false,
4481
+ downvoted: false,
4482
+ quotedMessage: "",
4483
+ createdAt: getDataTime(-1),
4484
+ extraInfo: obj.extraInfos != null ? JSON.stringify(obj.extraInfos) : null
4485
+ }));
4486
+ console.log(newHistoryMessageList, 3333333333339999);
4487
+ return newHistoryMessageList;
4488
+ });
4489
+ scrollToBottom();
4490
+ }
4491
+ return;
4492
+ } catch (error) {}
4492
4493
  }).catch(function() {});
4493
4494
  }
4494
4495
  } else {
@@ -4528,6 +4529,7 @@ var CustomerService = function(props) {
4528
4529
  var questionsList = [];
4529
4530
  var obj = {};
4530
4531
  if (type == 1) {
4532
+ console.log("dflkvmdfklvdf欢迎语");
4531
4533
  sendWelcomMessage();
4532
4534
  // console.log(hotQuestionsList,newHotQuestionsList.current,'33322221111');
4533
4535
  // if(newHotQuestionsList.current.length > 0){