feat(WechatFriends): 添加搜索功能并优化联系人列表展示

- 新增搜索联系人及群组功能,支持本地数据库查询
- 添加无搜索结果时的提示样式
- 优化联系人列表渲染逻辑,区分搜索模式和分组模式
- 统一联系人项展示样式,支持群组标识
This commit is contained in:
2025-09-02 17:40:11 +08:00
parent b08086e3f5
commit 92e9b69348

View File

@@ -150,7 +150,10 @@ export const useCkChatStore = createPersistStore<CkChatState>(
const keyword = state.searchKeyword.toLowerCase();
// 从本地数据库查询联系人数据
let allContacts: ContractData[] = await contractService.findAll();
let allContacts: any[] = await contractService.findAll();
// 从本地数据库查询群组数据
let allGroups: any[] = await weChatGroupService.findAll();
// 根据选中的客服筛选联系人
if (state.kfSelected !== 0) {
@@ -159,9 +162,6 @@ export const useCkChatStore = createPersistStore<CkChatState>(
);
}
// 从本地数据库查询群组数据
let allGroups: weChatGroup[] = await weChatGroupService.findAll();
// 根据选中的客服筛选群组
if (state.kfSelected !== 0) {
allGroups = allGroups.filter(