修改acList数据的目录

This commit is contained in:
2025-10-29 16:54:18 +08:00
parent 0c78a025f4
commit 7de4fff7cf
5 changed files with 59 additions and 37 deletions

View File

@@ -422,7 +422,7 @@ def addTempAnchorData():
if not data:
return ResultData(code=400, message="请求数据为空").toJson()
# 追加到 JSON 文件
AiUtils.save_aclist_flat_append(data, "log/acList.json")
AiUtils.save_aclist_flat_append(data, "data/acList.json")
return ResultData(data="ok").toJson()
# 获取当前屏幕上的聊天信息
@@ -505,7 +505,7 @@ def upLoadLogLogs():
def queryAnchorList():
# 项目根目录(当前文件在 infos 下,回退两层到根目录)
root_dir = Path(__file__).resolve().parent.parent
file_path = root_dir / "log" / "acList.json"
file_path = root_dir / "data" / "acList.json"
data = []
if file_path.exists():
@@ -532,7 +532,7 @@ def updateAnchorList():
new_status = 1 if state else 0
# 用工具类解析路径,避免 cwd 影响
file_path = AiUtils._resolve_path("log/acList.json")
file_path = AiUtils._resolve_path("data/acList.json")
# 加载 JSON
try: