修复了一点小问题

This commit is contained in:
stupidzayac 2024-01-19 14:10:06 +08:00
parent 4966dbd89d
commit 0c733696f7
2 changed files with 4 additions and 7 deletions

View File

@ -28,7 +28,7 @@ class Account(db.Base):
name: Mapped[str] = mapped_column(String(64), nullable=True, comment='别名')
url: Mapped[str] = mapped_column(String(128), nullable=False, comment='url')
x_api_token: Mapped[str] = mapped_column(String(64), nullable=True, comment='x-api-token')
headers: Mapped[json] = mapped_column(Sql_JSON, nullable=True, comment='headers')
headers: Mapped[Sql_JSON] = mapped_column(Sql_JSON, nullable=True, comment='headers')
user_id: Mapped[int] = mapped_column(ForeignKey('ky_user.id'),
nullable=False, comment='关联的用户id')
user: Mapped['user.User'] = relationship('user.User', back_populates='accounts')

View File

@ -9,9 +9,8 @@ from PyQt6.QtWidgets import (QApplication, QCheckBox, QDateEdit, QHBoxLayout,
QSizePolicy, QTableWidget, QTableWidgetItem,
QTabWidget, QTextEdit, QVBoxLayout, QWidget, QMessageBox, QSystemTrayIcon, QMenu)
from src import resource_path
from src.core.message_client import send_message
from src.core.util import convert_data
from src.core.util import convert_data,resource_path
from src.entity.member import get_today_new_member_list
from src.entity.pay_record import get_latest_deposit_user
from src.entity.user import get_user_by_username_and_password
@ -100,7 +99,7 @@ class Application(QMainWindow):
def load_config(self):
config = configparser.ConfigParser()
config_file = 'config.ini'
config_file = 'src/config.ini'
if not os.path.exists(config_file):
QMessageBox.warning(None, "警告", "用户信息获取失败!")
@ -138,7 +137,7 @@ class Application(QMainWindow):
self.thread_pool.start(report_task)
def apply_stylesheet(self):
style_sheet = self.load_stylesheet(resource_path('ui/style.qss'))
style_sheet = self.load_stylesheet(resource_path('src/ui/style.qss'))
self.setStyleSheet(style_sheet)
def refresh_user_data(self):
@ -257,8 +256,6 @@ class Application(QMainWindow):
# 将复选框布局添加到顶部面板
self.top_panel.addLayout(checkbox_layout)
self.main_layout.addLayout(self.top_panel)
def toggle_system_notification(self, state):
self.toaster_notify_enabled = state == Qt.CheckState.Checked