bhd-components 0.7.9 → 0.7.10

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, F as _to_consumable_array, Z as ZoomInOutlined } from './072bdcac.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 './072bdcac.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 './e7af2e4a.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 './e7af2e4a.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';
@@ -3166,7 +3166,7 @@ var AppViewImage = /*#__PURE__*/ forwardRef(function(props, ref) {
3166
3166
  });
3167
3167
  var ViewImage$1 = AppViewImage;
3168
3168
 
3169
- var modules_63b47c51 = {"service_ChatWindow_Drawer":"index_module_service_ChatWindow_Drawer__a8c40776","ChatWindow_Modal":"index_module_ChatWindow_Modal__a8c40776","ChatWindow_Drawer":"index_module_ChatWindow_Drawer__a8c40776","header_wrap":"index_module_header_wrap__a8c40776","top":"index_module_top__a8c40776","user":"index_module_user__a8c40776","count":"index_module_count__a8c40776","operate":"index_module_operate__a8c40776","line":"index_module_line__a8c40776","popover_main":"index_module_popover_main__a8c40776","popover":"index_module_popover__a8c40776","header_wrap_newlabo":"index_module_header_wrap_newlabo__a8c40776","Drawer_main":"index_module_Drawer_main__a8c40776","loading":"index_module_loading__a8c40776","message_con":"index_module_message_con__a8c40776","left":"index_module_left__a8c40776","head_sculpture":"index_module_head_sculpture__a8c40776","main_content":"index_module_main_content__a8c40776","right":"index_module_right__a8c40776","main":"index_module_main__a8c40776","main_content_flag":"index_module_main_content_flag__a8c40776","operate_modal":"index_module_operate_modal__a8c40776","operate_modal_bottom":"index_module_operate_modal_bottom__a8c40776","active":"index_module_active__a8c40776","stop_generate":"index_module_stop_generate__a8c40776","icon":"index_module_icon__a8c40776","find_teacher":"index_module_find_teacher__a8c40776","stop_findTeacher":"index_module_stop_findTeacher__a8c40776","content":"index_module_content__a8c40776","content_child":"index_module_content_child__a8c40776","sign":"index_module_sign__a8c40776","ask_question":"index_module_ask_question__a8c40776","association_problem":"index_module_association_problem__a8c40776","img_con":"index_module_img_con__a8c40776","mask_zoom":"index_module_mask_zoom__a8c40776","copyCode":"index_module_copyCode__a8c40776","time":"index_module_time__a8c40776","citation_content":"index_module_citation_content__a8c40776","text_exceed":"index_module_text_exceed__a8c40776","popover_content":"index_module_popover_content__a8c40776","Drawer_main_newlabo":"index_module_Drawer_main_newlabo__a8c40776","Drawer_main_newlabo_no_pic":"index_module_Drawer_main_newlabo_no_pic__a8c40776","Drawer_buttom_Issues_List":"index_module_Drawer_buttom_Issues_List__a8c40776","issues_list_teacherList":"index_module_issues_list_teacherList__a8c40776","item":"index_module_item__a8c40776","issues_list":"index_module_issues_list__a8c40776","issues_list_flag":"index_module_issues_list_flag__a8c40776","Drawer_buttom":"index_module_Drawer_buttom__a8c40776","input_wrap":"index_module_input_wrap__a8c40776","input":"index_module_input__a8c40776","picture_layout":"index_module_picture_layout__a8c40776","icon_close":"index_module_icon_close__a8c40776","icon_zoom":"index_module_icon_zoom__a8c40776","anticon":"index_module_anticon__a8c40776","no_AI":"index_module_no_AI__a8c40776","screenshot":"index_module_screenshot__a8c40776","disabled":"index_module_disabled__a8c40776","content_main":"index_module_content_main__a8c40776","content_con":"index_module_content_con__a8c40776","delete_quote":"index_module_delete_quote__a8c40776","sending":"index_module_sending__a8c40776","Drawer_buttom_Issues_List_newlabo":"index_module_Drawer_buttom_Issues_List_newlabo__a8c40776","main_list":"index_module_main_list__a8c40776","chat_content":"index_module_chat_content__a8c40776","popover_main_content":"index_module_popover_main_content__a8c40776","popover_main_content_name":"index_module_popover_main_content_name__a8c40776","teacher_layout":"index_module_teacher_layout__a8c40776","bottom":"index_module_bottom__a8c40776","delete":"index_module_delete__a8c40776","num":"index_module_num__a8c40776","shrink":"index_module_shrink__a8c40776","teacher_layout_newlabo":"index_module_teacher_layout_newlabo__a8c40776","teacher_layout_modal":"index_module_teacher_layout_modal__a8c40776","ai":"index_module_ai__a8c40776","user_info":"index_module_user_info__a8c40776","message":"index_module_message__a8c40776","con":"index_module_con__a8c40776","teacher_layout_modal_newlabo":"index_module_teacher_layout_modal_newlabo__a8c40776","history_list":"index_module_history_list__a8c40776","search_layout":"index_module_search_layout__a8c40776","mymove":"index_module_mymove__a8c40776","title":"index_module_title__a8c40776","search_top":"index_module_search_top__a8c40776","list_item":"index_module_list_item__a8c40776","list_summary":"index_module_list_summary__a8c40776","head_img":"index_module_head_img__a8c40776","list_desc":"index_module_list_desc__a8c40776","name":"index_module_name__a8c40776","decs":"index_module_decs__a8c40776","open":"index_module_open__a8c40776","list_summary_active":"index_module_list_summary_active__a8c40776","list_detail":"index_module_list_detail__a8c40776","list":"index_module_list__a8c40776","list_more":"index_module_list_more__a8c40776","no_data":"index_module_no_data__a8c40776","history_list_broadside":"index_module_history_list_broadside__a8c40776","screenshot_Modal":"index_module_screenshot_Modal__a8c40776","screenshot_Modal_btn":"index_module_screenshot_Modal_btn__a8c40776"};
3169
+ var modules_63b47c51 = {"service_ChatWindow_Drawer":"index_module_service_ChatWindow_Drawer__cb4626a6","ChatWindow_Modal":"index_module_ChatWindow_Modal__cb4626a6","ChatWindow_Drawer":"index_module_ChatWindow_Drawer__cb4626a6","header_wrap":"index_module_header_wrap__cb4626a6","top":"index_module_top__cb4626a6","user":"index_module_user__cb4626a6","count":"index_module_count__cb4626a6","operate":"index_module_operate__cb4626a6","line":"index_module_line__cb4626a6","popover_main":"index_module_popover_main__cb4626a6","popover":"index_module_popover__cb4626a6","header_wrap_newlabo":"index_module_header_wrap_newlabo__cb4626a6","Drawer_main":"index_module_Drawer_main__cb4626a6","loading":"index_module_loading__cb4626a6","message_con":"index_module_message_con__cb4626a6","left":"index_module_left__cb4626a6","head_sculpture":"index_module_head_sculpture__cb4626a6","main_content":"index_module_main_content__cb4626a6","right":"index_module_right__cb4626a6","main":"index_module_main__cb4626a6","main_content_flag":"index_module_main_content_flag__cb4626a6","operate_modal":"index_module_operate_modal__cb4626a6","operate_modal_bottom":"index_module_operate_modal_bottom__cb4626a6","active":"index_module_active__cb4626a6","stop_generate":"index_module_stop_generate__cb4626a6","icon":"index_module_icon__cb4626a6","find_teacher":"index_module_find_teacher__cb4626a6","stop_findTeacher":"index_module_stop_findTeacher__cb4626a6","content":"index_module_content__cb4626a6","content_child":"index_module_content_child__cb4626a6","sign":"index_module_sign__cb4626a6","ask_question":"index_module_ask_question__cb4626a6","association_problem":"index_module_association_problem__cb4626a6","img_con":"index_module_img_con__cb4626a6","mask_zoom":"index_module_mask_zoom__cb4626a6","copyCode":"index_module_copyCode__cb4626a6","association_problem_flag":"index_module_association_problem_flag__cb4626a6","related_issues_flag":"index_module_related_issues_flag__cb4626a6","time":"index_module_time__cb4626a6","citation_content":"index_module_citation_content__cb4626a6","text_exceed":"index_module_text_exceed__cb4626a6","popover_content":"index_module_popover_content__cb4626a6","Drawer_main_newlabo":"index_module_Drawer_main_newlabo__cb4626a6","Drawer_main_newlabo_no_pic":"index_module_Drawer_main_newlabo_no_pic__cb4626a6","Drawer_buttom_Issues_List":"index_module_Drawer_buttom_Issues_List__cb4626a6","issues_list_teacherList":"index_module_issues_list_teacherList__cb4626a6","item":"index_module_item__cb4626a6","issues_list":"index_module_issues_list__cb4626a6","issues_list_flag":"index_module_issues_list_flag__cb4626a6","Drawer_buttom":"index_module_Drawer_buttom__cb4626a6","input_wrap":"index_module_input_wrap__cb4626a6","input":"index_module_input__cb4626a6","picture_layout":"index_module_picture_layout__cb4626a6","icon_close":"index_module_icon_close__cb4626a6","icon_zoom":"index_module_icon_zoom__cb4626a6","anticon":"index_module_anticon__cb4626a6","no_AI":"index_module_no_AI__cb4626a6","screenshot":"index_module_screenshot__cb4626a6","disabled":"index_module_disabled__cb4626a6","content_main":"index_module_content_main__cb4626a6","content_con":"index_module_content_con__cb4626a6","delete_quote":"index_module_delete_quote__cb4626a6","sending":"index_module_sending__cb4626a6","Drawer_buttom_Issues_List_newlabo":"index_module_Drawer_buttom_Issues_List_newlabo__cb4626a6","main_list":"index_module_main_list__cb4626a6","chat_content":"index_module_chat_content__cb4626a6","popover_main_content":"index_module_popover_main_content__cb4626a6","popover_main_content_name":"index_module_popover_main_content_name__cb4626a6","teacher_layout":"index_module_teacher_layout__cb4626a6","bottom":"index_module_bottom__cb4626a6","delete":"index_module_delete__cb4626a6","num":"index_module_num__cb4626a6","shrink":"index_module_shrink__cb4626a6","teacher_layout_newlabo":"index_module_teacher_layout_newlabo__cb4626a6","teacher_layout_modal":"index_module_teacher_layout_modal__cb4626a6","ai":"index_module_ai__cb4626a6","user_info":"index_module_user_info__cb4626a6","message":"index_module_message__cb4626a6","con":"index_module_con__cb4626a6","teacher_layout_modal_newlabo":"index_module_teacher_layout_modal_newlabo__cb4626a6","history_list":"index_module_history_list__cb4626a6","search_layout":"index_module_search_layout__cb4626a6","mymove":"index_module_mymove__cb4626a6","title":"index_module_title__cb4626a6","search_top":"index_module_search_top__cb4626a6","list_item":"index_module_list_item__cb4626a6","list_summary":"index_module_list_summary__cb4626a6","head_img":"index_module_head_img__cb4626a6","list_desc":"index_module_list_desc__cb4626a6","name":"index_module_name__cb4626a6","decs":"index_module_decs__cb4626a6","open":"index_module_open__cb4626a6","list_summary_active":"index_module_list_summary_active__cb4626a6","list_detail":"index_module_list_detail__cb4626a6","list":"index_module_list__cb4626a6","list_more":"index_module_list_more__cb4626a6","no_data":"index_module_no_data__cb4626a6","history_list_broadside":"index_module_history_list_broadside__cb4626a6","screenshot_Modal":"index_module_screenshot_Modal__cb4626a6","screenshot_Modal_btn":"index_module_screenshot_Modal_btn__cb4626a6"};
3170
3170
 
