mirror of
https://github.com/LC044/WeChatMsg
synced 2025-02-22 10:52:18 +08:00
群组暂不支持年度报告
This commit is contained in:
parent
716f030faa
commit
7da314bc6d
@ -72,12 +72,12 @@ class ContactInfo(QWidget, Ui_Form):
|
||||
self.view_analysis.start()
|
||||
|
||||
def annual_report(self):
|
||||
# QMessageBox.warning(
|
||||
# self,
|
||||
# "提示",
|
||||
# "敬请期待"
|
||||
# )
|
||||
# return
|
||||
if 'room' in self.contact.wxid:
|
||||
QMessageBox.warning(
|
||||
self, '警告',
|
||||
'暂不支持群组'
|
||||
)
|
||||
return
|
||||
self.contact.save_avatar()
|
||||
self.report_thread = ReportThread(self.contact)
|
||||
self.report_thread.okSignal.connect(lambda x: QDesktopServices.openUrl(QUrl("http://127.0.0.1:21314")))
|
||||
@ -85,18 +85,19 @@ class ContactInfo(QWidget, Ui_Form):
|
||||
QDesktopServices.openUrl(QUrl("http://127.0.0.1:21314/"))
|
||||
|
||||
def emotionale_Analysis(self):
|
||||
QMessageBox.warning(self,
|
||||
"别急别急",
|
||||
"马上就实现该功能"
|
||||
)
|
||||
return
|
||||
self.stackedWidget.setCurrentWidget(self.view_emotion)
|
||||
if 'room' in self.contact.wxid:
|
||||
QMessageBox.warning(
|
||||
self, '警告',
|
||||
'暂不支持群组'
|
||||
)
|
||||
return
|
||||
QMessageBox.warning(self,
|
||||
"别急别急",
|
||||
"马上就实现该功能"
|
||||
)
|
||||
return
|
||||
self.stackedWidget.setCurrentWidget(self.view_emotion)
|
||||
|
||||
self.view_emotion.start()
|
||||
|
||||
def back(self):
|
||||
|
@ -13,31 +13,31 @@ wxid = ''
|
||||
contact: ContactPC = None
|
||||
|
||||
|
||||
# @app.route("/")
|
||||
# def index():
|
||||
# # 渲染模板,并传递图表的 HTML 到模板中
|
||||
# return render_template("index.html")
|
||||
|
||||
|
||||
@app.route("/")
|
||||
def cindex():
|
||||
def index():
|
||||
# 渲染模板,并传递图表的 HTML 到模板中
|
||||
return render_template("cindex.html")
|
||||
return render_template("index.html")
|
||||
|
||||
|
||||
# @app.route('/home')
|
||||
# def home():
|
||||
# try:
|
||||
# first_message, first_time = msg_db.get_first_time_of_message(contact.wxid)
|
||||
# except TypeError:
|
||||
# return set_text('咱就是说,一次都没聊过就别分析了')
|
||||
# data = {
|
||||
# 'sub_title': '二零二三年度报告',
|
||||
# 'avatar_path': contact.avatar_path,
|
||||
# 'nickname': contact.remark,
|
||||
# 'first_time': first_time,
|
||||
# }
|
||||
# return render_template('home.html', **data)
|
||||
# @app.route("/")
|
||||
# def cindex():
|
||||
# # 渲染模板,并传递图表的 HTML 到模板中
|
||||
# return render_template("cindex.html")
|
||||
|
||||
|
||||
@app.route('/home')
|
||||
def home():
|
||||
try:
|
||||
first_message, first_time = msg_db.get_first_time_of_message(contact.wxid)
|
||||
except TypeError:
|
||||
return set_text('咱就是说,一次都没聊过就别分析了')
|
||||
data = {
|
||||
'sub_title': '二零二三年度报告',
|
||||
'avatar_path': contact.avatar_path,
|
||||
'nickname': contact.remark,
|
||||
'first_time': first_time,
|
||||
}
|
||||
return render_template('home.html', **data)
|
||||
|
||||
|
||||
@app.route('/home')
|
||||
@ -55,17 +55,17 @@ def chome():
|
||||
return render_template('chome.html', **data)
|
||||
|
||||
|
||||
# @app.route('/wordcloud/<who>/')
|
||||
# def one(who):
|
||||
# wxid = contact.wxid
|
||||
# # wxid = 'wxid_lltzaezg38so22'
|
||||
# # print('wxid:'+wxid)
|
||||
# world_cloud_data = analysis.wordcloud(wxid, who=who) # 获取与Ta的对话数据
|
||||
# # print(world_cloud_data)
|
||||
# who = "你" if who == '1' else "TA"
|
||||
# with open('wordcloud.html', 'w', encoding='utf-8') as f:
|
||||
# f.write(render_template('wordcloud.html', **world_cloud_data))
|
||||
# return render_template('wordcloud.html', **world_cloud_data, who=who)
|
||||
@app.route('/wordcloud/<who>/')
|
||||
def one(who):
|
||||
wxid = contact.wxid
|
||||
# wxid = 'wxid_lltzaezg38so22'
|
||||
# print('wxid:'+wxid)
|
||||
world_cloud_data = analysis.wordcloud(wxid, who=who) # 获取与Ta的对话数据
|
||||
# print(world_cloud_data)
|
||||
who = "你" if who == '1' else "TA"
|
||||
with open('wordcloud.html', 'w', encoding='utf-8') as f:
|
||||
f.write(render_template('wordcloud.html', **world_cloud_data))
|
||||
return render_template('wordcloud.html', **world_cloud_data, who=who)
|
||||
|
||||
|
||||
@app.route('/wordcloud')
|
||||
|
Loading…
Reference in New Issue
Block a user