fix(ai-chat): 修复聊天页面键盘弹出时导航栏上移、输入框不可见、间距问题

- 自定义导航栏 position:absolute 固定在顶部,不随键盘上移
- textarea 设置 adjust-position=false,阻止系统上推页面
- 输入框后方加 spacer 垫高层,键盘弹出时将输入框推至键盘上方
- chat-content 根据平台设置不同 top 值(MP:0 / H5:44px)
- 去掉输入框多余的安全区域内边距
- scroll-view 底部 padding 随键盘高度动态调整
This commit is contained in:
2026-05-13 16:01:15 +08:00
parent 39245dfcac
commit 69466f410c
4 changed files with 53 additions and 73 deletions

View File

@@ -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 状态:', {

View File

@@ -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 {