# 京东服务端 **Repository Path**: test-zf01/jd-server ## Basic Information - **Project Name**: 京东服务端 - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-06-30 - **Last Updated**: 2026-06-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README 京东账号管理服务端 === 启动 === 1. 安装依赖: pip install -r requirements.txt 2. 启动服务: python server.py 默认监听 0.0.0.0:7999,可通过环境变量修改: set PORT=9000 python server.py === API 接口 === POST /api/accounts 上传账号(上号工具调用) Body: {"phone": "...", "parent": "...", "remark": "...", "cookies": [...], "user_agent": "..."} GET /api/accounts 列出所有账号(不含 cookies) GET /api/accounts/ 查询单个账号详情 DELETE /api/accounts/ 删除账号 GET /api/accounts/export 导出账号为发布脚本兼容格式(含 cookies) GET /api/health 健康检查 === 数据存储 === SQLite 数据库:accounts.db(自动创建) - 表 accounts:phone (主键), parent, remark, cookies (JSON), user_agent, login_time, updated_at === 部署到服务器 === 1. 把整个"服务端"文件夹上传到服务器 2. 服务器装 Python 3.8+ 和 pip 3. pip install -r requirements.txt 4. python server.py 5. 用 nginx 反向代理 + HTTPS 更安全(可选) 生产环境建议用 gunicorn: pip install gunicorn gunicorn -w 4 -b 0.0.0.0:7999 server:app