feat: 品牌升级(知冶→战知) + 应用工具广场重构 + 新增工具集成

品牌升级:
- 全站品牌从"知冶"更名为"战知"
- 更换 favicon、侧边栏 logo、登录页 logo
- 更新登录页标语和首页欢迎语

应用广场重构:
- 从后端数据库驱动改为前端静态配置,按分类 tab 展示
- 新增工具卡片 UI,支持 logo 图片和 emoji 图标

新增工具部署:
- Stirling PDF (端口18080) - PDF 处理工具箱
- Excalidraw (端口18081) - 手绘风格白板,集成 AI 绘图
- TrWebOCR (端口18083) - 中文离线 OCR
- LibreTranslate (端口18084) - 中英翻译引擎
- PPTist (端口18085) - 在线 PPT 编辑器
- PPTist AI 后端 (端口18086) - 对接 deepseek-v3 生成大纲/PPT/写作
- Excalidraw AI 代理 (端口18082) - 对接 deepseek-v3 生成 Mermaid 图

其他:
- 智能场景仅保留"选题推荐"
- vite 代理配置增加 /pdf/ 和 /draw/ 路由

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-08 17:24:51 +08:00
parent e1e5d4f30d
commit 108022cebd
26 changed files with 901 additions and 469 deletions

View File

@@ -0,0 +1,41 @@
# PPTist 构建 & 部署
FROM docker.1ms.run/node:20 AS builder
ENV http_proxy=http://219.234.197.247:53128
ENV https_proxy=http://219.234.197.247:53128
ENV no_proxy=localhost,127.0.0.1,10.0.0.0/8,192.168.0.0/16,172.17.0.0/16
WORKDIR /app
COPY PPTist/package*.json ./
RUN npm config set registry https://registry.npmmirror.com && npm install
COPY PPTist/ .
# 修改 SERVER_URL: 生产环境使用相对路径 /pptapi由 nginx 反代到 AI 后端
RUN sed -i "s|'https://server.pptist.cn'|'/pptapi'|g" src/services/index.ts
# 修改模型选项为 deepseek-v3
RUN sed -i "s/glm-4\.7-flash/deepseek-v3/g" src/views/Editor/AIPPTDialog.vue && \
sed -i "s/GLM-4\.7-Flash/DeepSeek-V3/g" src/views/Editor/AIPPTDialog.vue && \
sed -i "s/doubao-seed-1\.6-flash/deepseek-v3/g" src/views/Editor/AIPPTDialog.vue && \
sed -i "s/Doubao-Seed-1\.6-Flash/DeepSeek-V3/g" src/views/Editor/AIPPTDialog.vue && \
sed -i "s/GLM-4\.5-Flash/DeepSeek-V3/g" src/services/index.ts
RUN npm run build
# 生产阶段
FROM docker.1ms.run/nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html
RUN echo 'server { \
listen 80; \
root /usr/share/nginx/html; \
index index.html; \
location / { \
try_files $uri $uri/ /index.html; \
} \
location /pptapi/ { \
proxy_pass http://172.17.0.1:18086/; \
proxy_http_version 1.1; \
proxy_set_header Connection ""; \
proxy_buffering off; \
proxy_cache off; \
} \
}' > /etc/nginx/conf.d/default.conf
EXPOSE 80

View File

@@ -0,0 +1,41 @@
#!/bin/bash
# 一键部署三个工具: TrWebOCR, LibreTranslate, PPTist + AI后端
set -e
echo "========== 1. 部署 TrWebOCR (端口 18083) =========="
docker rm -f trwebocr 2>/dev/null || true
docker run -d --name trwebocr --restart always -p 18083:8089 mmmz/trwebocr:latest
echo "TrWebOCR 启动完成"
echo "========== 2. 部署 LibreTranslate (端口 18084) =========="
docker rm -f libretranslate 2>/dev/null || true
docker run -d --name libretranslate --restart always \
-p 18084:5000 \
-e LT_LOAD_ONLY=en,zh \
-v lt-data:/home/libretranslate/.local \
libretranslate/libretranslate
echo "LibreTranslate 启动完成语言模型下载中约5分钟后可用"
echo "========== 3. 启动 PPTist AI 后端 (端口 18086) =========="
# 先安装依赖
pip install fastapi uvicorn httpx 2>/dev/null || pip3 install fastapi uvicorn httpx
# 杀掉旧进程
pkill -f "pptist-ai-backend" 2>/dev/null || true
sleep 1
# 用 screen 启动后台运行
screen -dmS pptist-ai python3 /root/gangyan/scripts/pptist-ai-backend.py
echo "PPTist AI 后端启动完成"
echo "========== 4. 构建并部署 PPTist (端口 18085) =========="
cd /root/gangyan/scripts/pptist-deploy
docker rm -f pptist 2>/dev/null || true
docker build -t pptist:latest .
docker run -d --name pptist --restart always -p 18085:80 pptist:latest
echo "PPTist 启动完成"
echo ""
echo "========== 部署完成 =========="
echo "TrWebOCR: http://localhost:18083"
echo "LibreTranslate: http://localhost:18084"
echo "PPTist: http://localhost:18085"
echo "PPTist AI后端: http://localhost:18086"