feat: 多项功能更新

- 日志时间改为北京时间(TZ=Asia/Shanghai)
- 评论达上限后继续执行点赞/收藏/转发
- 用户信息同步改用 PATCH /v2/users/current
- 一键登出全部功能
- 一键登出全部前端按钮
- update.sh 一键更新脚本
This commit is contained in:
stefanfeng
2026-03-31 10:29:26 +08:00
parent 3fbccbc2b1
commit cd07776914
27 changed files with 20 additions and 0 deletions

0
backend/Dockerfile Normal file → Executable file
View File

0
backend/app/__init__.py Normal file → Executable file
View File

0
backend/app/api/__init__.py Normal file → Executable file
View File

0
backend/app/api/endpoints/__init__.py Normal file → Executable file
View File

0
backend/app/api/endpoints/ai_models.py Normal file → Executable file
View File

0
backend/app/api/endpoints/dashboard.py Normal file → Executable file
View File

0
backend/app/api/endpoints/interactions.py Normal file → Executable file
View File

0
backend/app/api/endpoints/logs.py Normal file → Executable file
View File

0
backend/app/api/endpoints/system.py Normal file → Executable file
View File

0
backend/app/api/endpoints/users.py Normal file → Executable file
View File

0
backend/app/core/__init__.py Normal file → Executable file
View File

0
backend/app/core/config.py Normal file → Executable file
View File

0
backend/app/core/database.py Normal file → Executable file
View File

0
backend/app/core/logger.py Normal file → Executable file
View File

0
backend/app/core/redis_client.py Normal file → Executable file
View File

0
backend/app/main.py Normal file → Executable file
View File

0
backend/app/models/__init__.py Normal file → Executable file
View File

0
backend/app/models/all_models.py Normal file → Executable file
View File

0
backend/app/services/__init__.py Normal file → Executable file
View File

0
backend/app/services/ai_service.py Normal file → Executable file
View File

0
backend/app/services/scheduler.py Normal file → Executable file
View File

0
backend/app/services/stats_service.py Normal file → Executable file
View File

0
backend/app/services/user_service.py Normal file → Executable file
View File

0
backend/app/utils/__init__.py Normal file → Executable file
View File

0
backend/app/utils/crypto.py Normal file → Executable file
View File

0
backend/requirements.txt Normal file → Executable file
View File

20
update.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
set -e
echo "🔄 从 Gitea 拉取最新代码..."
cd /opt/1panel/docker/compose/ai-virtual-news
git pull origin main
echo "🔄 重启后端..."
docker restart ai-virtual-backend
sleep 15
echo "🔄 构建前端..."
cd frontend
rm -rf dist node_modules/.vite
docker run --rm -v $(pwd):/app -w /app node:18-alpine sh -c "npm run build"
docker cp dist/. ai-virtual-frontend:/usr/share/nginx/html/
docker exec ai-virtual-frontend nginx -s reload
cd ..
echo "✅ 更新完成!"
docker logs --tail=3 ai-virtual-backend 2>&1