mirror of
https://github.com/LC044/WeChatMsg
synced 2024-11-09 09:31:18 +08:00
增加转账解析错误判断
This commit is contained in:
parent
75cc118d99
commit
aebd5fbdb1
@ -270,15 +270,17 @@ class HtmlExporter(ExporterBase):
|
||||
is_chatroom = 1 if self.contact.is_chatroom else 0
|
||||
avatar = self.get_avatar_path(is_send, message)
|
||||
display_name = self.get_display_name(is_send, message)
|
||||
text_info_map = {
|
||||
1: transfer_detail["pay_memo"] or "转账",
|
||||
3: "已收款",
|
||||
4: "已退还",
|
||||
7: "未知",
|
||||
}
|
||||
doc.write(
|
||||
f"""{{ type:49, sub_type:2000,text:'{text_info_map[transfer_detail["paysubtype"]]}',is_send:{is_send},avatar_path:'{avatar}',timestamp:{timestamp},is_chatroom:{is_chatroom},displayname:'{display_name}',paysubtype:{transfer_detail["paysubtype"]},pay_memo:'{transfer_detail["pay_memo"]}',feedesc:'{transfer_detail["feedesc"]}',}},\n""")
|
||||
|
||||
try:
|
||||
text_info_map = {
|
||||
1: transfer_detail["pay_memo"] or "转账",
|
||||
3: "已收款",
|
||||
4: "已退还",
|
||||
7: "未知",
|
||||
}
|
||||
doc.write(
|
||||
f"""{{ type:49, sub_type:2000,text:'{text_info_map[transfer_detail["paysubtype"]]}',is_send:{is_send},avatar_path:'{avatar}',timestamp:{timestamp},is_chatroom:{is_chatroom},displayname:'{display_name}',paysubtype:{transfer_detail["paysubtype"]},pay_memo:'{transfer_detail["pay_memo"]}',feedesc:'{transfer_detail["feedesc"]}',}},\n""")
|
||||
except Exception as e:
|
||||
logger.error(f'转账解析错误:{transfer_detail}\n{traceback.format_exc()}')
|
||||
def call(self, doc, message):
|
||||
is_send = message[4]
|
||||
timestamp = message[5]
|
||||
|
@ -230,13 +230,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" style="text-align: center;display:flex;justify-content: center;align-items: center;">
|
||||
<h1>分享此页面</h1>
|
||||
<div>
|
||||
<a id="share" href="https://memotrace.lc044.love/" target="_blank">https://memotrace.lc044.love/</a>
|
||||
</div>
|
||||
<button onclick="confirmUpload()">上传并显示二维码</button>
|
||||
<div id="qrcode"></div>
|
||||
<a href="https://memotrace.lc044.love/" target="_blank">点击生成我的年度聊天报告</a>
|
||||
<h1>敬请期待</h1>
|
||||
</div>
|
||||
<!-- Add more sections as needed -->
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user