添加 刷新通讯录功能,用于解决冗余数据问题。
This commit is contained in:
@@ -566,6 +566,21 @@
|
||||
this.$message.error('加载联系人头像数据失败');
|
||||
});
|
||||
},
|
||||
updateContacts() {
|
||||
this.$message.info('正在更新通讯录...');
|
||||
axios.post('/contacts/api/contacts/update')
|
||||
.then(res => {
|
||||
if (res.data.success) {
|
||||
this.$message.success('通讯录更新成功!');
|
||||
this.refreshContacts();
|
||||
} else {
|
||||
this.$message.error(res.data.message || '通讯录更新失败');
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.$message.error('通讯录更新请求失败');
|
||||
});
|
||||
},
|
||||
refreshContacts() {
|
||||
this.loadContactsData();
|
||||
this.$message.success('联系人数据已刷新');
|
||||
@@ -639,21 +654,6 @@
|
||||
this.groupMembersCurrentPage = page;
|
||||
}
|
||||
},
|
||||
updateContacts() {
|
||||
this.$message.info('正在更新通讯录...');
|
||||
axios.post('/api/contacts/update')
|
||||
.then(res => {
|
||||
if (res.data.success) {
|
||||
this.$message.success('通讯录更新成功!');
|
||||
this.refreshContacts();
|
||||
} else {
|
||||
this.$message.error(res.data.message || '通讯录更新失败');
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.$message.error('通讯录更新请求失败');
|
||||
});
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user