bhd-components 0.7.18 → 0.7.20
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/{1a6b9ecf.esm.es5.development.js → 519bd9ca.esm.es5.development.js} +1 -1
- package/dist/{f2569147.esm.es5.production.js → d70309d9.esm.es5.production.js} +1 -1
- package/dist/index.esm.es5.development.js +83 -55
- package/dist/index.esm.es5.production.js +1 -1
- package/es2017/customerService/index.js +71 -53
- package/esm/customerService/index.js +81 -53
- package/package.json +1 -1
|
@@ -309,10 +309,10 @@ const CustomerService = (props)=>{
|
|
|
309
309
|
let watchTime = params.videoProgress;
|
|
310
310
|
let courseId = getQuery('yc_id');
|
|
311
311
|
let sectionId = params.VideoBriefSummaryId;
|
|
312
|
-
//
|
|
313
|
-
//
|
|
314
|
-
//
|
|
315
|
-
//
|
|
312
|
+
// let courseId="20899",
|
|
313
|
+
// sectionId= "462368",
|
|
314
|
+
// videoId= "29832",
|
|
315
|
+
// watchTime= 753
|
|
316
316
|
if (videoId && courseId && sectionId) {
|
|
317
317
|
http.post(`${urllocation}/chat-service/public/v1.0/knowledge-base/questions:recommend`, {
|
|
318
318
|
"recommendedQuestions": [],
|
|
@@ -332,16 +332,22 @@ const CustomerService = (props)=>{
|
|
|
332
332
|
let questionsList = null;
|
|
333
333
|
if (data.length > 0) {
|
|
334
334
|
questionsList = data.map((item, index)=>{
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
335
|
+
if (userData.modules.some((item)=>item.short == "AIservice") || item.answer) {
|
|
336
|
+
return {
|
|
337
|
+
key: "messageSource",
|
|
338
|
+
value: item.id,
|
|
339
|
+
question: item.question,
|
|
340
|
+
answer: item.answer
|
|
341
|
+
};
|
|
342
|
+
} else {
|
|
343
|
+
return null;
|
|
344
|
+
}
|
|
341
345
|
});
|
|
346
|
+
questionsList = questionsList.filter((i)=>i != null);
|
|
342
347
|
recommendeQuestionID.current = data.map((item)=>{
|
|
343
348
|
return item.id;
|
|
344
349
|
});
|
|
350
|
+
console.log(recommendeQuestionID.current, 4444444);
|
|
345
351
|
}
|
|
346
352
|
console.log('dflkvmdfklvdf欢迎语', data);
|
|
347
353
|
let obj = {
|
|
@@ -2984,19 +2990,23 @@ const CustomerService = (props)=>{
|
|
|
2984
2990
|
return `<span class=${styles.sign}>${i}</span>`;
|
|
2985
2991
|
});
|
|
2986
2992
|
}
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
2993
|
+
if (userData.modules.some((item)=>item.short == "AIservice") || item.answer) {
|
|
2994
|
+
return /*#__PURE__*/ _jsx("p", {
|
|
2995
|
+
className: styles.item,
|
|
2996
|
+
children: /*#__PURE__*/ _jsx("span", {
|
|
2997
|
+
onClick: ()=>{
|
|
2998
|
+
sendMessage(item, 2, 'AssociativeProblem');
|
|
2999
|
+
setKeyWord("");
|
|
3000
|
+
onEvent(serverName + serverUrl(), "click_智能问答_ 发送", "提交");
|
|
3001
|
+
},
|
|
3002
|
+
dangerouslySetInnerHTML: {
|
|
3003
|
+
__html: span
|
|
3004
|
+
}
|
|
3005
|
+
})
|
|
3006
|
+
});
|
|
3007
|
+
} else {
|
|
3008
|
+
return null;
|
|
3009
|
+
}
|
|
3000
3010
|
})
|
|
3001
3011
|
});
|
|
3002
3012
|
}
|
|
@@ -3008,21 +3018,25 @@ const CustomerService = (props)=>{
|
|
|
3008
3018
|
className: styles.issues_list_flag,
|
|
3009
3019
|
id: "BottomAssociationProblem",
|
|
3010
3020
|
children: bottomRecommendationQuestions.map((item)=>{
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3021
|
+
if (userData.modules.some((item)=>item.short == "AIservice") || item.answer) {
|
|
3022
|
+
return /*#__PURE__*/ _jsxs(_Fragment, {
|
|
3023
|
+
children: [
|
|
3024
|
+
/*#__PURE__*/ _jsx("p", {
|
|
3025
|
+
onClick: ()=>{
|
|
3026
|
+
sendMessage(item, 1);
|
|
3027
|
+
if (config && config.type == 'video') {
|
|
3028
|
+
setBottomRecommendationQuestions([]);
|
|
3029
|
+
resettingBottomHei();
|
|
3030
|
+
}
|
|
3031
|
+
},
|
|
3032
|
+
children: item.question
|
|
3033
|
+
}, item.id),
|
|
3034
|
+
/*#__PURE__*/ _jsx("br", {})
|
|
3035
|
+
]
|
|
3036
|
+
});
|
|
3037
|
+
} else {
|
|
3038
|
+
return null;
|
|
3039
|
+
}
|
|
3026
3040
|
})
|
|
3027
3041
|
});
|
|
3028
3042
|
} else {
|
|
@@ -3030,21 +3044,25 @@ const CustomerService = (props)=>{
|
|
|
3030
3044
|
className: styles.issues_list_flag,
|
|
3031
3045
|
id: "BottomAssociationProblem_modal",
|
|
3032
3046
|
children: bottomRecommendationQuestions.map((item)=>{
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3047
|
+
if (userData.modules.some((item)=>item.short == "AIservice") || item.answer) {
|
|
3048
|
+
return /*#__PURE__*/ _jsxs(_Fragment, {
|
|
3049
|
+
children: [
|
|
3050
|
+
/*#__PURE__*/ _jsx("p", {
|
|
3051
|
+
onClick: ()=>{
|
|
3052
|
+
sendMessage(item, 1);
|
|
3053
|
+
if (config && config.type == 'video') {
|
|
3054
|
+
setBottomRecommendationQuestions([]);
|
|
3055
|
+
resettingBottomHei();
|
|
3056
|
+
}
|
|
3057
|
+
},
|
|
3058
|
+
children: item.question
|
|
3059
|
+
}, item.id),
|
|
3060
|
+
/*#__PURE__*/ _jsx("br", {})
|
|
3061
|
+
]
|
|
3062
|
+
});
|
|
3063
|
+
} else {
|
|
3064
|
+
return null;
|
|
3065
|
+
}
|
|
3048
3066
|
})
|
|
3049
3067
|
});
|
|
3050
3068
|
}
|
|
@@ -313,10 +313,10 @@ var CustomerService = function(props) {
|
|
|
313
313
|
var watchTime = params.videoProgress;
|
|
314
314
|
var courseId = getQuery("yc_id");
|
|
315
315
|
var sectionId = params.VideoBriefSummaryId;
|
|
316
|
-
//
|
|
317
|
-
//
|
|
318
|
-
//
|
|
319
|
-
//
|
|
316
|
+
// let courseId="20899",
|
|
317
|
+
// sectionId= "462368",
|
|
318
|
+
// videoId= "29832",
|
|
319
|
+
// watchTime= 753
|
|
320
320
|
if (videoId && courseId && sectionId) {
|
|
321
321
|
http.post("".concat(urllocation, "/chat-service/public/v1.0/knowledge-base/questions:recommend"), {
|
|
322
322
|
"recommendedQuestions": [],
|
|
@@ -336,16 +336,26 @@ var CustomerService = function(props) {
|
|
|
336
336
|
var questionsList = null;
|
|
337
337
|
if (data.length > 0) {
|
|
338
338
|
questionsList = data.map(function(item, index) {
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
339
|
+
if (userData.modules.some(function(item) {
|
|
340
|
+
return item.short == "AIservice";
|
|
341
|
+
}) || item.answer) {
|
|
342
|
+
return {
|
|
343
|
+
key: "messageSource",
|
|
344
|
+
value: item.id,
|
|
345
|
+
question: item.question,
|
|
346
|
+
answer: item.answer
|
|
347
|
+
};
|
|
348
|
+
} else {
|
|
349
|
+
return null;
|
|
350
|
+
}
|
|
351
|
+
});
|
|
352
|
+
questionsList = questionsList.filter(function(i) {
|
|
353
|
+
return i != null;
|
|
345
354
|
});
|
|
346
355
|
recommendeQuestionID.current = data.map(function(item) {
|
|
347
356
|
return item.id;
|
|
348
357
|
});
|
|
358
|
+
console.log(recommendeQuestionID.current, 4444444);
|
|
349
359
|
}
|
|
350
360
|
console.log("dflkvmdfklvdf欢迎语", data);
|
|
351
361
|
var obj = {
|
|
@@ -3044,19 +3054,25 @@ var CustomerService = function(props) {
|
|
|
3044
3054
|
return "<span class=".concat(styles.sign, ">").concat(i, "</span>");
|
|
3045
3055
|
});
|
|
3046
3056
|
}
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3057
|
+
if (userData.modules.some(function(item) {
|
|
3058
|
+
return item.short == "AIservice";
|
|
3059
|
+
}) || item.answer) {
|
|
3060
|
+
return /*#__PURE__*/ _jsx("p", {
|
|
3061
|
+
className: styles.item,
|
|
3062
|
+
children: /*#__PURE__*/ _jsx("span", {
|
|
3063
|
+
onClick: function() {
|
|
3064
|
+
sendMessage(item, 2, "AssociativeProblem");
|
|
3065
|
+
setKeyWord("");
|
|
3066
|
+
onEvent(serverName + serverUrl(), "click_智能问答_ 发送", "提交");
|
|
3067
|
+
},
|
|
3068
|
+
dangerouslySetInnerHTML: {
|
|
3069
|
+
__html: span
|
|
3070
|
+
}
|
|
3071
|
+
})
|
|
3072
|
+
});
|
|
3073
|
+
} else {
|
|
3074
|
+
return null;
|
|
3075
|
+
}
|
|
3060
3076
|
})
|
|
3061
3077
|
});
|
|
3062
3078
|
}
|
|
@@ -3068,21 +3084,27 @@ var CustomerService = function(props) {
|
|
|
3068
3084
|
className: styles.issues_list_flag,
|
|
3069
3085
|
id: "BottomAssociationProblem",
|
|
3070
3086
|
children: bottomRecommendationQuestions.map(function(item) {
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3087
|
+
if (userData.modules.some(function(item) {
|
|
3088
|
+
return item.short == "AIservice";
|
|
3089
|
+
}) || item.answer) {
|
|
3090
|
+
return /*#__PURE__*/ _jsxs(_Fragment, {
|
|
3091
|
+
children: [
|
|
3092
|
+
/*#__PURE__*/ _jsx("p", {
|
|
3093
|
+
onClick: function() {
|
|
3094
|
+
sendMessage(item, 1);
|
|
3095
|
+
if (config && config.type == "video") {
|
|
3096
|
+
setBottomRecommendationQuestions([]);
|
|
3097
|
+
resettingBottomHei();
|
|
3098
|
+
}
|
|
3099
|
+
},
|
|
3100
|
+
children: item.question
|
|
3101
|
+
}, item.id),
|
|
3102
|
+
/*#__PURE__*/ _jsx("br", {})
|
|
3103
|
+
]
|
|
3104
|
+
});
|
|
3105
|
+
} else {
|
|
3106
|
+
return null;
|
|
3107
|
+
}
|
|
3086
3108
|
})
|
|
3087
3109
|
});
|
|
3088
3110
|
} else {
|
|
@@ -3090,21 +3112,27 @@ var CustomerService = function(props) {
|
|
|
3090
3112
|
className: styles.issues_list_flag,
|
|
3091
3113
|
id: "BottomAssociationProblem_modal",
|
|
3092
3114
|
children: bottomRecommendationQuestions.map(function(item) {
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3115
|
+
if (userData.modules.some(function(item) {
|
|
3116
|
+
return item.short == "AIservice";
|
|
3117
|
+
}) || item.answer) {
|
|
3118
|
+
return /*#__PURE__*/ _jsxs(_Fragment, {
|
|
3119
|
+
children: [
|
|
3120
|
+
/*#__PURE__*/ _jsx("p", {
|
|
3121
|
+
onClick: function() {
|
|
3122
|
+
sendMessage(item, 1);
|
|
3123
|
+
if (config && config.type == "video") {
|
|
3124
|
+
setBottomRecommendationQuestions([]);
|
|
3125
|
+
resettingBottomHei();
|
|
3126
|
+
}
|
|
3127
|
+
},
|
|
3128
|
+
children: item.question
|
|
3129
|
+
}, item.id),
|
|
3130
|
+
/*#__PURE__*/ _jsx("br", {})
|
|
3131
|
+
]
|
|
3132
|
+
});
|
|
3133
|
+
} else {
|
|
3134
|
+
return null;
|
|
3135
|
+
}
|
|
3108
3136
|
})
|
|
3109
3137
|
});
|
|
3110
3138
|
}
|