bhd-components 0.7.16 → 0.7.18
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/{cb6a18bd.esm.es5.development.js → 1a6b9ecf.esm.es5.development.js} +96 -72
- package/dist/{ee67a556.esm.es5.production.js → f2569147.esm.es5.production.js} +1 -1
- package/dist/index.esm.es5.development.css +1984 -1980
- package/dist/index.esm.es5.development.js +141 -167
- package/dist/index.esm.es5.production.css +1 -1
- package/dist/index.esm.es5.production.js +1 -1
- package/es2017/customerService/index.d.ts +0 -1
- package/es2017/customerService/index.js +138 -162
- package/es2017/customerService/index.module.less +4 -2
- package/es2017/customerService/index2.module.less +4 -2
- package/esm/customerService/index.d.ts +0 -1
- package/esm/customerService/index.js +138 -164
- package/esm/customerService/index.module.less +4 -2
- package/esm/customerService/index2.module.less +4 -2
- 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 './1a6b9ecf.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 './1a6b9ecf.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__bd0d280d","ChatWindow_Modal":"index_module_ChatWindow_Modal__bd0d280d","ChatWindow_Drawer":"index_module_ChatWindow_Drawer__bd0d280d","header_wrap":"index_module_header_wrap__bd0d280d","top":"index_module_top__bd0d280d","user":"index_module_user__bd0d280d","count":"index_module_count__bd0d280d","operate":"index_module_operate__bd0d280d","line":"index_module_line__bd0d280d","popover_main":"index_module_popover_main__bd0d280d","popover":"index_module_popover__bd0d280d","header_wrap_newlabo":"index_module_header_wrap_newlabo__bd0d280d","Drawer_main":"index_module_Drawer_main__bd0d280d","loading":"index_module_loading__bd0d280d","message_con":"index_module_message_con__bd0d280d","left":"index_module_left__bd0d280d","head_sculpture":"index_module_head_sculpture__bd0d280d","main_content":"index_module_main_content__bd0d280d","right":"index_module_right__bd0d280d","main":"index_module_main__bd0d280d","main_content_flag":"index_module_main_content_flag__bd0d280d","operate_modal":"index_module_operate_modal__bd0d280d","operate_modal_bottom":"index_module_operate_modal_bottom__bd0d280d","active":"index_module_active__bd0d280d","stop_generate":"index_module_stop_generate__bd0d280d","icon":"index_module_icon__bd0d280d","find_teacher":"index_module_find_teacher__bd0d280d","stop_findTeacher":"index_module_stop_findTeacher__bd0d280d","content":"index_module_content__bd0d280d","content_child":"index_module_content_child__bd0d280d","sign":"index_module_sign__bd0d280d","ask_question":"index_module_ask_question__bd0d280d","association_problem":"index_module_association_problem__bd0d280d","association_problem_flag":"index_module_association_problem_flag__bd0d280d","related_issues_flag":"index_module_related_issues_flag__bd0d280d","img_con":"index_module_img_con__bd0d280d","mask_zoom":"index_module_mask_zoom__bd0d280d","img_con2":"index_module_img_con2__bd0d280d","copyCode":"index_module_copyCode__bd0d280d","time":"index_module_time__bd0d280d","citation_content":"index_module_citation_content__bd0d280d","text_exceed":"index_module_text_exceed__bd0d280d","popover_content":"index_module_popover_content__bd0d280d","Drawer_main_newlabo":"index_module_Drawer_main_newlabo__bd0d280d","Drawer_main_newlabo_no_pic":"index_module_Drawer_main_newlabo_no_pic__bd0d280d","Drawer_buttom_Issues_List":"index_module_Drawer_buttom_Issues_List__bd0d280d","issues_list_teacherList":"index_module_issues_list_teacherList__bd0d280d","item":"index_module_item__bd0d280d","issues_list":"index_module_issues_list__bd0d280d","issues_list_flag":"index_module_issues_list_flag__bd0d280d","Drawer_buttom":"index_module_Drawer_buttom__bd0d280d","input_wrap":"index_module_input_wrap__bd0d280d","input":"index_module_input__bd0d280d","picture_layout":"index_module_picture_layout__bd0d280d","icon_close":"index_module_icon_close__bd0d280d","icon_zoom":"index_module_icon_zoom__bd0d280d","anticon":"index_module_anticon__bd0d280d","no_AI":"index_module_no_AI__bd0d280d","screenshot":"index_module_screenshot__bd0d280d","disabled":"index_module_disabled__bd0d280d","content_main":"index_module_content_main__bd0d280d","content_con":"index_module_content_con__bd0d280d","delete_quote":"index_module_delete_quote__bd0d280d","sending":"index_module_sending__bd0d280d","Drawer_buttom_Issues_List_newlabo":"index_module_Drawer_buttom_Issues_List_newlabo__bd0d280d","main_list":"index_module_main_list__bd0d280d","chat_content":"index_module_chat_content__bd0d280d","popover_main_content":"index_module_popover_main_content__bd0d280d","popover_main_content_name":"index_module_popover_main_content_name__bd0d280d","teacher_layout":"index_module_teacher_layout__bd0d280d","bottom":"index_module_bottom__bd0d280d","delete":"index_module_delete__bd0d280d","num":"index_module_num__bd0d280d","shrink":"index_module_shrink__bd0d280d","teacher_layout_newlabo":"index_module_teacher_layout_newlabo__bd0d280d","teacher_layout_modal":"index_module_teacher_layout_modal__bd0d280d","ai":"index_module_ai__bd0d280d","user_info":"index_module_user_info__bd0d280d","message":"index_module_message__bd0d280d","con":"index_module_con__bd0d280d","teacher_layout_modal_newlabo":"index_module_teacher_layout_modal_newlabo__bd0d280d","history_list":"index_module_history_list__bd0d280d","search_layout":"index_module_search_layout__bd0d280d","mymove":"index_module_mymove__bd0d280d","title":"index_module_title__bd0d280d","search_top":"index_module_search_top__bd0d280d","list_item":"index_module_list_item__bd0d280d","list_summary":"index_module_list_summary__bd0d280d","head_img":"index_module_head_img__bd0d280d","list_desc":"index_module_list_desc__bd0d280d","name":"index_module_name__bd0d280d","decs":"index_module_decs__bd0d280d","open":"index_module_open__bd0d280d","list_summary_active":"index_module_list_summary_active__bd0d280d","list_detail":"index_module_list_detail__bd0d280d","list":"index_module_list__bd0d280d","list_more":"index_module_list_more__bd0d280d","no_data":"index_module_no_data__bd0d280d","history_list_broadside":"index_module_history_list_broadside__bd0d280d","screenshot_Modal":"index_module_screenshot_Modal__bd0d280d","screenshot_Modal_btn":"index_module_screenshot_Modal_btn__bd0d280d"};
|
|
3170
3170
|
|
|
3171
3171
|
//消息已读
|
|
3172
3172
|
var readMessage = function(roomId, urllocation, userData, http) {
|
|
@@ -4150,7 +4150,7 @@ var CustomerService = function(props) {
|
|
|
4150
4150
|
var _useState3 = _sliced_to_array(useState([]), 2), historyMessageList = _useState3[0], setHistoryMessageList = _useState3[1]; //历史消息
|
|
4151
4151
|
var _useState4 = _sliced_to_array(useState(""), 2), keyWord = _useState4[0], setKeyWord = _useState4[1]; //搜索内容
|
|
4152
4152
|
var _useState5 = _sliced_to_array(useState([]), 2), questionsList = _useState5[0], setQuestionsList = _useState5[1]; //问题列表
|
|
4153
|
-
var _useState6 = _sliced_to_array(useState([]), 2)
|
|
4153
|
+
var _useState6 = _sliced_to_array(useState([]), 2); _useState6[0]; var setHotQuestionsList = _useState6[1]; //热门问题
|
|
4154
4154
|
// const [videoHotQuestionsList, setVideoHotQuestionsList] = useState([]); //热门问题
|
|
4155
4155
|
var _useState7 = _sliced_to_array(useState(false), 2), greetingMessage = _useState7[0], setGreetingMessage = _useState7[1]; //聊天记录列表是否请求完成
|
|
4156
4156
|
var _useState8 = _sliced_to_array(useState(1), 2), pageNum = _useState8[0], setPageNum = _useState8[1]; //页码
|
|
@@ -4207,10 +4207,10 @@ var CustomerService = function(props) {
|
|
|
4207
4207
|
}
|
|
4208
4208
|
});
|
|
4209
4209
|
useEffect(function() {
|
|
4210
|
-
if
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
}
|
|
4210
|
+
// if(config && config.type == 'video'){
|
|
4211
|
+
// //获取热门推荐
|
|
4212
|
+
// videoPageQuestiionsList(1);
|
|
4213
|
+
// }
|
|
4214
4214
|
setShowType(initShowType);
|
|
4215
4215
|
}, [
|
|
4216
4216
|
initShowType
|
|
@@ -4220,29 +4220,23 @@ var CustomerService = function(props) {
|
|
|
4220
4220
|
if (showType == 5 || showScreenshot) {
|
|
4221
4221
|
try {
|
|
4222
4222
|
setImgBese64("");
|
|
4223
|
-
//
|
|
4224
|
-
|
|
4225
|
-
// // if(element.compareDocumentPosition(dom)===2)return true
|
|
4226
|
-
// // return false
|
|
4227
|
-
// // }
|
|
4228
|
-
// }).then((canvas)=>{
|
|
4229
|
-
// console.log(canvas,22222);
|
|
4230
|
-
// setTimeout(()=>{
|
|
4231
|
-
var dom = document.getElementById(screenshotAreaId);
|
|
4232
|
-
html2canvas(dom, {
|
|
4223
|
+
// let dom = document.getElementById(screenshotAreaId);
|
|
4224
|
+
html2canvas(screenshotAreaId, {
|
|
4233
4225
|
useCORS: true,
|
|
4234
4226
|
// allowTaint: true, // 污染处理
|
|
4235
|
-
scale: 1
|
|
4227
|
+
scale: 1,
|
|
4228
|
+
// logging:true,
|
|
4229
|
+
ignoreElements: function(element) {
|
|
4230
|
+
if (element.compareDocumentPosition(screenshotAreaId) === 2) return true;
|
|
4231
|
+
return false;
|
|
4232
|
+
}
|
|
4236
4233
|
}).then(function(canvas) {
|
|
4237
|
-
// document.body.appendChild(canvas);
|
|
4238
4234
|
// document.body.appendChild(canvas);
|
|
4239
4235
|
console.log(canvas, 99999);
|
|
4240
4236
|
// var base64URL = canvas.toDataURL('image/jpeg')
|
|
4241
4237
|
var base64URL = canvas.toDataURL("image/jpg", 1.0);
|
|
4242
4238
|
setImgBese64(base64URL);
|
|
4243
4239
|
});
|
|
4244
|
-
// },100)
|
|
4245
|
-
// })
|
|
4246
4240
|
} catch (error) {
|
|
4247
4241
|
console.log(error);
|
|
4248
4242
|
}
|
|
@@ -4430,10 +4424,10 @@ var CustomerService = function(props) {
|
|
|
4430
4424
|
var watchTime = params.videoProgress;
|
|
4431
4425
|
var courseId = getQuery("yc_id");
|
|
4432
4426
|
var sectionId = params.VideoBriefSummaryId;
|
|
4433
|
-
// let courseId="
|
|
4434
|
-
// sectionId= "
|
|
4435
|
-
// videoId= "
|
|
4436
|
-
// watchTime=
|
|
4427
|
+
// let courseId="31007",
|
|
4428
|
+
// sectionId= "446168",
|
|
4429
|
+
// videoId= "71399",
|
|
4430
|
+
// watchTime= 527
|
|
4437
4431
|
if (videoId && courseId && sectionId) {
|
|
4438
4432
|
http.post("".concat(urllocation, "/chat-service/public/v1.0/knowledge-base/questions:recommend"), {
|
|
4439
4433
|
"recommendedQuestions": [],
|
|
@@ -4460,6 +4454,9 @@ var CustomerService = function(props) {
|
|
|
4460
4454
|
answer: item.answer
|
|
4461
4455
|
};
|
|
4462
4456
|
});
|
|
4457
|
+
recommendeQuestionID.current = data.map(function(item) {
|
|
4458
|
+
return item.id;
|
|
4459
|
+
});
|
|
4463
4460
|
}
|
|
4464
4461
|
console.log("dflkvmdfklvdf欢迎语", data);
|
|
4465
4462
|
var obj = {
|
|
@@ -4483,14 +4480,13 @@ var CustomerService = function(props) {
|
|
|
4483
4480
|
createdAt: getDataTime(-1),
|
|
4484
4481
|
extraInfo: obj.extraInfos != null ? JSON.stringify(obj.extraInfos) : null
|
|
4485
4482
|
}));
|
|
4486
|
-
console.log(newHistoryMessageList, 3333333333339999);
|
|
4487
4483
|
return newHistoryMessageList;
|
|
4488
4484
|
});
|
|
4489
4485
|
scrollToBottom();
|
|
4490
4486
|
}
|
|
4491
4487
|
return;
|
|
4492
4488
|
} catch (error) {}
|
|
4493
|
-
})
|
|
4489
|
+
});
|
|
4494
4490
|
}
|
|
4495
4491
|
} else {
|
|
4496
4492
|
var obj = {
|
|
@@ -4524,71 +4520,54 @@ var CustomerService = function(props) {
|
|
|
4524
4520
|
}
|
|
4525
4521
|
}
|
|
4526
4522
|
};
|
|
4527
|
-
|
|
4523
|
+
//无ai权限时,发送热门问题
|
|
4524
|
+
var getAssociativeProblem = function() {
|
|
4525
|
+
http.get("".concat(urllocation, "/chat-service/public/v1.0/knowledge-base/questions"), {
|
|
4526
|
+
params: {
|
|
4527
|
+
page: 1,
|
|
4528
|
+
maxPageSize: 5
|
|
4529
|
+
}
|
|
4530
|
+
}).then(function(res) {
|
|
4531
|
+
setFinished(true);
|
|
4532
|
+
if (res.data.total > 0) {
|
|
4533
|
+
var questionsList = res.data.questions.map(function(item) {
|
|
4534
|
+
return {
|
|
4535
|
+
key: "messageSource",
|
|
4536
|
+
value: item.id,
|
|
4537
|
+
question: item.question,
|
|
4538
|
+
answer: item.answer
|
|
4539
|
+
};
|
|
4540
|
+
});
|
|
4541
|
+
var obj = {
|
|
4542
|
+
roomId: roomId,
|
|
4543
|
+
sender: "AI",
|
|
4544
|
+
recevier: mid,
|
|
4545
|
+
message: "猜你想问:",
|
|
4546
|
+
extraInfos: questionsList
|
|
4547
|
+
};
|
|
4548
|
+
if (pageNumHistory <= 1) {
|
|
4549
|
+
setHistoryMessageList(function(historyMessageList) {
|
|
4550
|
+
var newHistoryMessageList = historyMessageList.concat(_object_spread_props(_object_spread({}, obj), {
|
|
4551
|
+
id: "p" + new Date().getTime(),
|
|
4552
|
+
upvoted: false,
|
|
4553
|
+
downvoted: false,
|
|
4554
|
+
quotedMessage: "",
|
|
4555
|
+
createdAt: getDataTime(-1),
|
|
4556
|
+
extraInfo: JSON.stringify(obj.extraInfos)
|
|
4557
|
+
}));
|
|
4558
|
+
return newHistoryMessageList;
|
|
4559
|
+
});
|
|
4560
|
+
scrollToBottom();
|
|
4561
|
+
}
|
|
4562
|
+
return;
|
|
4563
|
+
}
|
|
4564
|
+
});
|
|
4565
|
+
};
|
|
4566
|
+
//AI窗口,type:1发送打招呼信息欢迎语 2点赞消息 3踩消息 4没有AI客服权限,5,发送超过10万字消息 6, 没有AI客服权限,发送最热的问题
|
|
4528
4567
|
var sendGreetingMessage = function(type) {
|
|
4529
|
-
var questionsList = [];
|
|
4530
4568
|
var obj = {};
|
|
4531
4569
|
if (type == 1) {
|
|
4532
|
-
console.log("dflkvmdfklvdf欢迎语");
|
|
4533
4570
|
sendWelcomMessage();
|
|
4534
|
-
// console.log(hotQuestionsList,newHotQuestionsList.current,'33322221111');
|
|
4535
|
-
// if(newHotQuestionsList.current.length > 0){
|
|
4536
|
-
// questionsList = newHotQuestionsList.current.map((item, index) => {
|
|
4537
|
-
// if (index < 3) {
|
|
4538
|
-
// return {
|
|
4539
|
-
// key: "messageSource",
|
|
4540
|
-
// value: item.id,
|
|
4541
|
-
// question: item.question,
|
|
4542
|
-
// answer: item.answer,
|
|
4543
|
-
// };
|
|
4544
|
-
// } else {
|
|
4545
|
-
// return null;
|
|
4546
|
-
// }
|
|
4547
|
-
// });
|
|
4548
|
-
// }else{
|
|
4549
|
-
// questionsList = hotQuestionsList.map((item, index) => {
|
|
4550
|
-
// if (index < 3) {
|
|
4551
|
-
// return {
|
|
4552
|
-
// key: "messageSource",
|
|
4553
|
-
// value: item.id,
|
|
4554
|
-
// question: item.question,
|
|
4555
|
-
// answer: item.answer,
|
|
4556
|
-
// };
|
|
4557
|
-
// } else {
|
|
4558
|
-
// return null;
|
|
4559
|
-
// }
|
|
4560
|
-
// });
|
|
4561
|
-
// }
|
|
4562
|
-
// questionsList = questionsList.filter((i) => i != null);
|
|
4563
|
-
// obj = {
|
|
4564
|
-
// roomId: roomId,
|
|
4565
|
-
// sender: "AI",
|
|
4566
|
-
// recevier: mid,
|
|
4567
|
-
// message: `Hi,我是智能学习助手,你遇到了什么问题?`,
|
|
4568
|
-
// extraInfos: questionsList,
|
|
4569
|
-
// };
|
|
4570
|
-
// if(pageNumHistory <= 1){
|
|
4571
|
-
// setHistoryMessageList((historyMessageList) => {
|
|
4572
|
-
// let newHistoryMessageList = historyMessageList.filter(e=>e.id!='123456_date');
|
|
4573
|
-
// newHistoryMessageList.push({
|
|
4574
|
-
// ...obj,
|
|
4575
|
-
// id: '123456_date',
|
|
4576
|
-
// upvoted: false,
|
|
4577
|
-
// downvoted: false,
|
|
4578
|
-
// quotedMessage: "",
|
|
4579
|
-
// createdAt: getDataTime(-1),
|
|
4580
|
-
// extraInfo: JSON.stringify(obj.extraInfos),
|
|
4581
|
-
// // extraInfo: JSON.stringify([
|
|
4582
|
-
// // {
|
|
4583
|
-
// // key: "messageSource",
|
|
4584
|
-
// // value: "knowledgebase",
|
|
4585
|
-
// // },
|
|
4586
|
-
// // ]),
|
|
4587
|
-
// });
|
|
4588
|
-
// return newHistoryMessageList;
|
|
4589
|
-
// });
|
|
4590
|
-
// scrollToBottom();
|
|
4591
|
-
// }
|
|
4592
4571
|
return;
|
|
4593
4572
|
} else if (type == 2) {
|
|
4594
4573
|
obj = {
|
|
@@ -4649,35 +4628,7 @@ var CustomerService = function(props) {
|
|
|
4649
4628
|
]
|
|
4650
4629
|
};
|
|
4651
4630
|
} else if (type == 6) {
|
|
4652
|
-
|
|
4653
|
-
return {
|
|
4654
|
-
key: "messageSource",
|
|
4655
|
-
value: item.id,
|
|
4656
|
-
question: item.question,
|
|
4657
|
-
answer: item.answer
|
|
4658
|
-
};
|
|
4659
|
-
});
|
|
4660
|
-
obj = {
|
|
4661
|
-
roomId: roomId,
|
|
4662
|
-
sender: "AI",
|
|
4663
|
-
recevier: mid,
|
|
4664
|
-
message: "猜你想问:",
|
|
4665
|
-
extraInfos: questionsList
|
|
4666
|
-
};
|
|
4667
|
-
if (pageNumHistory <= 1) {
|
|
4668
|
-
setHistoryMessageList(function(historyMessageList) {
|
|
4669
|
-
var newHistoryMessageList = historyMessageList.concat(_object_spread_props(_object_spread({}, obj), {
|
|
4670
|
-
id: "p" + new Date().getTime(),
|
|
4671
|
-
upvoted: false,
|
|
4672
|
-
downvoted: false,
|
|
4673
|
-
quotedMessage: "",
|
|
4674
|
-
createdAt: getDataTime(-1),
|
|
4675
|
-
extraInfo: JSON.stringify(obj.extraInfos)
|
|
4676
|
-
}));
|
|
4677
|
-
return newHistoryMessageList;
|
|
4678
|
-
});
|
|
4679
|
-
scrollToBottom();
|
|
4680
|
-
}
|
|
4631
|
+
getAssociativeProblem();
|
|
4681
4632
|
return;
|
|
4682
4633
|
}
|
|
4683
4634
|
setKeyWord("");
|
|
@@ -4804,7 +4755,7 @@ var CustomerService = function(props) {
|
|
|
4804
4755
|
recevier: "AI",
|
|
4805
4756
|
message: questions.question,
|
|
4806
4757
|
quotedMessage: "",
|
|
4807
|
-
id: "
|
|
4758
|
+
id: "p" + new Date().getTime(),
|
|
4808
4759
|
upvoted: false,
|
|
4809
4760
|
downvoted: false,
|
|
4810
4761
|
createdAt: getDataTime(-1),
|
|
@@ -4864,7 +4815,7 @@ var CustomerService = function(props) {
|
|
|
4864
4815
|
recevier: "AI",
|
|
4865
4816
|
message: keyWord,
|
|
4866
4817
|
quotedMessage: citationContent.content,
|
|
4867
|
-
id: "
|
|
4818
|
+
id: "p" + new Date().getTime(),
|
|
4868
4819
|
upvoted: false,
|
|
4869
4820
|
downvoted: false,
|
|
4870
4821
|
createdAt: getDataTime(-1),
|
|
@@ -4892,7 +4843,7 @@ var CustomerService = function(props) {
|
|
|
4892
4843
|
if (pageNumHistory <= 1) {
|
|
4893
4844
|
setHistoryMessageList(function(historyMessageList) {
|
|
4894
4845
|
var newHistoryMessageList = historyMessageList.concat(_object_spread_props(_object_spread({}, obj), {
|
|
4895
|
-
id:
|
|
4846
|
+
id: "p" + new Date().getTime(),
|
|
4896
4847
|
upvoted: false,
|
|
4897
4848
|
downvoted: false,
|
|
4898
4849
|
createdAt: getDataTime(-1),
|
|
@@ -4903,10 +4854,6 @@ var CustomerService = function(props) {
|
|
|
4903
4854
|
scrollToBottom();
|
|
4904
4855
|
}
|
|
4905
4856
|
console.log(type, "接受答案77777");
|
|
4906
|
-
//获取下面的推荐问题
|
|
4907
|
-
// if(type == 2){
|
|
4908
|
-
// videoPageQuestiionsList(2);
|
|
4909
|
-
// }
|
|
4910
4857
|
http.post("".concat(urllocation, "/chat-service/public/v1.0/history-messages"), obj).then(function(res) {
|
|
4911
4858
|
if (res.data.id) {
|
|
4912
4859
|
if (pageNumHistory <= 1) {
|
|
@@ -4955,11 +4902,11 @@ var CustomerService = function(props) {
|
|
|
4955
4902
|
ctrl.current = new AbortController();
|
|
4956
4903
|
clearTimeout(receiveMessageTimer.current);
|
|
4957
4904
|
receiveMessageTimer.current = setTimeout(function() {
|
|
4958
|
-
setHistoryMessageList(
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
});
|
|
4905
|
+
// setHistoryMessageList((historyMessageList) => {
|
|
4906
|
+
// return historyMessageList.filter(
|
|
4907
|
+
// (item) => item.id != "123456" && item.id != "654321"
|
|
4908
|
+
// );
|
|
4909
|
+
// });
|
|
4963
4910
|
setFinished(true);
|
|
4964
4911
|
ctrl.current.abort();
|
|
4965
4912
|
setHistoryMessageList(function(historyMessageList) {
|
|
@@ -4974,6 +4921,7 @@ var CustomerService = function(props) {
|
|
|
4974
4921
|
});
|
|
4975
4922
|
});
|
|
4976
4923
|
}, 60 * 1000);
|
|
4924
|
+
setFinished(false);
|
|
4977
4925
|
if (config && config.type == "video" && config.params) {
|
|
4978
4926
|
var params = config.params;
|
|
4979
4927
|
var videoId = params.videoId;
|
|
@@ -5611,10 +5559,10 @@ var CustomerService = function(props) {
|
|
|
5611
5559
|
var watchTime = params.videoProgress;
|
|
5612
5560
|
var courseId = getQuery("yc_id");
|
|
5613
5561
|
var sectionId = params.VideoBriefSummaryId;
|
|
5614
|
-
//
|
|
5615
|
-
//
|
|
5616
|
-
//
|
|
5617
|
-
//
|
|
5562
|
+
// let courseId="31007",
|
|
5563
|
+
// sectionId= "446168",
|
|
5564
|
+
// videoId= "71399",
|
|
5565
|
+
// watchTime= 527
|
|
5618
5566
|
if (videoId && courseId && sectionId) {
|
|
5619
5567
|
console.log(recommendeQuestionID.current, "recommendeQuestionID.current");
|
|
5620
5568
|
http.post("".concat(urllocation, "/chat-service/public/v1.0/knowledge-base/questions:recommend"), {
|
|
@@ -5644,17 +5592,13 @@ var CustomerService = function(props) {
|
|
|
5644
5592
|
setHotQuestionsList(data);
|
|
5645
5593
|
newHotQuestionsList.current = data;
|
|
5646
5594
|
}
|
|
5647
|
-
|
|
5648
|
-
|
|
5649
|
-
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
resettingBottomHei();
|
|
5595
|
+
var ids = [];
|
|
5596
|
+
data.map(function(str) {
|
|
5597
|
+
ids.push(str.id);
|
|
5598
|
+
});
|
|
5599
|
+
recommendeQuestionID.current = Array.from(new Set(recommendeQuestionID.current.concat(ids)));
|
|
5653
5600
|
scrollToBottom();
|
|
5654
|
-
|
|
5655
|
-
// if(data.length < 4){
|
|
5656
|
-
// getQuestiionsList('',4)
|
|
5657
|
-
// }
|
|
5601
|
+
resettingBottomHei();
|
|
5658
5602
|
}
|
|
5659
5603
|
}).catch(function() {});
|
|
5660
5604
|
}
|
|
@@ -5793,7 +5737,7 @@ var CustomerService = function(props) {
|
|
|
5793
5737
|
}
|
|
5794
5738
|
} else {
|
|
5795
5739
|
if (document.getElementById("Drawer_buttom_modal")) {
|
|
5796
|
-
var hei1 = document.getElementById("Drawer_buttom_modal").offsetHeight + document.getElementById("
|
|
5740
|
+
var hei1 = document.getElementById("Drawer_buttom_modal").offsetHeight + document.getElementById("BottomAssociationProblem_modal").offsetHeight;
|
|
5797
5741
|
setButtomHei(hei1);
|
|
5798
5742
|
}
|
|
5799
5743
|
}
|
|
@@ -6311,7 +6255,6 @@ var CustomerService = function(props) {
|
|
|
6311
6255
|
return /*#__PURE__*/ jsx("li", {
|
|
6312
6256
|
onClick: function() {
|
|
6313
6257
|
sendMessage(list, 1);
|
|
6314
|
-
recommendeQuestionID.current = recommendeQuestionID.current.concat(list.value);
|
|
6315
6258
|
setBottomRecommendationQuestions([]);
|
|
6316
6259
|
resettingBottomHei();
|
|
6317
6260
|
},
|
|
@@ -6571,7 +6514,6 @@ var CustomerService = function(props) {
|
|
|
6571
6514
|
} else if (JSON.parse(previousLineData.extraInfo).length > 0 && JSON.parse(previousLineData.extraInfo)[0].key == "imageUrl") {
|
|
6572
6515
|
showTeacherBtn = false;
|
|
6573
6516
|
}
|
|
6574
|
-
console.log(showTeacherBtn, "dlvkdfl");
|
|
6575
6517
|
/// style={{position:showStopBtn && isPosition.current ? 'sticky' : 'relative'}}
|
|
6576
6518
|
return /*#__PURE__*/ jsxs("div", {
|
|
6577
6519
|
className: "".concat(styles.operate_modal_bottom),
|
|
@@ -6864,7 +6806,7 @@ var CustomerService = function(props) {
|
|
|
6864
6806
|
onClick: function() {
|
|
6865
6807
|
setHistoryMessageList(function(historyMessageList) {
|
|
6866
6808
|
var newHistoryMessageList = historyMessageList.concat({
|
|
6867
|
-
id:
|
|
6809
|
+
id: "p" + new Date().getTime(),
|
|
6868
6810
|
roomId: roomId,
|
|
6869
6811
|
sender: mid,
|
|
6870
6812
|
recevier: "AI",
|
|
@@ -6902,7 +6844,7 @@ var CustomerService = function(props) {
|
|
|
6902
6844
|
onClick: function() {
|
|
6903
6845
|
setHistoryMessageList(function(historyMessageList) {
|
|
6904
6846
|
var newHistoryMessageList = historyMessageList.concat({
|
|
6905
|
-
id:
|
|
6847
|
+
id: "p" + new Date().getTime(),
|
|
6906
6848
|
roomId: roomId,
|
|
6907
6849
|
sender: mid,
|
|
6908
6850
|
recevier: "AI",
|
|
@@ -7228,23 +7170,51 @@ var CustomerService = function(props) {
|
|
|
7228
7170
|
};
|
|
7229
7171
|
//视频页面底部推荐问题
|
|
7230
7172
|
var renderBottomAssociationProblem = function() {
|
|
7231
|
-
|
|
7232
|
-
|
|
7233
|
-
|
|
7234
|
-
|
|
7235
|
-
|
|
7236
|
-
|
|
7237
|
-
|
|
7238
|
-
|
|
7239
|
-
|
|
7240
|
-
|
|
7241
|
-
|
|
7242
|
-
|
|
7243
|
-
|
|
7244
|
-
|
|
7245
|
-
|
|
7246
|
-
|
|
7247
|
-
|
|
7173
|
+
if (showType == 1 || showType == 3) {
|
|
7174
|
+
return /*#__PURE__*/ jsx("div", {
|
|
7175
|
+
className: styles.issues_list_flag,
|
|
7176
|
+
id: "BottomAssociationProblem",
|
|
7177
|
+
children: bottomRecommendationQuestions.map(function(item) {
|
|
7178
|
+
return /*#__PURE__*/ jsxs(Fragment, {
|
|
7179
|
+
children: [
|
|
7180
|
+
/*#__PURE__*/ jsx("p", {
|
|
7181
|
+
onClick: function() {
|
|
7182
|
+
sendMessage(item, 1);
|
|
7183
|
+
if (config && config.type == "video") {
|
|
7184
|
+
setBottomRecommendationQuestions([]);
|
|
7185
|
+
resettingBottomHei();
|
|
7186
|
+
}
|
|
7187
|
+
},
|
|
7188
|
+
children: item.question
|
|
7189
|
+
}, item.id),
|
|
7190
|
+
/*#__PURE__*/ jsx("br", {})
|
|
7191
|
+
]
|
|
7192
|
+
});
|
|
7193
|
+
})
|
|
7194
|
+
});
|
|
7195
|
+
} else {
|
|
7196
|
+
return /*#__PURE__*/ jsx("div", {
|
|
7197
|
+
className: styles.issues_list_flag,
|
|
7198
|
+
id: "BottomAssociationProblem_modal",
|
|
7199
|
+
children: bottomRecommendationQuestions.map(function(item) {
|
|
7200
|
+
return /*#__PURE__*/ jsxs(Fragment, {
|
|
7201
|
+
children: [
|
|
7202
|
+
/*#__PURE__*/ jsx("p", {
|
|
7203
|
+
onClick: function() {
|
|
7204
|
+
sendMessage(item, 1);
|
|
7205
|
+
if (config && config.type == "video") {
|
|
7206
|
+
setBottomRecommendationQuestions([]);
|
|
7207
|
+
resettingBottomHei();
|
|
7208
|
+
}
|
|
7209
|
+
},
|
|
7210
|
+
children: item.question
|
|
7211
|
+
}, item.id),
|
|
7212
|
+
/*#__PURE__*/ jsx("br", {})
|
|
7213
|
+
]
|
|
7214
|
+
});
|
|
7215
|
+
})
|
|
7216
|
+
});
|
|
7217
|
+
}
|
|
7248
7218
|
};
|
|
7249
7219
|
//加载指定数据,点击历史记录
|
|
7250
7220
|
var loadSpecifiedData = function(renewRoomId, page, id, receiver, keyWordProblem) {
|
|
@@ -7342,7 +7312,7 @@ var CustomerService = function(props) {
|
|
|
7342
7312
|
className: styles.Drawer_buttom_Issues_List,
|
|
7343
7313
|
children: [
|
|
7344
7314
|
renderAssociationProblem(),
|
|
7345
|
-
renderBottomAssociationProblem(),
|
|
7315
|
+
showType == 1 && renderBottomAssociationProblem(),
|
|
7346
7316
|
/*#__PURE__*/ jsx("div", {
|
|
7347
7317
|
className: styles.Drawer_buttom,
|
|
7348
7318
|
id: "Drawer_buttom",
|
|
@@ -7429,6 +7399,7 @@ var CustomerService = function(props) {
|
|
|
7429
7399
|
className: styles.Drawer_buttom_Issues_List,
|
|
7430
7400
|
children: [
|
|
7431
7401
|
renderAssociationProblem(),
|
|
7402
|
+
showType == 2 && renderBottomAssociationProblem(),
|
|
7432
7403
|
/*#__PURE__*/ jsx("div", {
|
|
7433
7404
|
className: styles.Drawer_buttom,
|
|
7434
7405
|
id: "Drawer_buttom_modal",
|
|
@@ -7524,6 +7495,7 @@ var CustomerService = function(props) {
|
|
|
7524
7495
|
className: "".concat(styles.Drawer_buttom_Issues_List, " ").concat(styles.Drawer_buttom_Issues_List_newlabo),
|
|
7525
7496
|
children: [
|
|
7526
7497
|
renderAssociationProblem(),
|
|
7498
|
+
showType == 3 && renderBottomAssociationProblem(),
|
|
7527
7499
|
/*#__PURE__*/ jsx("div", {
|
|
7528
7500
|
className: styles.Drawer_buttom,
|
|
7529
7501
|
id: "Drawer_buttom",
|
|
@@ -7631,6 +7603,7 @@ var CustomerService = function(props) {
|
|
|
7631
7603
|
className: styles.Drawer_buttom_Issues_List,
|
|
7632
7604
|
children: [
|
|
7633
7605
|
renderAssociationProblem(),
|
|
7606
|
+
(showType == 4 || showType == 5) && renderBottomAssociationProblem(),
|
|
7634
7607
|
/*#__PURE__*/ jsx("div", {
|
|
7635
7608
|
className: styles.Drawer_buttom,
|
|
7636
7609
|
id: "Drawer_buttom_modal",
|
|
@@ -7721,6 +7694,7 @@ var CustomerService = function(props) {
|
|
|
7721
7694
|
className: "".concat(styles.Drawer_buttom_Issues_List, " ").concat(styles.Drawer_buttom_Issues_List_newlabo),
|
|
7722
7695
|
children: [
|
|
7723
7696
|
renderAssociationProblem(),
|
|
7697
|
+
(showType == 4 || showType == 5) && renderBottomAssociationProblem(),
|
|
7724
7698
|
/*#__PURE__*/ jsx("div", {
|
|
7725
7699
|
className: styles.Drawer_buttom,
|
|
7726
7700
|
id: "Drawer_buttom",
|