mirror of
https://github.com/LC044/WeChatMsg
synced 2024-11-14 05:21:41 +08:00
修复没有聊天的好友年度报告的bug
This commit is contained in:
parent
80d669d7d4
commit
ebc62c33e1
@ -137,7 +137,10 @@ def calendar_chart(wxid, is_Annual_report=False, year='2023'):
|
||||
'chat_days': 0,
|
||||
}
|
||||
if not calendar_data:
|
||||
return False
|
||||
return {
|
||||
'calendar_chart_data': None,
|
||||
'chat_days': 0,
|
||||
}
|
||||
min_ = min(map(lambda x: x[1], calendar_data))
|
||||
max_ = max(map(lambda x: x[1], calendar_data))
|
||||
start_date_ = calendar_data[0][0]
|
||||
|
@ -10,7 +10,7 @@ class ScrollBar(QScrollBar):
|
||||
border-width: 0px;
|
||||
border: none;
|
||||
background:rgba(133, 135, 138, 0);
|
||||
width:2px;
|
||||
width:4px;
|
||||
margin: 0px 0px 0px 0px;
|
||||
}
|
||||
QScrollBar::handle:vertical {
|
||||
|
@ -178,7 +178,7 @@ def get_most_emoji(messages):
|
||||
md5_nums = [(num[0], key, num[1]) for key, num in dic.items()]
|
||||
md5_nums.sort(key=lambda x: x[0],reverse=True)
|
||||
if not md5_nums:
|
||||
return ''
|
||||
return '',0
|
||||
md5 = md5_nums[0][1]
|
||||
num = md5_nums[0][0]
|
||||
emoji_info = md5_nums[0][2]
|
||||
|
@ -42,7 +42,7 @@ def christmas():
|
||||
'正常作息': {'06:00', "07:00", "08:00", "09:00", "10:00", "11:00", "12:00", "13:00", "14:00", "15:00", "16:00",
|
||||
"17:00", "18:00", "19:00", "20:00", "21:00"},
|
||||
}
|
||||
time_, num = msg_data[0]
|
||||
time_, num = msg_data[0] if msg_data else '', 0
|
||||
chat_time = f"凌晨{time_}" if time_ in {'00:00', '01:00', '02:00', '03:00', '04:00', '05:00'} else time_
|
||||
label = '夜猫子'
|
||||
for key, item in desc.items():
|
||||
@ -84,7 +84,8 @@ def christmas():
|
||||
'emoji_url': url,
|
||||
'emoji_num': num,
|
||||
}
|
||||
return render_template("christmas.html", **data, **wordcloud_cloud_data, **time_data,**month_data,**calendar_data,**emoji_data)
|
||||
return render_template("christmas.html", **data, **wordcloud_cloud_data, **time_data, **month_data, **calendar_data,
|
||||
**emoji_data)
|
||||
|
||||
|
||||
# @app.route("/")
|
||||
|
Loading…
Reference in New Issue
Block a user