AIA V2.0 Major Updates: - Add StreamingService with OpenAI Compatible format (backend/common/streaming) - Upgrade Chat component V2 with Ant Design X deep integration - Implement 12 intelligent agents (5 phases: topic/design/review/data/writing) - Create AgentHub with 100% prototype V11 restoration - Create ChatWorkspace with fullscreen immersive experience - Add ThinkingBlock for deep thinking display - Add useAIStream Hook for stream handling - Add ConversationList for conversation management Backend (~1300 lines): - common/streaming: OpenAI adapter and streaming service - modules/aia: 12 agents config, conversation service, attachment service - Unified API routes to /api/v1 (RVW, PKB, AIA modules) - Update authentication and permission helpers Frontend (~3500 lines): - modules/aia: AgentHub + ChatWorkspace + AgentCard components - shared/Chat: AIStreamChat, ThinkingBlock, useAIStream, useConversations - Update all modules API endpoints to v1 - Modern design with theme colors (blue/yellow/teal/purple) Documentation (~2500 lines): - AIA module status and development guide - Universal capabilities catalog (11 services) - Quick reference card - System overview updates - All module documentation synchronization Other Updates: - DC Tool C: Python operations and frontend components - IIT Manager: session memory and wechat service - PKB/RVW/ASL: API route updates - Docker configs and deployment scripts - Database migrations and scripts - Test files and documentation Tested: AIA streaming verified, authentication working, core features functional Status: AIA V2.0 completed (85%), all changes synchronized
2.9 KiB
2.9 KiB
部署微信服务号到SAE(快速指南)
🎯 目标
将微信服务号回调服务部署到SAE生产环境,使用域名:iit.xunzhengyixue.com
📋 Step 1: 确认环境变量配置
编辑 backend/.env,确认以下配置存在:
# 微信服务号配置
WECHAT_MP_APP_ID=wx062568ff49e4570c
WECHAT_MP_APP_SECRET=c0d19435d1a1e948939c16d767ec0faf
WECHAT_MP_TOKEN=IitPatientWechat2026JanToken
WECHAT_MP_ENCODING_AES_KEY=VIzwMGRG4Ll8Sd7fPxPXLlBaWdsh2rK2qIGpyaEoc1v
📋 Step 2: 在SAE控制台配置环境变量
- 登录阿里云SAE控制台
- 进入应用管理 → 选择应用
- 配置管理 → 环境变量
- 添加以下环境变量:
WECHAT_MP_APP_ID=wx062568ff49e4570c
WECHAT_MP_APP_SECRET=c0d19435d1a1e948939c16d767ec0faf
WECHAT_MP_TOKEN=IitPatientWechat2026JanToken
WECHAT_MP_ENCODING_AES_KEY=VIzwMGRG4Ll8Sd7fPxPXLlBaWdsh2rK2qIGpyaEoc1v
- 保存配置
📋 Step 3: 部署代码到SAE
cd D:\MyCursor\AIclinicalresearch\backend
.\deploy-to-sae.ps1
等待部署完成(约5-10分钟)
📋 Step 4: 验证部署
访问以下URL,确认服务正常:
https://iit.xunzhengyixue.com/api/v1/iit/health
期望返回:
{
"status": "ok",
"module": "iit-manager",
"version": "1.1.0"
}
📋 Step 5: 配置微信公众平台
- 登录微信公众平台:https://mp.weixin.qq.com/
- 进入:设置与开发 → 基本配置 → 服务器配置
- 点击"修改配置"
- 填写以下信息:
| 配置项 | 值 |
|---|---|
| URL | https://iit.xunzhengyixue.com/wechat/patient/callback |
| Token | IitPatientWechat2026JanToken |
| EncodingAESKey | VIzwMGRG4Ll8Sd7fPxPXLlBaWdsh2rK2qIGpyaEoc1v |
| 消息加解密方式 | 安全模式(推荐) |
| 数据格式 | XML |
- 点击"提交"
- 验证成功后点击"启用"
✅ 验证成功标志
配置阶段:
- ✅ 页面显示"配置成功"
- ✅ 服务器配置状态为"已启用"
测试阶段:
- 关注公众号:AI for 临床研究
- 查看SAE日志,应该看到:
📥 收到微信服务号回调消息
🔐 检测到加密消息,开始解密...
✅ 消息解密成功
👤 用户关注公众号
🔧 如何查看SAE日志
- 登录阿里云SAE控制台
- 应用管理 → 选择应用 → 实例管理
- 点击"日志" → "实时日志"
- 查看最近的日志输出
📝 优势
使用生产环境的优势:
- ✅ 域名
iit.xunzhengyixue.com已备案 - ✅ HTTPS证书已配置
- ✅ 已在企业微信中验证过
- ✅ 无需natapp内网穿透
- ✅ 稳定性更好
- ✅ 无需配置域名验证
⏱️ 预计用时
- 配置环境变量:2分钟
- 部署到SAE:5-10分钟
- 配置微信公众平台:3分钟
- 总计:10-15分钟
立即开始部署! 🚀