bhd-components 0.7.27 → 0.7.29
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/dist/{478f80a5.esm.es5.production.js → 29492132.esm.es5.production.js} +1 -1
- package/dist/{f1eff3e0.esm.es5.development.js → 4e438177.esm.es5.development.js} +415 -374
- package/dist/index.esm.es5.development.css +1013 -997
- package/dist/index.esm.es5.development.js +16 -7
- package/dist/index.esm.es5.production.css +1 -1
- package/dist/index.esm.es5.production.js +1 -1
- package/es2017/customerService/function.js +3 -1
- package/es2017/customerService/index.js +6 -3
- package/es2017/customerService/index.module.less +7 -0
- package/es2017/customerService/index2.module.less +7 -0
- package/esm/customerService/function.js +3 -1
- package/esm/customerService/index.js +10 -3
- package/esm/customerService/index.module.less +7 -0
- package/esm/customerService/index2.module.less +7 -0
- package/package.json +1 -1
|
@@ -136,9 +136,11 @@ const getBase64Image = (src)=>{
|
|
|
136
136
|
const formatDate = (dateStr)=>{
|
|
137
137
|
const today = new Date();
|
|
138
138
|
const date = new Date(dateStr);
|
|
139
|
+
let isSameDay = today.getFullYear() === date.getFullYear() && today.getMonth() === date.getMonth() && today.getDate() === date.getDate();
|
|
139
140
|
const dayDiff = Math.ceil((today - date) / (1000 * 60 * 60 * 24)); // 计算天数差
|
|
141
|
+
// 判断当前的日期 是否于传入的日期为同一天 同一天则显示时间 不是同一天则判断是否超过一周
|
|
140
142
|
// console.log(dayDiff,'dayDiffdayDiff',today,'___',date);
|
|
141
|
-
if (
|
|
143
|
+
if (isSameDay) {
|
|
142
144
|
// 今天
|
|
143
145
|
return date.toLocaleTimeString('zh-CN', {
|
|
144
146
|
hour12: false
|
|
@@ -1427,10 +1427,13 @@ const CustomerService = (props)=>{
|
|
|
1427
1427
|
}).then((res)=>{
|
|
1428
1428
|
if (res.data.questions) {
|
|
1429
1429
|
setQuestionsList((questionList)=>{
|
|
1430
|
-
|
|
1430
|
+
let newList = [
|
|
1431
1431
|
...questionList,
|
|
1432
1432
|
...res.data.questions
|
|
1433
1433
|
];
|
|
1434
|
+
// 数组去重
|
|
1435
|
+
newList = newList.filter((item, index, self)=>index === self.findIndex((t)=>t.id === item.id));
|
|
1436
|
+
return newList;
|
|
1434
1437
|
});
|
|
1435
1438
|
}
|
|
1436
1439
|
});
|
|
@@ -2656,11 +2659,11 @@ const CustomerService = (props)=>{
|
|
|
2656
2659
|
children: [
|
|
2657
2660
|
/*#__PURE__*/ _jsxs("p", {
|
|
2658
2661
|
onClick: ()=>{
|
|
2659
|
-
sendScreenshotData('
|
|
2662
|
+
sendScreenshotData('讲解图片里的知识点');
|
|
2660
2663
|
},
|
|
2661
2664
|
children: [
|
|
2662
2665
|
/*#__PURE__*/ _jsx(CustomKnowledgeContent, {}),
|
|
2663
|
-
"
|
|
2666
|
+
"讲解图片里的知识点"
|
|
2664
2667
|
]
|
|
2665
2668
|
}),
|
|
2666
2669
|
/*#__PURE__*/ _jsx("br", {}),
|
|
@@ -140,9 +140,11 @@ var getBase64Image = function(src) {
|
|
|
140
140
|
var formatDate = function(dateStr) {
|
|
141
141
|
var today = new Date();
|
|
142
142
|
var date = new Date(dateStr);
|
|
143
|
+
var isSameDay = today.getFullYear() === date.getFullYear() && today.getMonth() === date.getMonth() && today.getDate() === date.getDate();
|
|
143
144
|
var dayDiff = Math.ceil((today - date) / (1000 * 60 * 60 * 24)); // 计算天数差
|
|
145
|
+
// 判断当前的日期 是否于传入的日期为同一天 同一天则显示时间 不是同一天则判断是否超过一周
|
|
144
146
|
// console.log(dayDiff,'dayDiffdayDiff',today,'___',date);
|
|
145
|
-
if (
|
|
147
|
+
if (isSameDay) {
|
|
146
148
|
// 今天
|
|
147
149
|
return date.toLocaleTimeString("zh-CN", {
|
|
148
150
|
hour12: false
|
|
@@ -1467,7 +1467,14 @@ var CustomerService = function(props) {
|
|
|
1467
1467
|
}).then(function(res) {
|
|
1468
1468
|
if (res.data.questions) {
|
|
1469
1469
|
setQuestionsList(function(questionList) {
|
|
1470
|
-
|
|
1470
|
+
var newList = _to_consumable_array(questionList).concat(_to_consumable_array(res.data.questions));
|
|
1471
|
+
// 数组去重
|
|
1472
|
+
newList = newList.filter(function(item, index, self) {
|
|
1473
|
+
return index === self.findIndex(function(t) {
|
|
1474
|
+
return t.id === item.id;
|
|
1475
|
+
});
|
|
1476
|
+
});
|
|
1477
|
+
return newList;
|
|
1471
1478
|
});
|
|
1472
1479
|
}
|
|
1473
1480
|
});
|
|
@@ -2707,11 +2714,11 @@ var CustomerService = function(props) {
|
|
|
2707
2714
|
children: [
|
|
2708
2715
|
/*#__PURE__*/ _jsxs("p", {
|
|
2709
2716
|
onClick: function() {
|
|
2710
|
-
sendScreenshotData("
|
|
2717
|
+
sendScreenshotData("讲解图片里的知识点");
|
|
2711
2718
|
},
|
|
2712
2719
|
children: [
|
|
2713
2720
|
/*#__PURE__*/ _jsx(CustomKnowledgeContent, {}),
|
|
2714
|
-
"
|
|
2721
|
+
"讲解图片里的知识点"
|
|
2715
2722
|
]
|
|
2716
2723
|
}),
|
|
2717
2724
|
/*#__PURE__*/ _jsx("br", {}),
|