3171
3171
  //消息已读
3172
3172
  var readMessage = function(roomId, urllocation, userData, http) {
@@ -4145,6 +4145,7 @@ var CustomerService = function(props) {
4145
4145
  var _useState4 = _sliced_to_array(useState(""), 2), keyWord = _useState4[0], setKeyWord = _useState4[1]; //搜索内容
4146
4146
  var _useState5 = _sliced_to_array(useState([]), 2), questionsList = _useState5[0], setQuestionsList = _useState5[1]; //问题列表
4147
4147
  var _useState6 = _sliced_to_array(useState([]), 2), hotQuestionsList = _useState6[0], setHotQuestionsList = _useState6[1]; //热门问题
4148
+ // const [videoHotQuestionsList, setVideoHotQuestionsList] = useState([]); //热门问题
4148
4149
  var _useState7 = _sliced_to_array(useState(false), 2), greetingMessage = _useState7[0], setGreetingMessage = _useState7[1]; //聊天记录列表是否请求完成
4149
4150
  var _useState8 = _sliced_to_array(useState(1), 2), pageNum = _useState8[0], setPageNum = _useState8[1]; //页码
4150
4151
  var _useState9 = _sliced_to_array(useState(0), 2), pageNumHistory = _useState9[0], setPageNumHistory = _useState9[1]; //用于搜索历史记录后的页码
@@ -4182,6 +4183,7 @@ var CustomerService = function(props) {
4182
4183
  var scrollTopHei = useRef(0);
4183
4184
  var isPosition = useRef(true);
4184
4185
  var recommendeQuestionID = useRef([]); //推荐问题id
4186
+ var videoHotQuestionsList = useRef([]); //视频热门问题
4185
4187
  var mid = props.userData.mid;
4186
4188
  var remarkable = new Remarkable({
4187
4189
  highlight: function highlight(str, lang) {
@@ -4196,57 +4198,48 @@ var CustomerService = function(props) {
4196
4198
  return ""; // use external default escaping
4197
4199
  }
4198
4200
  });
4201
+ useEffect(function() {
4202
+ // console.log(props,'lsdkcmsdlcksd')
4203
+ // getQuestiionsList("", 1);
4204
+ if (props.config && props.config.type == "video") {
4205
+ //获取热门推荐
4206
+ videoPageQuestiionsList(1);
4207
+ // getQuestiionsList("", 3)
4208
+ }
4209
+ setShowType(initShowType);
4210
+ //获取视频页面推荐问题
4211
+ // videoPageQuestiionsList();
4212
+ // scrollToBottom();
4213
+ }, [
4214
+ initShowType
4215
+ ]);
4199
4216
  useEffect(function() {
4200
4217
  if (showType == 5) {
4201
- // 获取屏幕流
4202
- // 获取 video 元素和 canvas 元素
4203
- // var video = document.getElementById('container_html5_api');
4204
- // // const canvas = document.createElement('canvas');
4205
- // const canvas = document.getElementById('canvas_test');
4206
- // var context = canvas.getContext('2d');
4207
- // // 设置 canvas 尺寸
4208
- // canvas.width = video.videoWidth/4;
4209
- // canvas.height = video.videoHeight/4;
4210
- // // 在 canvas 上绘制 video 的当前帧
4211
- // context.drawImage(video, 0, 0, canvas.width, canvas.height);
4212
- // // 使用 html2canvas 对 canvas 进行截图
4213
- // html2canvas(canvas,{
4214
- // scale: 1,
4215
- // useCORS: true,
4216
- // logging: true,
4217
- // }).then(function(screenshot) {
4218
- // // 将截图显示在页面上,或者进行其他操作
4219
- // document.body.appendChild(screenshot);
4220
- // setTimeout(()=>{
4221
- // let url = screenshot.toDataURL('image/png');
4222
- // console.log(url);
4223
- // },3000)
4224
- // // console.log("container_html5_apicontainer_html5_api",screenshot)
4225
- // // console.log(screenshot.toDataURL('image/jpeg'))
4226
- // });
4227
- // // 显示图片或者做其他操作
4228
4218
  try {
4229
4219
  setImgBese64("");
4230
- html2canvas(document.getElementsByTagName("html")[0]).then(function(canvas) {
4231
- console.log(canvas, 22222);
4232
- setTimeout(function() {
4233
- var dom = document.getElementById(screenshotAreaId);
4234
- //let dom = document.getElementById("container_html5_api");
4235
- //let dom = document.getElementsByTagName('html')[0];
4236
- html2canvas(dom, {
4237
- useCORS: true,
4238
- // allowTaint: true, // 污染处理
4239
- scale: 1
4240
- }).then(function(canvas) {
4241
- // document.body.appendChild(canvas);
4242
- // document.body.appendChild(canvas);
4243
- console.log(canvas, 4444444);
4244
- // var base64URL = canvas.toDataURL('image/jpeg')
4245
- var base64URL = canvas.toDataURL("image/jpg", 1.0);
4246
- setImgBese64(base64URL);
4247
- });
4248
- }, 100);
4220
+ // html2canvas(document.getElementsByTagName('html')[0],{
4221
+ // // ignoreElements:(element)=>{
4222
+ // // if(element.compareDocumentPosition(dom)===2)return true
4223
+ // // return false
4224
+ // // }
4225
+ // }).then((canvas)=>{
4226
+ // console.log(canvas,22222);
4227
+ // setTimeout(()=>{
4228
+ var dom = document.getElementById(screenshotAreaId);
4229
+ html2canvas(dom, {
4230
+ useCORS: true,
4231
+ // allowTaint: true, // 污染处理
4232
+ scale: 1
4233
+ }).then(function(canvas) {
4234
+ // document.body.appendChild(canvas);
4235
+ // document.body.appendChild(canvas);
4236
+ console.log(canvas, 99999);
4237
+ // var base64URL = canvas.toDataURL('image/jpeg')
4238
+ var base64URL = canvas.toDataURL("image/jpg", 1.0);
4239
+ setImgBese64(base64URL);
4249
4240
  });
4241
+ // },100)
4242
+ // })
4250
4243
  } catch (error) {
4251
4244
  console.log(error);
4252
4245
  }
@@ -4333,16 +4326,21 @@ var CustomerService = function(props) {
4333
4326
  buttomHei,
4334
4327
  showType
4335
4328
  ]);
4329
+ //创建聊天室并获取聊天室列表
4336
4330
  useEffect(function() {
4337
- // console.log(props,'lsdkcmsdlcksd')
4338
- // getQuestiionsList("", 1);
4339
- setShowType(initShowType);
4340
- //获取视频页面推荐问题
4341
- videoPageQuestiionsList();
4342
- scrollToBottom();
4343
- }, [
4344
- initShowType
4345
- ]);
4331
+ createRooms("AI").then(function(res) {
4332
+ setRoomId(res.data.id);
4333
+ });
4334
+ roomsListTimer();
4335
+ return function() {
4336
+ clearTimeout(receiveMessageTimer.current);
4337
+ // clearTimeout(voiceCountdownTimer.current);
4338
+ clearTimeout(listTimer.current);
4339
+ clearTimeout(timer.current);
4340
+ clearTimeout(roomMessage.current);
4341
+ clearTimeout(chatRoomList.current);
4342
+ };
4343
+ }, []);
4346
4344
  useEffect(function() {
4347
4345
  if (roomId != "") {
4348
4346
  if (lastId == "") {
@@ -4363,21 +4361,6 @@ var CustomerService = function(props) {
4363
4361
  }, [
4364
4362
  roomId
4365
4363
  ]);
4366
- //创建聊天室并获取聊天室列表
4367
- useEffect(function() {
4368
- createRooms("AI").then(function(res) {
4369
- setRoomId(res.data.id);
4370
- });
4371
- roomsListTimer();
4372
- return function() {
4373
- clearTimeout(receiveMessageTimer.current);
4374
- // clearTimeout(voiceCountdownTimer.current);
4375
- clearTimeout(listTimer.current);
4376
- clearTimeout(timer.current);
4377
- clearTimeout(roomMessage.current);
4378
- clearTimeout(chatRoomList.current);
4379
- };
4380
- }, []);
4381
4364
  //进入页面,发送打招呼信息
4382
4365
  useEffect(function() {
4383
4366
  //老师的聊天窗口不发送打招呼信息
@@ -4396,9 +4379,8 @@ var CustomerService = function(props) {
4396
4379
  scrollToBottom();
4397
4380
  }
4398
4381
  }, [
4399
- greetingMessage,
4400
- hotQuestionsList
4401
- ]);
4382
+ greetingMessage
4383
+ ]); //hotQuestionsList
4402
4384
  //查找需要复制的代码
4403
4385
  var findCopyContent = function(e) {
4404
4386
  var source = findParent(e.target, styles.copyCode);
@@ -4441,10 +4423,9 @@ var CustomerService = function(props) {
4441
4423
  var questionsList = [];
4442
4424
  var obj = {};
4443
4425
  if (type == 1) {
4444
- var questionsId = [];
4426
+ console.log(hotQuestionsList, "33322221111");
4445
4427
  questionsList = hotQuestionsList.map(function(item, index) {
4446
4428
  if (index < 3) {
4447
- questionsId.push(item.id);
4448
4429
  return {
4449
4430
  key: "messageSource",
4450
4431
  value: item.id,
@@ -4455,7 +4436,6 @@ var CustomerService = function(props) {
4455
4436
  return null;
4456
4437
  }
4457
4438
  });
4458
- recommendeQuestionID.current = questionsId; //保存推荐问题id
4459
4439
  questionsList = questionsList.filter(function(i) {
4460
4440
  return i != null;
4461
4441
  });
@@ -4797,9 +4777,9 @@ var CustomerService = function(props) {
4797
4777
  }
4798
4778
  console.log(type, "接受答案77777");
4799
4779
  //获取下面的推荐问题
4800
- if (type == 2) {
4801
- videoPageQuestiionsList(2);
4802
- }
4780
+ // if(type == 2){
4781
+ // videoPageQuestiionsList(2);
4782
+ // }
4803
4783
  http.post("".concat(urllocation, "/chat-service/public/v1.0/history-messages"), obj).then(function(res) {
4804
4784
  if (res.data.id) {
4805
4785
  if (pageNumHistory <= 1) {
@@ -4878,6 +4858,7 @@ var CustomerService = function(props) {
4878
4858
  "watchTime": watchTime
4879
4859
  }
4880
4860
  ];
4861
+ obj.regenerate = false;
4881
4862
  }
4882
4863
  var data = JSON.stringify(obj);
4883
4864
  setKeyWord("");
@@ -4918,6 +4899,10 @@ var CustomerService = function(props) {
4918
4899
  });
4919
4900
  scrollToBottom();
4920
4901
  }
4902
+ if (props.config && props.config.type == "video") {
4903
+ //先请求问题列表
4904
+ videoPageQuestiionsList(3);
4905
+ }
4921
4906
  //使用fetchEventSource接收数据
4922
4907
  fetchEventSource("".concat(urllocation, "/chat-service/public/v1.0/chat-with-ai/messages"), {
4923
4908
  method: "POST",
@@ -5088,9 +5073,23 @@ var CustomerService = function(props) {
5088
5073
  } else {
5089
5074
  var newHistoryMessageList2 = list1.map(function(item) {
5090
5075
  message = item.message + obj.message;
5076
+ var extraInfo = [];
5077
+ // message = '抱歉,我暂时无法回答这样的问题。'
5078
+ if (message == "抱歉,我暂时无法回答这样的问题。") {
5079
+ extraInfo = videoHotQuestionsList.current.map(function(str, index) {
5080
+ return {
5081
+ key: "messageSource",
5082
+ value: str.id,
5083
+ question: str.question,
5084
+ answer: str.answer,
5085
+ welcomeMessage: true
5086
+ };
5087
+ });
5088
+ }
5091
5089
  if (item.id == id) {
5092
5090
  return _object_spread_props(_object_spread({}, item), {
5093
- message: message
5091
+ message: message,
5092
+ extraInfo: extraInfo == null ? item.extraInfo : JSON.stringify(extraInfo)
5094
5093
  });
5095
5094
  } else {
5096
5095
  return item;
@@ -5417,7 +5416,7 @@ var CustomerService = function(props) {
5417
5416
  } else if (flag == 3) {
5418
5417
  data = {
5419
5418
  page: 1,
5420
- maxPageSize: 4,
5419
+ maxPageSize: 5,
5421
5420
  question: value,
5422
5421
  sectionId: getQuery("s_id")
5423
5422
  };
@@ -5447,18 +5446,29 @@ var CustomerService = function(props) {
5447
5446
  } else {
5448
5447
  setQuestionsList(questionList);
5449
5448
  }
5450
- if (questionList.length < 4 && flag == 3) {
5449
+ if (questionList.length < 5 && flag == 3) {
5451
5450
  console.log("视频页面,联想问题小于4个");
5452
5451
  //视频页面,联想问题小于4个
5453
- getQuestiionsList(value, 4);
5452
+ http.get("".concat(urllocation, "/chat-service/public/v1.0/knowledge-base/questions"), {
5453
+ params: {
5454
+ page: 1,
5455
+ maxPageSize: 5 - questionList.length
5456
+ }
5457
+ }).then(function(res) {
5458
+ if (res.data.questions) {
5459
+ setHotQuestionsList(function(questionList) {
5460
+ return _to_consumable_array(questionList).concat(_to_consumable_array(res.data.questions));
5461
+ });
5462
+ }
5463
+ });
5454
5464
  }
5455
5465
  }
5456
5466
  });
5457
5467
  };
5458
- //获取视频页面热门问题 flag == 1,默认推荐问题 == 2,已经推荐过问题
5468
+ //获取视频页面热门问题 flag == 1,默认推荐问题 == 2,底部渲染问题,flag == 3,ai回答后请求相关问题
5459
5469
  var videoPageQuestiionsList = function() {
5460
5470
  var flag = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 1;
5461
- console.log(props, 3333333);
5471
+ console.log(flag, props, 3333333);
5462
5472
  var config = props.config;
5463
5473
  if (config && config.type == "video" && config.params) {
5464
5474
  var params = config.params;
@@ -5468,9 +5478,7 @@ var CustomerService = function(props) {
5468
5478
  var sectionId = params.VideoBriefSummaryId;
5469
5479
  if (videoId && courseId && sectionId) {
5470
5480
  http.post("".concat(urllocation, "/chat-service/public/v1.0/knowledge-base/questions:recommend"), {
5471
- "recommendedQuestions": flag == 2 ? recommendeQuestionID.current : [
5472
- ""
5473
- ],
5481
+ "recommendedQuestions": [],
5474
5482
  "contexts": [
5475
5483
  {
5476
5484
  "type": "VIDEO",
@@ -5480,22 +5488,32 @@ var CustomerService = function(props) {
5480
5488
  "watchTime": watchTime
5481
5489
  }
5482
5490
  ],
5483
- "maximum": 5
5491
+ "maximum": flag == 1 || flag == 2 ? 3 : 5
5484
5492
  }).then(function(res) {
5485
- console.log(res, 333333);
5486
5493
  if (res.data.total > 0) {
5487
5494
  var data = res.data.questions;
5495
+ if (flag == 3) {
5496
+ // setQuestionsList(data);
5497
+ // setVideoHotQuestionsList(data);
5498
+ videoHotQuestionsList.current = data;
5499
+ return;
5500
+ }
5488
5501
  if (flag == 2) {
5489
5502
  setBottomRecommendationQuestions(data);
5490
5503
  } else {
5491
5504
  setHotQuestionsList(data);
5492
5505
  }
5506
+ var ids = [];
5507
+ data.map(function(str) {
5508
+ ids.push(str.id);
5509
+ });
5510
+ recommendeQuestionID.current = Array.from(new Set(recommendeQuestionID.current.concat(ids)));
5493
5511
  resettingBottomHei();
5494
5512
  scrollToBottom();
5495
- console.log(data, 99999);
5496
- if (data.length < 4) {
5497
- getQuestiionsList("", 4);
5498
- }
5513
+ // console.log(data,99999);
5514
+ // if(data.length < 4){
5515
+ // getQuestiionsList('',4)
5516
+ // }
5499
5517
  }
5500
5518
  }).catch(function() {});
5501
5519
  }
@@ -5880,9 +5898,6 @@ var CustomerService = function(props) {
5880
5898
  var timeObj = parseDate(item.createdAt);
5881
5899
  // console.log(item.message);
5882
5900
  var message = item.message;
5883
- if (message == "抱歉,我暂时无法回答这样的问题。" && props.config && props.config.type == "video") {
5884
- videoPageQuestiionsList(2);
5885
- }
5886
5901
  var li;
5887
5902
  // 是否需要显示日期
5888
5903
  var itemIndex = historyMessageList.findIndex(function(ite) {
@@ -6142,23 +6157,37 @@ var CustomerService = function(props) {
6142
6157
  })
6143
6158
  ]
6144
6159
  }),
6145
- item.extraInfo != undefined && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "messageSource" && JSON.parse(item.extraInfo)[0].value != "knowledgebase" && /*#__PURE__*/ jsx("ul", {
6146
- className: styles.association_problem,
6147
- children: JSON.parse(item.extraInfo).map(function(list, index) {
6148
- return /*#__PURE__*/ jsxs("li", {
6149
- onClick: function() {
6150
- sendMessage(list, 1);
6151
- },
6152
- children: [
6153
- index + 1,
6154
- ".",
6155
- list.question
6156
- ]
6157
- }, i + "_" + index + "_" + list.value);
6158
- })
6160
+ item.extraInfo != undefined && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "messageSource" && JSON.parse(item.extraInfo)[0].value != "knowledgebase" && /*#__PURE__*/ jsxs("ul", {
6161
+ className: "".concat(styles.association_problem, " ").concat(item.message == "抱歉,我暂时无法回答这样的问题。" ? "association_problem_flag" : ""),
6162
+ children: [
6163
+ item.message == "抱歉,我暂时无法回答这样的问题。" && /*#__PURE__*/ jsx("li", {
6164
+ className: styles.related_issues_flag,
6165
+ children: /*#__PURE__*/ jsx("span", {
6166
+ children: "相关问题"
6167
+ })
6168
+ }),
6169
+ JSON.parse(item.extraInfo).map(function(list, index) {
6170
+ return /*#__PURE__*/ jsx("li", {
6171
+ onClick: function() {
6172
+ sendMessage(list, 1);
6173
+ if (props.config && props.config.type == "video") {
6174
+ //先请求问题列表
6175
+ videoPageQuestiionsList(2);
6176
+ }
6177
+ },
6178
+ children: item.message == "抱歉,我暂时无法回答这样的问题。" ? list.question : /*#__PURE__*/ jsxs(Fragment, {
6179
+ children: [
6180
+ index + 1,
6181
+ ".",
6182
+ list.question
6183
+ ]
6184
+ })
6185
+ }, i + "_" + index + "_" + list.value);
6186
+ })
6187
+ ]
6159
6188
  }),
6160
6189
  //findTeacher//是否在召唤老师过程中,是否是最后一条消息
6161
- !item.findTeacher && historyMessageList.length - 1 == i && item.id != "123456" && renderLastOperateBtn(item, isAiChatWindow, i),
6190
+ !item.findTeacher && historyMessageList.length - 1 == i && item.id != "123456" && item.id != "123456_date" && renderLastOperateBtn(item, isAiChatWindow, i),
6162
6191
  //召唤老师回答按钮
6163
6192
  isAiChatWindow && item.findTeacher && userData.modules.some(function(item) {
6164
6193
  return item.short == "TeacherAnswer";
@@ -6382,11 +6411,9 @@ var CustomerService = function(props) {
6382
6411
  if (!showStopBtn && isAiChatWindow && (extraInfo != undefined && JSON.parse(extraInfo).length > 0 && JSON.parse(extraInfo)[0].key == "questionId" || extraInfo == null) && historyMessageList[i - 1] && historyMessageList[i - 1].extraInfo && JSON.parse(historyMessageList[i - 1].extraInfo).length > 0 && JSON.parse(historyMessageList[i - 1].extraInfo)[0].key != "imageUrl") {
6383
6412
  findTeacherBtn = true;
6384
6413
  }
6414
+ /// style={{position:showStopBtn && isPosition.current ? 'sticky' : 'relative'}}
6385
6415
  return /*#__PURE__*/ jsxs("div", {
6386
6416
  className: "".concat(styles.operate_modal_bottom),
6387
- style: {
6388
- position: showStopBtn && isPosition.current ? "sticky" : "relative"
6389
- },
6390
6417
  children: [
6391
6418
  /*#__PURE__*/ jsxs("p", {
6392
6419
  className: styles.stop_generate,
@@ -6656,6 +6683,7 @@ var CustomerService = function(props) {
6656
6683
  className: styles.icon_close,
6657
6684
  onClick: function() {
6658
6685
  setScreenshotBese64("");
6686
+ resettingBottomHei();
6659
6687
  },
6660
6688
  children: /*#__PURE__*/ jsx(CustomRoundClose$1, {})
6661
6689
  }),
@@ -7032,7 +7060,7 @@ var CustomerService = function(props) {
7032
7060
  return /*#__PURE__*/ jsx("div", {
7033
7061
  className: styles.issues_list_flag,
7034
7062
  style: {
7035
- bottom: "".concat(buttomHei, "px")
7063
+ bottom: "".concat(buttomHei - 60, "px")
7036
7064
  },
7037
7065
  id: "BottomAssociationProblem",
7038
7066
  children: bottomRecommendationQuestions.map(function(item) {