bhd-components 0.7.4 → 0.7.6
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/{ad151cc6.esm.es5.production.js → 0dcae483.esm.es5.production.js} +1 -1
- package/dist/{4d37fec9.esm.es5.development.js → e316787c.esm.es5.development.js} +1 -1
- package/dist/index.esm.es5.development.js +23 -23
- package/dist/index.esm.es5.production.js +1 -1
- package/es2017/customerService/index.js +21 -21
- package/esm/customerService/index.js +21 -21
- package/package.json +1 -1
|
@@ -90,21 +90,22 @@ const CustomerService = (props)=>{
|
|
|
90
90
|
useEffect(()=>{
|
|
91
91
|
console.log(showType, 'showTypeshowTypeshowType');
|
|
92
92
|
if (showType == 5) {
|
|
93
|
-
//document.querySelector("#
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
93
|
+
//document.querySelector("#rootWrapper")
|
|
94
|
+
//document.getElementsByTagName('body')[0]
|
|
95
|
+
// setTimeout(()=>{
|
|
96
|
+
html2canvas(document.querySelector("#rootWrapper"), {
|
|
97
|
+
allowTaint: true,
|
|
98
|
+
useCORS: true,
|
|
99
|
+
scale: 1 // 图片比例
|
|
100
|
+
}).then(function(canvas) {
|
|
101
|
+
document.body.appendChild(canvas);
|
|
102
|
+
var base64URL = canvas.toDataURL('image/jpeg');
|
|
103
|
+
var image = new Image();
|
|
104
|
+
image.src = base64URL; // 将'your_image_url'替换为你自己的图片URL
|
|
105
|
+
console.log(base64URL);
|
|
106
|
+
setImgBese64(base64URL);
|
|
107
|
+
});
|
|
108
|
+
// },1000)
|
|
108
109
|
}
|
|
109
110
|
if (showType != 1 && !firstLoad && pageCount > 0) {
|
|
110
111
|
setFirstLoad(true);
|
|
@@ -683,7 +684,6 @@ const CustomerService = (props)=>{
|
|
|
683
684
|
setTimeout(()=>{
|
|
684
685
|
setQuestionsList([]);
|
|
685
686
|
}, 2000);
|
|
686
|
-
// console.log(pageNumHistory,44444444444444);
|
|
687
687
|
//占位信息
|
|
688
688
|
if (pageNumHistory <= 1) {
|
|
689
689
|
setHistoryMessageList((historyMessageList)=>{
|
|
@@ -723,8 +723,8 @@ const CustomerService = (props)=>{
|
|
|
723
723
|
headers: {
|
|
724
724
|
"Content-Type": "application/json",
|
|
725
725
|
Accept: "text/event-stream,application/json",
|
|
726
|
-
|
|
727
|
-
"X-Auth-Jwt": sessionStorage.getItem('jwt') || "",
|
|
726
|
+
"X-Auth-Jwt": window.localStorage.getItem("usertoken") || "",
|
|
727
|
+
// "X-Auth-Jwt": sessionStorage.getItem('jwt') || "",
|
|
728
728
|
"Auth-Token": userData.token,
|
|
729
729
|
"X-Module-Id": userData.modules.find((ele)=>ele.short == "IntelligentCustomerService").id
|
|
730
730
|
},
|
|
@@ -1201,7 +1201,7 @@ const CustomerService = (props)=>{
|
|
|
1201
1201
|
page: 1,
|
|
1202
1202
|
maxPageSize: 4,
|
|
1203
1203
|
question: value,
|
|
1204
|
-
sectionId: getQuery('s_id')
|
|
1204
|
+
sectionId: getQuery('s_id')
|
|
1205
1205
|
};
|
|
1206
1206
|
} else if (flag == 4) {
|
|
1207
1207
|
data = {
|
|
@@ -1250,8 +1250,8 @@ const CustomerService = (props)=>{
|
|
|
1250
1250
|
let params = config.params;
|
|
1251
1251
|
let videoId = params.videoPageData.videoId;
|
|
1252
1252
|
let watchTime = params.videoPageData.videoProgress;
|
|
1253
|
-
let courseId = getQuery('yc_id')
|
|
1254
|
-
let sectionId = getQuery('s_id')
|
|
1253
|
+
let courseId = getQuery('yc_id');
|
|
1254
|
+
let sectionId = getQuery('s_id');
|
|
1255
1255
|
if (videoId && watchTime && courseId && sectionId) {
|
|
1256
1256
|
console.log('请求接口2222');
|
|
1257
1257
|
http.post(`${urllocation}/chat-service/public/v1.0/knowledge-base/questions:recommend`, {
|
|
@@ -138,21 +138,22 @@ var CustomerService = function(props) {
|
|
|
138
138
|
};
|
|
139
139
|
console.log(showType, "showTypeshowTypeshowType");
|
|
140
140
|
if (showType == 5) {
|
|
141
|
-
//document.querySelector("#
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
}
|
|
141
|
+
//document.querySelector("#rootWrapper")
|
|
142
|
+
//document.getElementsByTagName('body')[0]
|
|
143
|
+
// setTimeout(()=>{
|
|
144
|
+
html2canvas(document.querySelector("#rootWrapper"), {
|
|
145
|
+
allowTaint: true,
|
|
146
|
+
useCORS: true,
|
|
147
|
+
scale: 1 // 图片比例
|
|
148
|
+
}).then(function(canvas) {
|
|
149
|
+
document.body.appendChild(canvas);
|
|
150
|
+
var base64URL = canvas.toDataURL("image/jpeg");
|
|
151
|
+
var image = new Image();
|
|
152
|
+
image.src = base64URL; // 将'your_image_url'替换为你自己的图片URL
|
|
153
|
+
console.log(base64URL);
|
|
154
|
+
setImgBese64(base64URL);
|
|
155
|
+
});
|
|
156
|
+
// },1000)
|
|
156
157
|
}
|
|
157
158
|
if (showType != 1 && !firstLoad && pageCount > 0) {
|
|
158
159
|
setFirstLoad(true);
|
|
@@ -697,7 +698,6 @@ var CustomerService = function(props) {
|
|
|
697
698
|
setTimeout(function() {
|
|
698
699
|
setQuestionsList([]);
|
|
699
700
|
}, 2000);
|
|
700
|
-
// console.log(pageNumHistory,44444444444444);
|
|
701
701
|
//占位信息
|
|
702
702
|
if (pageNumHistory <= 1) {
|
|
703
703
|
setHistoryMessageList(function(historyMessageList) {
|
|
@@ -737,8 +737,8 @@ var CustomerService = function(props) {
|
|
|
737
737
|
headers: {
|
|
738
738
|
"Content-Type": "application/json",
|
|
739
739
|
Accept: "text/event-stream,application/json",
|
|
740
|
-
|
|
741
|
-
"X-Auth-Jwt": sessionStorage.getItem(
|
|
740
|
+
"X-Auth-Jwt": window.localStorage.getItem("usertoken") || "",
|
|
741
|
+
// "X-Auth-Jwt": sessionStorage.getItem('jwt') || "",
|
|
742
742
|
"Auth-Token": userData.token,
|
|
743
743
|
"X-Module-Id": userData.modules.find(function(ele) {
|
|
744
744
|
return ele.short == "IntelligentCustomerService";
|
|
@@ -1234,7 +1234,7 @@ var CustomerService = function(props) {
|
|
|
1234
1234
|
page: 1,
|
|
1235
1235
|
maxPageSize: 4,
|
|
1236
1236
|
question: value,
|
|
1237
|
-
sectionId: getQuery("s_id")
|
|
1237
|
+
sectionId: getQuery("s_id")
|
|
1238
1238
|
};
|
|
1239
1239
|
} else if (flag == 4) {
|
|
1240
1240
|
data = {
|
|
@@ -1281,8 +1281,8 @@ var CustomerService = function(props) {
|
|
|
1281
1281
|
var params = config.params;
|
|
1282
1282
|
var videoId = params.videoPageData.videoId;
|
|
1283
1283
|
var watchTime = params.videoPageData.videoProgress;
|
|
1284
|
-
var courseId = getQuery("yc_id")
|
|
1285
|
-
var sectionId = getQuery("s_id")
|
|
1284
|
+
var courseId = getQuery("yc_id");
|
|
1285
|
+
var sectionId = getQuery("s_id");
|
|
1286
1286
|
if (videoId && watchTime && courseId && sectionId) {
|
|
1287
1287
|
console.log("请求接口2222");
|
|
1288
1288
|
http.post("".concat(urllocation, "/chat-service/public/v1.0/knowledge-base/questions:recommend"), {
|