From 3383015d8c40890a1509e7fa502bf05845e4e189 Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Sat, 28 Feb 2026 15:13:43 +0800
Subject: [PATCH] feat:来电人昵称
---
uniapps/work-app/src/store/modules/app/index.js | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/uniapps/work-app/src/store/modules/app/index.js b/uniapps/work-app/src/store/modules/app/index.js
index b77db8d..73b8750 100644
--- a/uniapps/work-app/src/store/modules/app/index.js
+++ b/uniapps/work-app/src/store/modules/app/index.js
@@ -10,8 +10,12 @@
theme: storage.get(THEME_KEY) || 'light',
deviceUpdateKey: 0, //设备刷新key
jobUpdateKey: 0, //任务刷新key
+ contactList: [], // 通讯录列表,用于快速查找联系人信息
}),
getters: {
+ getContactByUserId: (state) => (userId) => {
+ return state.contactList.find(contact => String(contact.userId) === String(userId))
+ },
getSystemInfo (state) {
return state.systemInfo
},
@@ -74,6 +78,13 @@
icon: 'error'
})
})
+ },
+ /**
+ * 更新通讯录列表
+ * @param {Array} contacts 通讯录列表
+ */
+ updateContactList (contacts) {
+ this.contactList = contacts
}
}
})
--
Gitblit v1.9.3