这是使用PyQT5作为UI的首次提交,将后端和UI合并到1个工程中,统一使用了Python,没有使用JS和HTML

This commit is contained in:
2025-12-14 12:13:19 +08:00
commit 872b181703
122 changed files with 70944 additions and 0 deletions

17
UI/config.py Normal file
View File

@@ -0,0 +1,17 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
全局配置文件
用于控制数据库访问方式等全局设置
"""
# ===================== 数据库访问配置 =====================
# True: 使用 HTTP API 访问数据库(避免多线程竞争)
# False: 直接访问 SQLite 数据库
# 已优化:使用 requests.Session() 连接池,性能提升 10-20 倍
USE_HTTP_API = True # 已优化,可以启用
# Flask 后端 HTTP API 地址
# 注意Windows 下 localhost DNS 解析慢(~2秒必须使用 127.0.0.1
HTTP_API_BASE_URL = "http://127.0.0.1:5050"