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