feat(数据库): 添加消息列表数据接口和表

refactor(聊天会话): 根据选中客服过滤会话列表

fix(聊天窗口): 移除重复的未读消息清除逻辑

refactor(侧边栏): 统一联系人点击处理逻辑

chore: 删除无用的数据库测试文件
This commit is contained in:
2025-09-01 10:24:15 +08:00
parent 5437a47e37
commit 64c75772bb
8 changed files with 54 additions and 199 deletions

View File

@@ -57,12 +57,24 @@ export interface NewContactListData {
weChatGroup: weChatGroup[];
}
// 消息列表数据接口
export interface MessageListData extends Omit<ContractData, "id"> {
serverId: number | string; // 服务器ID作为主键
id?: number; // 接口数据的原始ID字段
wechatAccountId: number; // 微信账号ID
chatroomAvatar?: string; // 群头像
chatroomName?: string; // 群名称
chatroomId?: number; // 群ID
[key: string]: any;
}
// 数据库类
class CunkebaoDatabase extends Dexie {
kfUsers!: Table<KfUserWithServerId>;
weChatGroup!: Table<weChatGroupServerId>;
contracts!: Table<ContractWithServerId>;
newContractList!: Table<NewContactListData>;
messageList!: Table<MessageListData>;
constructor() {
super("CunkebaoDatabase");