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 } } })