环信设置群公告,获取群公告,环信的demo里面没有设置群公告,但集成文档里面有

环信的demo里面没有设置群公告,但集成文档里面有

 写道getsetting页面,也可以在聊天页面显示

// 设置群公告
			updateGroupAnnouncement: function(gongao) { 
				var me = this;
				var options = {
					groupId: this.roomId,
					announcement: this.gongao,
					success: function(resp) {
						console.log(resp)
						// 获取群公告
						me.fetchGroupAnnouncement()
					},
					error: function() {},
				};
				WebIM.conn.updateGroupAnnouncement(options)
			},
			fetchGroupAnnouncement: function() {
				var me = this;
				// 获取群公告
				var options = {
					groupId: this.roomId,
					success: function(resp) {
						console.log(resp)
						me.groupAnn = resp.data.announcement
					},
					error: function() {},
				};
				WebIM.conn.fetchGroupAnnouncement(options)
			},

猜你喜欢

转载自blog.csdn.net/qq_59175937/article/details/129671947