Merge pull request '添加了提示' (#317) from xbx into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/317
This commit is contained in:
		
						commit
						8ed1ae0020
					
				@ -428,6 +428,7 @@ export default {
 | 
				
			|||||||
    that.room = that.chatRoomService.room;
 | 
					    that.room = that.chatRoomService.room;
 | 
				
			||||||
    that.chatRoomService.initialWhenOnlineUserChange(that.newpeople)
 | 
					    that.chatRoomService.initialWhenOnlineUserChange(that.newpeople)
 | 
				
			||||||
    that.chatRoomService.initialWhenNewMessage(that.whenNewMessage);
 | 
					    that.chatRoomService.initialWhenNewMessage(that.whenNewMessage);
 | 
				
			||||||
 | 
					    that.chatRoomService.jieshuzhibo = this.jieshu;
 | 
				
			||||||
    this.$forceUpdate();
 | 
					    this.$forceUpdate();
 | 
				
			||||||
    console.log(that.room)
 | 
					    console.log(that.room)
 | 
				
			||||||
     
 | 
					     
 | 
				
			||||||
@ -440,6 +441,19 @@ export default {
 | 
				
			|||||||
			this.chatRoomService.quitRoom();
 | 
								this.chatRoomService.quitRoom();
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
  methods:{
 | 
					  methods:{
 | 
				
			||||||
 | 
					    jieshu(text){
 | 
				
			||||||
 | 
					      console.log(text)
 | 
				
			||||||
 | 
					      uni.showModal({
 | 
				
			||||||
 | 
					          title: '提示',
 | 
				
			||||||
 | 
					          content: text.content,
 | 
				
			||||||
 | 
					          showCancel:false,
 | 
				
			||||||
 | 
					          success: function (res) {
 | 
				
			||||||
 | 
					              uni.navigateBack({
 | 
				
			||||||
 | 
					                  delta: 1
 | 
				
			||||||
 | 
					              });
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    errors(a){
 | 
					    errors(a){
 | 
				
			||||||
      console.log(a)
 | 
					      console.log(a)
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
				
			|||||||
@ -77,6 +77,8 @@ function IMService() {
 | 
				
			|||||||
    //群列表发生改变
 | 
					    //群列表发生改变
 | 
				
			||||||
    this.onGroupListChange = function (groups) {};
 | 
					    this.onGroupListChange = function (groups) {};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    //结束直播
 | 
				
			||||||
 | 
					    this.jieshuzhibo = function(messages){}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    this.whenNewMessage = function () {
 | 
					    this.whenNewMessage = function () {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -785,6 +787,11 @@ IMService.prototype.initialWhenOnlineUserChange = function (whenOnlineUserChange
 | 
				
			|||||||
IMService.prototype.listenerNewMessage = function () {
 | 
					IMService.prototype.listenerNewMessage = function () {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    this.im.on(GoEasyIM.EVENT.GROUP_MESSAGE_RECEIVED, (message) => {
 | 
					    this.im.on(GoEasyIM.EVENT.GROUP_MESSAGE_RECEIVED, (message) => {
 | 
				
			||||||
 | 
					        console.log(message)
 | 
				
			||||||
 | 
					        if(message.senderId == 0){
 | 
				
			||||||
 | 
					            this.jieshuzhibo(JSON.parse(message.payload.text));
 | 
				
			||||||
 | 
					            return;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
		var content = JSON.parse(message.payload.text);
 | 
							var content = JSON.parse(message.payload.text);
 | 
				
			||||||
        this.addNewMessage(message);
 | 
					        this.addNewMessage(message);
 | 
				
			||||||
        this.whenNewMessage(content);
 | 
					        this.whenNewMessage(content);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user