fix: 删除无效的nul文件

This commit is contained in:
ZJPB Admin
2025-12-31 01:37:27 +08:00
parent 4b6a77f71b
commit f43b608d88
73 changed files with 1892 additions and 2 deletions

110
git_patch_deploy_v2.2.sh Normal file
View File

@@ -0,0 +1,110 @@
#!/bin/bash
# ZJPB v2.2 Git Patch 部署脚本
# 在生产服务器上执行
echo "================================"
echo "ZJPB v2.2 Git Patch 部署"
echo "================================"
echo ""
# 项目路径
PROJECT_DIR="/opt/1panel/apps/zjpb"
# 检查是否在正确目录
cd $PROJECT_DIR || { echo ">>> 项目目录不存在"; exit 1; }
echo "当前目录: $(pwd)"
echo ""
# 停止应用
echo "1. 停止应用..."
./manage.sh stop
sleep 2
# 检查Git状态
echo "2. 检查Git状态..."
git status
# 备份未提交的修改(如果有)
echo "3. 备份当前修改(如有)..."
if ! git diff-index --quiet HEAD --; then
echo " 发现未提交的修改,正在保存..."
git stash save "backup_before_v2.2_$(date +%Y%m%d_%H%M%S)"
fi
# 应用patch
echo "4. 应用v2.2.0补丁..."
if [ -f "v2.2.0.patch" ]; then
git apply --check v2.2.0.patch
if [ $? -eq 0 ]; then
git apply v2.2.0.patch
echo " >>> 补丁应用成功"
else
echo " >>> 补丁应用失败,请检查"
exit 1
fi
else
echo " >>> v2.2.0.patch 文件不存在"
exit 1
fi
# 提交更改
echo "5. 提交更改到Git..."
git add .
git commit -m "release: v2.2.0 - 博查新闻搜索功能
通过patch部署包含以下更新
- 集成博查Web Search API
- 新闻自动获取和展示
- 智能新闻更新机制(每日首次访问触发)
- News模型扩展source_name, source_icon
- 网站详情页新闻模块
- 定期任务脚本和测试工具
"
# 激活虚拟环境
echo "6. 激活虚拟环境..."
source venv/bin/activate
# 安装依赖(检查是否有新依赖)
echo "7. 检查依赖..."
pip install -r requirements.txt -q
# 运行数据库迁移
echo "8. 运行数据库迁移..."
if [ -f "migrate_news_fields.py" ]; then
python migrate_news_fields.py
if [ $? -eq 0 ]; then
echo " >>> 数据库迁移成功"
else
echo " >>> 数据库迁移失败"
exit 1
fi
else
echo " >>> migrate_news_fields.py 不存在,跳过"
fi
# 重启应用
echo "9. 重启应用..."
./manage.sh start
sleep 3
# 检查状态
echo "10. 检查应用状态..."
./manage.sh status
echo ""
echo "================================"
echo ">>> 部署完成!"
echo "================================"
echo ""
echo "Git提交历史"
git log --oneline -3
echo ""
echo "请访问网站验证更新是否成功"
echo ""
echo "验证清单:"
echo "1. 访问任意网站详情页,检查是否显示相关新闻"
echo "2. 登录后台 /admin/newsadmin/ 查看新闻管理"
echo "3. 检查日志确认没有错误"
echo ""

61
manage.sh.backup Normal file
View File

@@ -0,0 +1,61 @@
#!/bin/bash
# ZJPB 应用管理脚本
# 用法: ./manage.sh [start|stop|restart|status|logs]
APP_NAME="zjpb"
APP_DIR="/www/wwwroot/zjpb"
VENV_DIR="$APP_DIR/venv"
PID_FILE="$APP_DIR/logs/gunicorn.pid"
cd $APP_DIR
case "$1" in
start)
echo "启动 $APP_NAME..."
source $VENV_DIR/bin/activate
gunicorn -c gunicorn_config.py app:app
echo "$APP_NAME 已启动"
;;
stop)
echo "停止 $APP_NAME..."
if [ -f $PID_FILE ]; then
kill $(cat $PID_FILE)
echo "$APP_NAME 已停止"
else
echo "PID文件不存在可能未运行"
fi
;;
restart)
$0 stop
sleep 2
$0 start
;;
status)
if [ -f $PID_FILE ]; then
PID=$(cat $PID_FILE)
if ps -p $PID > /dev/null; then
echo "$APP_NAME 正在运行 (PID: $PID)"
else
echo "$APP_NAME 未运行但PID文件存在"
fi
else
echo "$APP_NAME 未运行"
fi
;;
logs)
echo "实时查看日志Ctrl+C退出"
tail -f logs/error.log
;;
*)
echo "用法: $0 {start|stop|restart|status|logs}"
exit 1
;;
esac
exit 0

2
nul
View File

@@ -1,2 +0,0 @@
timeout: invalid time interval /t
Try 'timeout --help' for more information.

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -0,0 +1,22 @@
<svg width="54" height="54" viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M32.9314 26.9511L21.7996 20.5242L32.4531 14.9257L42.8674 32.9639L32.4531 38.9766L32.9314 26.9511Z" fill="url(#paint0_linear_14267_83603)"/>
<path d="M21.8015 20.5187L21.8015 33.3726L11.6264 26.9457L22.0407 8.90756L32.455 14.9203L21.8015 20.5187Z" fill="url(#paint1_linear_14267_83603)"/>
<path d="M11.6249 26.9477L21.8 33.3747L27.3659 30.1612L32.9318 26.9477L32.4535 38.9731L11.6249 38.9731L11.6249 26.9477Z" fill="url(#paint2_linear_14267_83603)"/>
<path d="M17.0052 5.99971C14.6088 4.61614 11.6133 6.34561 11.6133 9.11277L11.6133 26.9375L22.0276 8.89937L17.0052 5.99971Z" fill="#F4DBFF"/>
<path d="M47.8817 30.0613C50.2782 28.6777 50.2782 25.2188 47.8817 23.8352L32.4451 14.9228L42.8594 32.9609L47.8817 30.0613Z" fill="#FFDBF6"/>
<path d="M11.6164 44.7588C11.6164 47.526 14.6119 49.2555 17.0083 47.8719L32.445 38.9595L11.6164 38.9595L11.6164 44.7588Z" fill="#FFE9CD"/>
<defs>
<linearGradient id="paint0_linear_14267_83603" x1="38.2931" y1="34.987" x2="39.9981" y2="18.0469" gradientUnits="userSpaceOnUse">
<stop stop-color="#7333F0"/>
<stop offset="1" stop-color="#F034D0"/>
</linearGradient>
<linearGradient id="paint1_linear_14267_83603" x1="26.9397" y1="11.8049" x2="11.9028" y2="25.1964" gradientUnits="userSpaceOnUse">
<stop stop-color="#FF5753"/>
<stop offset="1" stop-color="#FFA52D"/>
</linearGradient>
<linearGradient id="paint2_linear_14267_83603" x1="11.3626" y1="33.824" x2="31.1696" y2="38.3227" gradientUnits="userSpaceOnUse">
<stop stop-color="#FF5753"/>
<stop offset="1" stop-color="#F034D0"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 986 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

1699
v2.2.0.patch Normal file

File diff suppressed because it is too large Load Diff