feat(ckbox): 重构微信联系人分组逻辑并优化数据库操作

- 在ContactGroupByLabel和weChatGroup接口中添加count和labels字段
- 将weChatGroup重命名为weChatGroupServerId以更准确描述用途
- 修改数据库操作,使用service直接处理数据存储
- 重构createContractList函数,根据groupType查询不同服务获取数据
- 移除VerticalUserList中不必要的异步获取逻辑,直接使用store数据
This commit is contained in:
2025-08-30 17:02:31 +08:00
parent 14f0a6d7f3
commit 0975995486
7 changed files with 62 additions and 35 deletions

View File

@@ -38,7 +38,7 @@ export interface KfUserWithServerId extends Omit<KfUserListData, "id"> {
id?: number; // 接口数据的原始ID字段
}
export interface GroupWithServerId extends Omit<weChatGroup, "id"> {
export interface weChatGroupServerId extends Omit<weChatGroup, "id"> {
serverId: number | string; // 服务器ID作为主键
id?: number; // 接口数据的原始ID字段
}
@@ -60,7 +60,7 @@ export interface NewContactListData {
// 数据库类
class CunkebaoDatabase extends Dexie {
kfUsers!: Table<KfUserWithServerId>;
weChatGroup!: Table<GroupWithServerId>;
weChatGroup!: Table<weChatGroupServerId>;
contracts!: Table<ContractWithServerId>;
newContractList!: Table<NewContactListData>;