From 69466f410c383a1082960ea274419094c8db23d5 Mon Sep 17 00:00:00 2001 From: ZF sun <34314687@qq.com> Date: Wed, 13 May 2026 16:01:15 +0800 Subject: [PATCH] =?UTF-8?q?fix(ai-chat):=20=E4=BF=AE=E5=A4=8D=E8=81=8A?= =?UTF-8?q?=E5=A4=A9=E9=A1=B5=E9=9D=A2=E9=94=AE=E7=9B=98=E5=BC=B9=E5=87=BA?= =?UTF-8?q?=E6=97=B6=E5=AF=BC=E8=88=AA=E6=A0=8F=E4=B8=8A=E7=A7=BB=E3=80=81?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=A1=86=E4=B8=8D=E5=8F=AF=E8=A7=81=E3=80=81?= =?UTF-8?q?=E9=97=B4=E8=B7=9D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 自定义导航栏 position:absolute 固定在顶部,不随键盘上移 - textarea 设置 adjust-position=false,阻止系统上推页面 - 输入框后方加 spacer 垫高层,键盘弹出时将输入框推至键盘上方 - chat-content 根据平台设置不同 top 值(MP:0 / H5:44px) - 去掉输入框多余的安全区域内边距 - scroll-view 底部 padding 随键盘高度动态调整 --- common/js/ai-service.js | 2 +- common/js/customer-service.js | 8 +-- pages_tool/ai-chat/ai-chat-message.vue | 31 ++++++---- pages_tool/ai-chat/index.vue | 85 +++++++++----------------- 4 files changed, 53 insertions(+), 73 deletions(-) diff --git a/common/js/ai-service.js b/common/js/ai-service.js index c99000c..14923fe 100644 --- a/common/js/ai-service.js +++ b/common/js/ai-service.js @@ -68,7 +68,7 @@ export default { } return result; } catch (error) { - console.error('[AI Service] Dify API请求失败,详细错误:', error); + console.error('[AI Service] AiChat API请求失败,详细错误:', error); console.error('[AI Service] 错误堆栈:', error.stack); // 打印更多信息帮助调试 console.error('[AI Service] store 状态:', { diff --git a/common/js/customer-service.js b/common/js/customer-service.js index 13a2ded..5edbbd1 100644 --- a/common/js/customer-service.js +++ b/common/js/customer-service.js @@ -119,9 +119,9 @@ export class CustomerService { } /** - * 跳转到 AI智能客服页面(Dify) + * 跳转到 AI智能客服页面(AiChat) */ - openDifyService() { + openAiChatService() { try { // 清除未读数(如果存在) if (typeof this.vm.setAiUnreadCount === 'function') { @@ -177,7 +177,7 @@ export class CustomerService { // 核心路由:根据 type 决定行为 switch (config.type) { case 'aikefu': - this.openDifyService(); + this.openAiChatService(); break; case 'wxwork': this.openWxworkService(false, config, options); @@ -364,7 +364,7 @@ export class CustomerService { openAliappService(config) { if (config.type === 'aikefu') { - this.openDifyService(); + this.openAiChatService(); } else if (config.type === 'third') { this.openThirdService(config); } else { diff --git a/pages_tool/ai-chat/ai-chat-message.vue b/pages_tool/ai-chat/ai-chat-message.vue index 16e5ec8..207633e 100644 --- a/pages_tool/ai-chat/ai-chat-message.vue +++ b/pages_tool/ai-chat/ai-chat-message.vue @@ -1,5 +1,5 @@