bhd-components 0.7.12 → 0.7.14
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.
- package/README.md +1 -1
- package/dist/{367716ff.esm.es5.production.js → 1c8e7e4e.esm.es5.production.js} +1 -1
- package/dist/{4507d48e.esm.es5.development.js → 2a1e1288.esm.es5.development.js} +1 -1
- package/dist/index.esm.es5.development.css +1032 -1018
- package/dist/index.esm.es5.development.js +166 -38
- package/dist/index.esm.es5.production.css +1 -1
- package/dist/index.esm.es5.production.js +1 -1
- package/es2017/customerService/index.js +161 -34
- package/es2017/customerService/index.module.less +38 -27
- package/esm/customerService/index.js +163 -35
- package/esm/customerService/index.module.less +38 -27
- package/package.json +1 -1
|
@@ -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 './
|
|
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 './
|
|
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 './2a1e1288.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 './2a1e1288.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":"
|
|
3169
|
+
var modules_63b47c51 = {"service_ChatWindow_Drawer":"index_module_service_ChatWindow_Drawer__f4576182","ChatWindow_Modal":"index_module_ChatWindow_Modal__f4576182","ChatWindow_Drawer":"index_module_ChatWindow_Drawer__f4576182","header_wrap":"index_module_header_wrap__f4576182","top":"index_module_top__f4576182","user":"index_module_user__f4576182","count":"index_module_count__f4576182","operate":"index_module_operate__f4576182","line":"index_module_line__f4576182","popover_main":"index_module_popover_main__f4576182","popover":"index_module_popover__f4576182","header_wrap_newlabo":"index_module_header_wrap_newlabo__f4576182","Drawer_main":"index_module_Drawer_main__f4576182","loading":"index_module_loading__f4576182","message_con":"index_module_message_con__f4576182","left":"index_module_left__f4576182","head_sculpture":"index_module_head_sculpture__f4576182","main_content":"index_module_main_content__f4576182","right":"index_module_right__f4576182","main":"index_module_main__f4576182","main_content_flag":"index_module_main_content_flag__f4576182","operate_modal":"index_module_operate_modal__f4576182","operate_modal_bottom":"index_module_operate_modal_bottom__f4576182","active":"index_module_active__f4576182","stop_generate":"index_module_stop_generate__f4576182","icon":"index_module_icon__f4576182","find_teacher":"index_module_find_teacher__f4576182","stop_findTeacher":"index_module_stop_findTeacher__f4576182","content":"index_module_content__f4576182","content_child":"index_module_content_child__f4576182","sign":"index_module_sign__f4576182","ask_question":"index_module_ask_question__f4576182","association_problem":"index_module_association_problem__f4576182","association_problem_flag":"index_module_association_problem_flag__f4576182","related_issues_flag":"index_module_related_issues_flag__f4576182","img_con":"index_module_img_con__f4576182","mask_zoom":"index_module_mask_zoom__f4576182","img_con2":"index_module_img_con2__f4576182","copyCode":"index_module_copyCode__f4576182","time":"index_module_time__f4576182","citation_content":"index_module_citation_content__f4576182","text_exceed":"index_module_text_exceed__f4576182","popover_content":"index_module_popover_content__f4576182","Drawer_main_newlabo":"index_module_Drawer_main_newlabo__f4576182","Drawer_main_newlabo_no_pic":"index_module_Drawer_main_newlabo_no_pic__f4576182","Drawer_buttom_Issues_List":"index_module_Drawer_buttom_Issues_List__f4576182","issues_list_teacherList":"index_module_issues_list_teacherList__f4576182","item":"index_module_item__f4576182","issues_list":"index_module_issues_list__f4576182","issues_list_flag":"index_module_issues_list_flag__f4576182","Drawer_buttom":"index_module_Drawer_buttom__f4576182","input_wrap":"index_module_input_wrap__f4576182","input":"index_module_input__f4576182","picture_layout":"index_module_picture_layout__f4576182","icon_close":"index_module_icon_close__f4576182","icon_zoom":"index_module_icon_zoom__f4576182","anticon":"index_module_anticon__f4576182","no_AI":"index_module_no_AI__f4576182","screenshot":"index_module_screenshot__f4576182","disabled":"index_module_disabled__f4576182","content_main":"index_module_content_main__f4576182","content_con":"index_module_content_con__f4576182","delete_quote":"index_module_delete_quote__f4576182","sending":"index_module_sending__f4576182","Drawer_buttom_Issues_List_newlabo":"index_module_Drawer_buttom_Issues_List_newlabo__f4576182","main_list":"index_module_main_list__f4576182","chat_content":"index_module_chat_content__f4576182","popover_main_content":"index_module_popover_main_content__f4576182","popover_main_content_name":"index_module_popover_main_content_name__f4576182","teacher_layout":"index_module_teacher_layout__f4576182","bottom":"index_module_bottom__f4576182","delete":"index_module_delete__f4576182","num":"index_module_num__f4576182","shrink":"index_module_shrink__f4576182","teacher_layout_newlabo":"index_module_teacher_layout_newlabo__f4576182","teacher_layout_modal":"index_module_teacher_layout_modal__f4576182","ai":"index_module_ai__f4576182","user_info":"index_module_user_info__f4576182","message":"index_module_message__f4576182","con":"index_module_con__f4576182","teacher_layout_modal_newlabo":"index_module_teacher_layout_modal_newlabo__f4576182","history_list":"index_module_history_list__f4576182","search_layout":"index_module_search_layout__f4576182","mymove":"index_module_mymove__f4576182","title":"index_module_title__f4576182","search_top":"index_module_search_top__f4576182","list_item":"index_module_list_item__f4576182","list_summary":"index_module_list_summary__f4576182","head_img":"index_module_head_img__f4576182","list_desc":"index_module_list_desc__f4576182","name":"index_module_name__f4576182","decs":"index_module_decs__f4576182","open":"index_module_open__f4576182","list_summary_active":"index_module_list_summary_active__f4576182","list_detail":"index_module_list_detail__f4576182","list":"index_module_list__f4576182","list_more":"index_module_list_more__f4576182","no_data":"index_module_no_data__f4576182","history_list_broadside":"index_module_history_list_broadside__f4576182","screenshot_Modal":"index_module_screenshot_Modal__f4576182","screenshot_Modal_btn":"index_module_screenshot_Modal_btn__f4576182"};
|
|
3170
3170
|
|
|
3171
3171
|
//消息已读
|
|
3172
3172
|
var readMessage = function(roomId, urllocation, userData, http) {
|
|
@@ -4191,6 +4191,7 @@ var CustomerService = function(props) {
|
|
|
4191
4191
|
var isPosition = useRef(true);
|
|
4192
4192
|
var recommendeQuestionID = useRef([]); //推荐问题id
|
|
4193
4193
|
var videoHotQuestionsList = useRef([]); //视频热门问题
|
|
4194
|
+
var newHotQuestionsList = useRef([]); //视频热门问题
|
|
4194
4195
|
var mid = props.userData.mid;
|
|
4195
4196
|
var remarkable = new Remarkable({
|
|
4196
4197
|
highlight: function highlight(str, lang) {
|
|
@@ -4421,33 +4422,78 @@ var CustomerService = function(props) {
|
|
|
4421
4422
|
} catch (error) {}
|
|
4422
4423
|
}, 3000);
|
|
4423
4424
|
};
|
|
4424
|
-
|
|
4425
|
-
var
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4425
|
+
//发送欢迎语,视频页面
|
|
4426
|
+
var sendWelcomMessage = function() {
|
|
4427
|
+
if (config.type == "video") {
|
|
4428
|
+
var params = config.params;
|
|
4429
|
+
var videoId = params.videoId;
|
|
4430
|
+
var watchTime = params.videoProgress;
|
|
4431
|
+
var courseId = getQuery("yc_id");
|
|
4432
|
+
var sectionId = params.VideoBriefSummaryId;
|
|
4433
|
+
// let courseId="20899",
|
|
4434
|
+
// sectionId= "462347",
|
|
4435
|
+
// videoId= "29715",
|
|
4436
|
+
// watchTime= 677
|
|
4437
|
+
if (videoId && courseId && sectionId) {
|
|
4438
|
+
http.post("".concat(urllocation, "/chat-service/public/v1.0/knowledge-base/questions:recommend"), {
|
|
4439
|
+
"recommendedQuestions": [],
|
|
4440
|
+
"contexts": [
|
|
4441
|
+
{
|
|
4442
|
+
"type": "VIDEO",
|
|
4443
|
+
"courseId": courseId,
|
|
4444
|
+
"sectionId": sectionId,
|
|
4445
|
+
"videoId": videoId,
|
|
4446
|
+
"watchTime": watchTime
|
|
4447
|
+
}
|
|
4448
|
+
],
|
|
4449
|
+
"maximum": 3
|
|
4450
|
+
}).then(function(res) {
|
|
4451
|
+
var data = res.data.questions;
|
|
4452
|
+
var questionsList = data.map(function(item, index) {
|
|
4453
|
+
if (index < 3) {
|
|
4454
|
+
return {
|
|
4455
|
+
key: "messageSource",
|
|
4456
|
+
value: item.id,
|
|
4457
|
+
question: item.question,
|
|
4458
|
+
answer: item.answer
|
|
4459
|
+
};
|
|
4460
|
+
} else {
|
|
4461
|
+
return null;
|
|
4462
|
+
}
|
|
4463
|
+
});
|
|
4464
|
+
var obj = {
|
|
4465
|
+
roomId: roomId,
|
|
4466
|
+
sender: "AI",
|
|
4467
|
+
recevier: mid,
|
|
4468
|
+
message: "Hi,我是智能学习助手,你遇到了什么问题?",
|
|
4469
|
+
extraInfos: questionsList.length > 0 ? questionsList : null
|
|
4437
4470
|
};
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4471
|
+
if (pageNumHistory <= 1) {
|
|
4472
|
+
setHistoryMessageList(function(historyMessageList) {
|
|
4473
|
+
var newHistoryMessageList = historyMessageList.filter(function(e) {
|
|
4474
|
+
return e.id != "123456_date";
|
|
4475
|
+
});
|
|
4476
|
+
newHistoryMessageList.push(_object_spread_props(_object_spread({}, obj), {
|
|
4477
|
+
id: "123456_date",
|
|
4478
|
+
upvoted: false,
|
|
4479
|
+
downvoted: false,
|
|
4480
|
+
quotedMessage: "",
|
|
4481
|
+
createdAt: getDataTime(-1),
|
|
4482
|
+
extraInfo: JSON.stringify(obj.extraInfos)
|
|
4483
|
+
}));
|
|
4484
|
+
return newHistoryMessageList;
|
|
4485
|
+
});
|
|
4486
|
+
scrollToBottom();
|
|
4487
|
+
}
|
|
4488
|
+
return;
|
|
4489
|
+
}).catch(function() {});
|
|
4490
|
+
}
|
|
4491
|
+
} else {
|
|
4492
|
+
var obj = {
|
|
4446
4493
|
roomId: roomId,
|
|
4447
4494
|
sender: "AI",
|
|
4448
4495
|
recevier: mid,
|
|
4449
|
-
message: "Hi,我是智能学习助手,你遇到了什么问题?"
|
|
4450
|
-
extraInfos: questionsList
|
|
4496
|
+
message: "Hi,我是智能学习助手,你遇到了什么问题?"
|
|
4451
4497
|
};
|
|
4452
4498
|
if (pageNumHistory <= 1) {
|
|
4453
4499
|
setHistoryMessageList(function(historyMessageList) {
|
|
@@ -4460,12 +4506,84 @@ var CustomerService = function(props) {
|
|
|
4460
4506
|
downvoted: false,
|
|
4461
4507
|
quotedMessage: "",
|
|
4462
4508
|
createdAt: getDataTime(-1),
|
|
4463
|
-
extraInfo: JSON.stringify(obj.extraInfos)
|
|
4509
|
+
// extraInfo: JSON.stringify(obj.extraInfos),
|
|
4510
|
+
extraInfo: JSON.stringify([
|
|
4511
|
+
{
|
|
4512
|
+
key: "messageSource",
|
|
4513
|
+
value: "knowledgebase"
|
|
4514
|
+
}
|
|
4515
|
+
])
|
|
4464
4516
|
}));
|
|
4465
4517
|
return newHistoryMessageList;
|
|
4466
4518
|
});
|
|
4467
4519
|
scrollToBottom();
|
|
4468
4520
|
}
|
|
4521
|
+
}
|
|
4522
|
+
};
|
|
4523
|
+
//AI窗口,type:1发送打招呼信息 2点赞消息 3踩消息 4没有AI客服权限,5,发送超过10万字消息 6, 没有AI客服权限,发送最热的问题
|
|
4524
|
+
var sendGreetingMessage = function(type) {
|
|
4525
|
+
var questionsList = [];
|
|
4526
|
+
var obj = {};
|
|
4527
|
+
if (type == 1) {
|
|
4528
|
+
sendWelcomMessage();
|
|
4529
|
+
// console.log(hotQuestionsList,newHotQuestionsList.current,'33322221111');
|
|
4530
|
+
// if(newHotQuestionsList.current.length > 0){
|
|
4531
|
+
// questionsList = newHotQuestionsList.current.map((item, index) => {
|
|
4532
|
+
// if (index < 3) {
|
|
4533
|
+
// return {
|
|
4534
|
+
// key: "messageSource",
|
|
4535
|
+
// value: item.id,
|
|
4536
|
+
// question: item.question,
|
|
4537
|
+
// answer: item.answer,
|
|
4538
|
+
// };
|
|
4539
|
+
// } else {
|
|
4540
|
+
// return null;
|
|
4541
|
+
// }
|
|
4542
|
+
// });
|
|
4543
|
+
// }else{
|
|
4544
|
+
// questionsList = hotQuestionsList.map((item, index) => {
|
|
4545
|
+
// if (index < 3) {
|
|
4546
|
+
// return {
|
|
4547
|
+
// key: "messageSource",
|
|
4548
|
+
// value: item.id,
|
|
4549
|
+
// question: item.question,
|
|
4550
|
+
// answer: item.answer,
|
|
4551
|
+
// };
|
|
4552
|
+
// } else {
|
|
4553
|
+
// return null;
|
|
4554
|
+
// }
|
|
4555
|
+
// });
|
|
4556
|
+
// }
|
|
4557
|
+
// questionsList = questionsList.filter((i) => i != null);
|
|
4558
|
+
// obj = {
|
|
4559
|
+
// roomId: roomId,
|
|
4560
|
+
// sender: "AI",
|
|
4561
|
+
// recevier: mid,
|
|
4562
|
+
// message: `Hi,我是智能学习助手,你遇到了什么问题?`,
|
|
4563
|
+
// extraInfos: questionsList,
|
|
4564
|
+
// };
|
|
4565
|
+
// if(pageNumHistory <= 1){
|
|
4566
|
+
// setHistoryMessageList((historyMessageList) => {
|
|
4567
|
+
// let newHistoryMessageList = historyMessageList.filter(e=>e.id!='123456_date');
|
|
4568
|
+
// newHistoryMessageList.push({
|
|
4569
|
+
// ...obj,
|
|
4570
|
+
// id: '123456_date',
|
|
4571
|
+
// upvoted: false,
|
|
4572
|
+
// downvoted: false,
|
|
4573
|
+
// quotedMessage: "",
|
|
4574
|
+
// createdAt: getDataTime(-1),
|
|
4575
|
+
// extraInfo: JSON.stringify(obj.extraInfos),
|
|
4576
|
+
// // extraInfo: JSON.stringify([
|
|
4577
|
+
// // {
|
|
4578
|
+
// // key: "messageSource",
|
|
4579
|
+
// // value: "knowledgebase",
|
|
4580
|
+
// // },
|
|
4581
|
+
// // ]),
|
|
4582
|
+
// });
|
|
4583
|
+
// return newHistoryMessageList;
|
|
4584
|
+
// });
|
|
4585
|
+
// scrollToBottom();
|
|
4586
|
+
// }
|
|
4469
4587
|
return;
|
|
4470
4588
|
} else if (type == 2) {
|
|
4471
4589
|
obj = {
|
|
@@ -4650,7 +4768,8 @@ var CustomerService = function(props) {
|
|
|
4650
4768
|
};
|
|
4651
4769
|
//发送知识库问题 item,flag == 1 是获取问候信息的答案,flag == 2 是普通消息,flag == 3 是针对视频页面点击底部推荐问题
|
|
4652
4770
|
var sendMessage = function(item, flag) {
|
|
4653
|
-
|
|
4771
|
+
var type = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "";
|
|
4772
|
+
console.log(item, flag, 888888888);
|
|
4654
4773
|
var questions = [];
|
|
4655
4774
|
if (item && flag) {
|
|
4656
4775
|
questions = [
|
|
@@ -4712,7 +4831,7 @@ var CustomerService = function(props) {
|
|
|
4712
4831
|
key: "questionId",
|
|
4713
4832
|
value: flag == 1 ? questions.value : questions.id,
|
|
4714
4833
|
answer: questions.answer
|
|
4715
|
-
});
|
|
4834
|
+
}, type);
|
|
4716
4835
|
setKeyWord("");
|
|
4717
4836
|
setQuestionsList([]);
|
|
4718
4837
|
setCitationContent({});
|
|
@@ -4764,7 +4883,7 @@ var CustomerService = function(props) {
|
|
|
4764
4883
|
}
|
|
4765
4884
|
};
|
|
4766
4885
|
//向知识库发送问题 或答案 type:1 发送问题 2 接受答案
|
|
4767
|
-
var sendingExistingIssues = function(type, obj, questions) {
|
|
4886
|
+
var sendingExistingIssues = function(type, obj, questions, problemType) {
|
|
4768
4887
|
if (pageNumHistory <= 1) {
|
|
4769
4888
|
setHistoryMessageList(function(historyMessageList) {
|
|
4770
4889
|
var newHistoryMessageList = historyMessageList.concat(_object_spread_props(_object_spread({}, obj), {
|
|
@@ -4815,10 +4934,10 @@ var CustomerService = function(props) {
|
|
|
4815
4934
|
}
|
|
4816
4935
|
]
|
|
4817
4936
|
};
|
|
4818
|
-
sendingExistingIssues(2, dataObj, "");
|
|
4937
|
+
sendingExistingIssues(2, dataObj, "", problemType);
|
|
4819
4938
|
testLabQuestion(obj.message, questions.answer, "");
|
|
4820
4939
|
}
|
|
4821
|
-
if (type == 2 && config && config.type == "video") {
|
|
4940
|
+
if (type == 2 && config && config.type == "video" && problemType != "AssociativeProblem") {
|
|
4822
4941
|
//先请求问题列表
|
|
4823
4942
|
videoPageQuestiionsList(2);
|
|
4824
4943
|
}
|
|
@@ -4868,6 +4987,7 @@ var CustomerService = function(props) {
|
|
|
4868
4987
|
obj.regenerate = false;
|
|
4869
4988
|
}
|
|
4870
4989
|
var data = JSON.stringify(obj);
|
|
4990
|
+
var flagKeyWord = keyWord;
|
|
4871
4991
|
setKeyWord("");
|
|
4872
4992
|
setQuestionsList([]);
|
|
4873
4993
|
setTimeout(function() {
|
|
@@ -5014,7 +5134,9 @@ var CustomerService = function(props) {
|
|
|
5014
5134
|
}
|
|
5015
5135
|
if (msg.finished) {
|
|
5016
5136
|
setFinished(true); //发送结束
|
|
5017
|
-
|
|
5137
|
+
if (!flagKeyWord) {
|
|
5138
|
+
videoPageQuestiionsList(2);
|
|
5139
|
+
}
|
|
5018
5140
|
// isPosition.current = true;
|
|
5019
5141
|
setTimeout(function() {
|
|
5020
5142
|
isPosition.current = true;
|
|
@@ -5081,7 +5203,7 @@ var CustomerService = function(props) {
|
|
|
5081
5203
|
} else {
|
|
5082
5204
|
var newHistoryMessageList2 = list1.map(function(item) {
|
|
5083
5205
|
message = item.message + obj.message;
|
|
5084
|
-
var extraInfo =
|
|
5206
|
+
var extraInfo = null;
|
|
5085
5207
|
// message = '抱歉,我暂时无法回答这样的问题。'
|
|
5086
5208
|
if (message == "抱歉,我暂时无法回答这样的问题。") {
|
|
5087
5209
|
extraInfo = videoHotQuestionsList.current.map(function(str, index) {
|
|
@@ -5486,8 +5608,8 @@ var CustomerService = function(props) {
|
|
|
5486
5608
|
var sectionId = params.VideoBriefSummaryId;
|
|
5487
5609
|
// let courseId="20899",
|
|
5488
5610
|
// sectionId= "462347",
|
|
5489
|
-
// videoId= "
|
|
5490
|
-
// watchTime=
|
|
5611
|
+
// videoId= "29715",
|
|
5612
|
+
// watchTime= 677
|
|
5491
5613
|
if (videoId && courseId && sectionId) {
|
|
5492
5614
|
console.log(recommendeQuestionID.current, "recommendeQuestionID.current");
|
|
5493
5615
|
http.post("".concat(urllocation, "/chat-service/public/v1.0/knowledge-base/questions:recommend"), {
|
|
@@ -5515,6 +5637,7 @@ var CustomerService = function(props) {
|
|
|
5515
5637
|
setBottomRecommendationQuestions(data);
|
|
5516
5638
|
} else {
|
|
5517
5639
|
setHotQuestionsList(data);
|
|
5640
|
+
newHotQuestionsList.current = data;
|
|
5518
5641
|
}
|
|
5519
5642
|
// let ids:any[] = [];
|
|
5520
5643
|
// data.map((str: { id: string; })=>{
|
|
@@ -6171,7 +6294,7 @@ var CustomerService = function(props) {
|
|
|
6171
6294
|
]
|
|
6172
6295
|
}),
|
|
6173
6296
|
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", {
|
|
6174
|
-
className: "".concat(styles.association_problem, " ").concat(item.message == "抱歉,我暂时无法回答这样的问题。" ?
|
|
6297
|
+
className: "".concat(styles.association_problem, " ").concat(item.message == "抱歉,我暂时无法回答这样的问题。" ? styles.association_problem_flag : ""),
|
|
6175
6298
|
children: [
|
|
6176
6299
|
item.message == "抱歉,我暂时无法回答这样的问题。" && /*#__PURE__*/ jsx("li", {
|
|
6177
6300
|
className: styles.related_issues_flag,
|
|
@@ -6443,6 +6566,7 @@ var CustomerService = function(props) {
|
|
|
6443
6566
|
} else if (JSON.parse(previousLineData.extraInfo).length > 0 && JSON.parse(previousLineData.extraInfo)[0].key == "imageUrl") {
|
|
6444
6567
|
showTeacherBtn = false;
|
|
6445
6568
|
}
|
|
6569
|
+
console.log(showTeacherBtn, "dlvkdfl");
|
|
6446
6570
|
/// style={{position:showStopBtn && isPosition.current ? 'sticky' : 'relative'}}
|
|
6447
6571
|
return /*#__PURE__*/ jsxs("div", {
|
|
6448
6572
|
className: "".concat(styles.operate_modal_bottom),
|
|
@@ -6840,6 +6964,8 @@ var CustomerService = function(props) {
|
|
|
6840
6964
|
}
|
|
6841
6965
|
}, 1000);
|
|
6842
6966
|
}
|
|
6967
|
+
setBottomRecommendationQuestions([]);
|
|
6968
|
+
resettingBottomHei();
|
|
6843
6969
|
},
|
|
6844
6970
|
onPressEnter: function(e) {
|
|
6845
6971
|
// console.log('发送内容22222',props)
|
|
@@ -6850,6 +6976,8 @@ var CustomerService = function(props) {
|
|
|
6850
6976
|
clearTimeout(timer.current);
|
|
6851
6977
|
setKeyWord("");
|
|
6852
6978
|
setCitationContent({});
|
|
6979
|
+
setBottomRecommendationQuestions([]);
|
|
6980
|
+
resettingBottomHei();
|
|
6853
6981
|
//查找是否是召唤老师回答并有相应的老师名称
|
|
6854
6982
|
if (answerMode == 1 && teacherList.length > 0) {
|
|
6855
6983
|
var list = teacherList.filter(function(v) {
|
|
@@ -7080,7 +7208,7 @@ var CustomerService = function(props) {
|
|
|
7080
7208
|
className: styles.item,
|
|
7081
7209
|
children: /*#__PURE__*/ jsx("span", {
|
|
7082
7210
|
onClick: function() {
|
|
7083
|
-
sendMessage(item, 2);
|
|
7211
|
+
sendMessage(item, 2, "AssociativeProblem");
|
|
7084
7212
|
setKeyWord("");
|
|
7085
7213
|
onEvent(serverName + serverUrl(), "click_智能问答_ 发送", "提交");
|
|
7086
7214
|
},
|