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

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