diff --git a/.gitignore b/.gitignore index 501259e..8d7c170 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ server *.db *.ui *.pyc +*.bat *.log *.spec test* diff --git a/app/decrypt/get_wx_info.py b/app/decrypt/get_wx_info.py index 830b110..8eec09f 100644 --- a/app/decrypt/get_wx_info.py +++ b/app/decrypt/get_wx_info.py @@ -297,7 +297,7 @@ def get_key(db_path, addr_len): return key_bytes def verify_key(key, wx_db_path): - if wx_db_path == "None": + if not wx_db_path or wx_db_path.lower() == "none": return True KEY_SIZE = 32 DEFAULT_PAGESIZE = 4096 diff --git a/app/ui/mainview.py b/app/ui/mainview.py index 6af60ee..471d155 100644 --- a/app/ui/mainview.py +++ b/app/ui/mainview.py @@ -250,6 +250,18 @@ QComboBox QAbstractItemView::item:selected ''' +class Avatar(QLabel): + def __init__(self, parent=None): + super().__init__(parent) + + def mouseDoubleClickEvent(self, e): # 双击 + super().mouseDoubleClickEvent() + QDesktopServices.openUrl(QUrl("https://blog.lc044.love/post/7")) + + def mousePressEvent(self, e): # 单击 + super().mousePressEvent(e) + QDesktopServices.openUrl(QUrl("https://blog.lc044.love/post/7")) + class MainWinController(QMainWindow, mainwindow.Ui_MainWindow, QCursorGif): exitSignal = pyqtSignal(bool) okSignal = pyqtSignal(bool) @@ -260,7 +272,7 @@ class MainWinController(QMainWindow, mainwindow.Ui_MainWindow, QCursorGif): self.outputThread0 = None self.outputThread = None self.setupUi(self) - + # self.myavatar = Avatar(self) # self.setWindowIcon(Icon.MainWindow_Icon) pixmap = QPixmap(Icon.logo_ico_path) icon = QIcon(pixmap) @@ -312,6 +324,7 @@ class MainWinController(QMainWindow, mainwindow.Ui_MainWindow, QCursorGif): self.action_help_faq.triggered.connect( lambda: QDesktopServices.openUrl(QUrl("https://blog.lc044.love/post/7"))) self.about_view = AboutDialog(main_window=self, parent=self) + # self.statusbar.set def setCurrentIndex(self, row): self.stackedWidget.setCurrentIndex(row) diff --git a/app/ui/mainwindow.py b/app/ui/mainwindow.py index 3bac55f..1f2cd92 100644 --- a/app/ui/mainwindow.py +++ b/app/ui/mainwindow.py @@ -9,6 +9,22 @@ from PyQt5 import QtCore, QtGui, QtWidgets +from PyQt5.QtCore import QUrl +from PyQt5.QtGui import QDesktopServices +from PyQt5.QtWidgets import QLabel + + +class Avatar(QLabel): + def __init__(self, parent=None): + super().__init__(parent) + + def mouseDoubleClickEvent(self, e): # 双击 + super().mouseDoubleClickEvent(e) + QDesktopServices.openUrl(QUrl("https://memotrace.lc044.love/")) + + def mousePressEvent(self, e): # 单击 + super().mousePressEvent(e) + QDesktopServices.openUrl(QUrl("https://memotrace.lc044.love/")) class Ui_MainWindow(object): @@ -24,7 +40,7 @@ class Ui_MainWindow(object): MainWindow.setMouseTracking(True) MainWindow.setStyleSheet("") MainWindow.setIconSize(QtCore.QSize(50, 24)) - MainWindow.setDockOptions(QtWidgets.QMainWindow.AllowTabbedDocks|QtWidgets.QMainWindow.AnimatedDocks) + MainWindow.setDockOptions(QtWidgets.QMainWindow.AllowTabbedDocks | QtWidgets.QMainWindow.AnimatedDocks) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setMouseTracking(True) self.centralwidget.setObjectName("centralwidget") @@ -40,7 +56,7 @@ class Ui_MainWindow(object): self.frame_info.setFrameShadow(QtWidgets.QFrame.Plain) self.frame_info.setLineWidth(5) self.frame_info.setObjectName("frame_info") - self.myavatar = QtWidgets.QLabel(self.frame_info) + self.myavatar = Avatar(self.frame_info) self.myavatar.setGeometry(QtCore.QRect(10, 40, 60, 60)) self.myavatar.setObjectName("myavatar") self.listWidget = QtWidgets.QListWidget(self.frame_info) diff --git a/app/ui/tool/pc_decrypt/pc_decrypt.py b/app/ui/tool/pc_decrypt/pc_decrypt.py index 50d2e1b..d44ffad 100644 --- a/app/ui/tool/pc_decrypt/pc_decrypt.py +++ b/app/ui/tool/pc_decrypt/pc_decrypt.py @@ -125,7 +125,7 @@ class DecryptControl(QWidget, decryptUi.Ui_Dialog, QCursorGif): def decrypt(self): if not self.ready: - QMessageBox.critical(self, "错误", "请先获取密钥") + QMessageBox.critical(self, "错误", "请先获取信息") return if not self.wx_dir: QMessageBox.critical(self, "错误", "请先选择微信安装路径") @@ -294,7 +294,6 @@ class MyThread(QThread): print(response) print(response.text) if response.status_code == 200: - update_info = response.json() return update_info else: @@ -322,6 +321,7 @@ class MyThread(QThread): result = [result] elif isinstance(result, str): version = result + # version = '3.9.9.43' version_bias = self.get_bias_add(version) if version_bias.get(version): logger.info(f"从云端获取内存基址:{version_bias}") diff --git a/app/web_ui/templates/charts.html b/app/web_ui/templates/charts.html index f982d07..0339fc1 100644 --- a/app/web_ui/templates/charts.html +++ b/app/web_ui/templates/charts.html @@ -27,6 +27,7 @@ +

diff --git a/app/web_ui/web.py b/app/web_ui/web.py index 83c3c56..0d196ac 100644 --- a/app/web_ui/web.py +++ b/app/web_ui/web.py @@ -182,21 +182,6 @@ def get_image(filename): return send_file(os.path.join(f"{os.getcwd()}/data/avatar/", filename), mimetype='image/png') -# 示例数据,实际应用中你需要替换成从数据库或其他数据源获取的数据 -echarts_data = { - 'categories': ['Category A', 'Category B', 'Category C', 'Category D', 'Category E'], - 'data': [20, 50, 80, 45, 60] -} - - -def generate_chart(): - # 使用 Pyecharts 生成图表 - bar = Bar() - bar.add_xaxis(echarts_data['categories']) - bar.add_yaxis('Data', echarts_data['data']) - return bar.dump_options_with_quotes() - - @app.route('/month_count') def get_chart_options(): time_range = (0, time.time())