diff --git a/app/DataBase/output_pc.py b/app/DataBase/output_pc.py
index a9e8e15..292d30c 100644
--- a/app/DataBase/output_pc.py
+++ b/app/DataBase/output_pc.py
@@ -671,6 +671,13 @@ input {
font-size: 14px;
}
+.emoji_img {
+ width: 26px;
+ height: 26px;
+ position: relative;
+ bottom: -6px;
+}
+
@@ -723,6 +730,8 @@ const chatMessages = [
MePC().avatar.save(os.path.join(origin_docx_path, 'myhead.png'))
self.contact.avatar.save(os.path.join(origin_docx_path, 'tahead.png'))
self.rangeSignal.emit(len(messages))
+ emoji = {'[微笑]': '
', '[撇嘴]': '
', '[色]': '
', '[发呆]': '
', '[得意]': '
', '[流泪]': '
', '[害羞]': '
', '[闭嘴]': '
', '[睡]': '
', '[大哭]': '
', '[尴尬]': '
', '[发怒]': '
', '[调皮]': '
', '[呲牙]': '
', '[惊讶]': '
', '[难过]': '
', '[抓狂]': '
', '[吐]': '
', '[偷笑]': '
', '[愉快]': '
', '[白眼]': '
', '[傲慢]': '
', '[困]': '
', '[惊恐]': '
', '[憨笑]': '
', '[悠闲]': '
', '[咒骂]': '
', '[疑问]': '
', '[嘘]': '
', '[晕]': '
', '[衰]': '
', '[骷髅]': '
', '[敲打]': '
', '[再见]': '
', '[擦汗]': '
', '[抠鼻]': '
', '[鼓掌]': '
', '[坏笑]': '
', '[右哼哼]': '
', '[鄙视]': '
', '[委屈]': '
', '[快哭了]': '
', '[阴险]': '
', '[亲亲]': '
', '[可怜]': '
', '[笑脸]': '
', '[生病]': '
', '[脸红]': '
', '[破涕为笑]': '
', '[恐惧]': '
', '[失望]': '
', '[无语]': '
', '[嘿哈]': '
', '[捂脸]': '
', '[奸笑]': '
', '[机智]': '
', '[皱眉]': '
', '[耶]': '
', '[吃瓜]': '
', '[加油]': '
', '[汗]': '
', '[天啊]': '
', '[Emm]': '
', '[社会社会]': '
', '[旺柴]': '
', '[好的]': '
', '[打脸]': '
', '[哇]': '
', '[翻白眼]': '
', '[666]': '
', '[让我看看]': '
', '[叹气]': '
', '[苦涩]': '
', '[裂开]': '
', '[嘴唇]': '
', '[爱心]': '
', '[心碎]': '
', '[拥抱]': '
', '[强]': '
', '[弱]': '
', '[握手]': '
', '[胜利]': '
', '[抱拳]': '
', '[勾引]': '
', '[拳头]': '
', '[OK]': '
', '[合十]': '
', '[啤酒]': '
', '[咖啡]': '
', '[蛋糕]': '
', '[玫瑰]': '
', '[凋谢]': '
', '[菜刀]': '
', '[炸弹]': '
', '[便便]': '
', '[月亮]': '
', '[太阳]': '
', '[庆 祝]': '
', '[礼物]': '
', '[红包]': '
', '[發]': '
', '[福]': '
', '[烟花]': '
', '[爆竹]': '
', '[猪头]': '
', '[跳跳]': '
', '[发抖]': '
', '[转圈]': '
'}
+ from re import findall
for index, message in enumerate(messages):
type_ = message[2]
str_content = message[7]
@@ -740,6 +749,11 @@ const chatMessages = [
f.write(
f'''{{ type:0, text: '{str_time}',is_send:0,avatar_path:''}},'''
)
+
+ emojiText = findall(r"(\[.+?\])", str_content)
+ for emoji_text in emojiText:
+ if emoji_text in emoji:
+ str_content = str_content.replace(emoji_text, emoji[emoji_text])
f.write(
f'''{{ type:{type_}, text: '{str_content}',is_send:{is_send},avatar_path:'{avatar}'}},'''
)