diff --git a/server/app/common/service/chat/PrivateChatService.php b/server/app/common/service/chat/PrivateChatService.php index d0ccdea..eb0c337 100644 --- a/server/app/common/service/chat/PrivateChatService.php +++ b/server/app/common/service/chat/PrivateChatService.php @@ -12,7 +12,7 @@ class PrivateChatService { public const MESSAGE_TYPE_TEXT = PrivateChatMessage::TYPE_TEXT; public const MESSAGE_TYPE_IMAGE = PrivateChatMessage::TYPE_IMAGE; - public const RELATIONSHIP_NOT_MUTUAL_TEXT = '对方还未添加你为好友'; + public const RELATIONSHIP_NOT_MUTUAL_TEXT = '对方未添加好友'; public static function open(int $userId, int $targetUserId, bool $requireFollow = true): array { diff --git a/业务进度管理.md b/业务进度管理.md index 21c75b0..05a138a 100644 --- a/业务进度管理.md +++ b/业务进度管理.md @@ -13,6 +13,20 @@ ## 一、已完成事项 +### 45. AI助手请求失败提示补充真实错误 + +- 状态:已完成 - 时间:2026-06-11 + +完成内容: +- 排查用户端显示“AI助手请求失败,请稍后重试。”,确认该文案来自 `ai_assistant.vue` 的前端 catch 兜底;测试服 `/api/assistant/chat` 直接请求当前可返回 `code=1`。 +- 补充 AI 助手前端错误解析,优先展示后端 `msg`、请求 `errMsg`、异常 `message`,并针对 timeout、abort、network/request:fail 给出更明确提示。 +- catch 中增加 `[ai_assistant] chat failed` 控制台日志,便于后续复现时直接定位是网络层、请求取消、超时还是后端返回失败。 +- 已执行 `npm run build:h5`,H5 构建通过并复制到 `server/public/mobile`。 + +涉及模块: +- `uniapp/src/pages/ai_assistant/ai_assistant.vue` +- `server/public/mobile` + ### 44. uniapp 启动缺失 sourcemap 修复 - 状态:已完成 - 时间:2026-06-11