|
|
1
|
+/* eslint-disable indent */
|
1
|
import { get, first } from 'lodash';
|
2
|
import { get, first } from 'lodash';
|
2
|
|
3
|
|
3
|
function _version2num(version) {
|
4
|
function _version2num(version) {
|
|
@@ -38,6 +39,16 @@ function handleProtocol(url) { |
|
@@ -38,6 +39,16 @@ function handleProtocol(url) { |
38
|
return url.join('//');
|
39
|
return url.join('//');
|
39
|
}
|
40
|
}
|
40
|
|
41
|
|
|
|
42
|
+const filterEmoji = (text) => {
|
|
|
43
|
+ const ranges = [
|
|
|
44
|
+ '\ud83c[\udf00-\udfff]',
|
|
|
45
|
+ '\ud83d[\udc00-\ude4f]',
|
|
|
46
|
+ '\ud83d[\ude80-\udeff]'
|
|
|
47
|
+ ];
|
|
|
48
|
+
|
|
|
49
|
+ return text.replace(new RegExp(ranges.join('|'), 'g'), '');
|
|
|
50
|
+};
|
|
|
51
|
+
|
41
|
// eslint-disable-next-line no-unused-vars
|
52
|
// eslint-disable-next-line no-unused-vars
|
42
|
const getDetailShareData = (article, app_version = '6.9.11') => {
|
53
|
const getDetailShareData = (article, app_version = '6.9.11') => {
|
43
|
let shareImage = '';
|
54
|
let shareImage = '';
|
|
@@ -79,10 +90,10 @@ const getDetailShareData = (article, app_version = '6.9.11') => { |
|
@@ -79,10 +90,10 @@ const getDetailShareData = (article, app_version = '6.9.11') => { |
79
|
hideType = ['8', '9'];
|
90
|
hideType = ['8', '9'];
|
80
|
}
|
91
|
}
|
81
|
|
92
|
|
82
|
- const regexp = /\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/g;
|
|
|
83
|
|
93
|
|
84
|
- desc = desc.replace(regexp, '');
|
|
|
85
|
- const authorName = (article.authorName || '').replace(regexp, '');
|
94
|
+ // desc = filterEmoji(desc);
|
|
|
95
|
+ desc = filterEmoji('整理闲置时↵↵↵“我是废墟里的公主👸🏻”');
|
|
|
96
|
+ const authorName = filterEmoji(article.authorName || '');
|
86
|
|
97
|
|
87
|
return {
|
98
|
return {
|
88
|
title: `@${authorName} 在有货社区上发了一篇内容,快点开看看!`,
|
99
|
title: `@${authorName} 在有货社区上发了一篇内容,快点开看看!`,
|