From 155d59a6a34dc2710abfde63101e361ab7e0372e Mon Sep 17 00:00:00 2001 From: Jason Date: Thu, 17 Feb 2022 11:22:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E7=BE=A4=E7=BB=84=E7=9A=84?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/im/components/groupUserList.vue | 8 ++++++-- pages/im/group/index.vue | 7 ++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/pages/im/components/groupUserList.vue b/pages/im/components/groupUserList.vue index ad222ad..20d07e2 100644 --- a/pages/im/components/groupUserList.vue +++ b/pages/im/components/groupUserList.vue @@ -74,7 +74,12 @@ }, mounted() { this.initGroupInfo() - this.initUsers() + getGroupUsers(this.targetId, this.count).then(res => { + this.users = res + res.map(item => { + this.$store.dispatch('updateContact', item) + }) + }) }, methods: { initGroupInfo() { @@ -88,7 +93,6 @@ initUsers() { getGroupUsers(this.targetId, this.count).then(res => { this.users = res - console.log('群成员列表', res); }) }, hideAction(item) { diff --git a/pages/im/group/index.vue b/pages/im/group/index.vue index caf00ab..97bbad8 100644 --- a/pages/im/group/index.vue +++ b/pages/im/group/index.vue @@ -63,13 +63,14 @@ uni.showToast({ title: '创建成功' }) - this.initData() - this.onHideModal() }).catch(err => { uni.showToast({ icon: 'none', - title: err + title: err.message }) + }).finally(() => { + this.initData() + this.onHideModal() }) }, toGroup(targetId) {