xbx #307
@ -128,6 +128,8 @@
 | 
			
		||||
			this.friend = JSON.parse(options.id);
 | 
			
		||||
			this.currentUser = this.imService.currentUser;
 | 
			
		||||
			let privateMessages = this.imService.getPrivateMessages(this.friend.uuid);
 | 
			
		||||
			this.imService.uid = this.friend.uuid;
 | 
			
		||||
 | 
			
		||||
			this.messages = privateMessages.sentMessages;
 | 
			
		||||
			this.pendingMessages = privateMessages.pendingMessages;
 | 
			
		||||
 | 
			
		||||
@ -153,6 +155,7 @@
 | 
			
		||||
			this.imService.onPrivateHistoryLoad = (friendId, messages) =>{};
 | 
			
		||||
			//将未读消息数清零
 | 
			
		||||
			this.imService.resetFriendUnReadMessage(this.friend);
 | 
			
		||||
			this.imService.uid = 0;
 | 
			
		||||
		},
 | 
			
		||||
		methods: {
 | 
			
		||||
			bindtapInput(){
 | 
			
		||||
 | 
			
		||||
@ -262,7 +262,8 @@
 | 
			
		||||
                    loading: '努力加载中',
 | 
			
		||||
                    nomore: '实在没有了'
 | 
			
		||||
				},
 | 
			
		||||
				refresher:true
 | 
			
		||||
				refresher:true,
 | 
			
		||||
				zqie:false
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		components: {
 | 
			
		||||
@ -355,6 +356,10 @@
 | 
			
		||||
				uni.showLoading({
 | 
			
		||||
                    title: "loading..."
 | 
			
		||||
				})
 | 
			
		||||
				if(this.zqie){
 | 
			
		||||
					return ;
 | 
			
		||||
				}
 | 
			
		||||
				this.zqie = true;
 | 
			
		||||
				this.$u.api.tabLiveList({page:this.live_page}).then((res) => {
 | 
			
		||||
					 // uni.stopPullDownRefresh();
 | 
			
		||||
					this.status_live = "loading";
 | 
			
		||||
@ -371,6 +376,7 @@
 | 
			
		||||
                        } else if (res.data.data.length == 0 && this.live_page > 1) {
 | 
			
		||||
                            this.status_live = "nomore";
 | 
			
		||||
                        } else {
 | 
			
		||||
							console.log(this.live_page,1223)
 | 
			
		||||
							this.tabLiveLists  = this.tabLiveLists.concat(res.data.data);
 | 
			
		||||
							console.log(this.tabLiveLists)
 | 
			
		||||
                        }
 | 
			
		||||
@ -381,6 +387,8 @@
 | 
			
		||||
                    } else {
 | 
			
		||||
                        this.status_live = "nomore"
 | 
			
		||||
					}
 | 
			
		||||
					this.zqie = false;
 | 
			
		||||
 | 
			
		||||
					
 | 
			
		||||
				})
 | 
			
		||||
			},
 | 
			
		||||
 | 
			
		||||
@ -29,7 +29,7 @@
 | 
			
		||||
    <!-- <image class="liketap" src="../../static/like.png" @click=""> -->
 | 
			
		||||
 | 
			
		||||
    <view class="danmuinputbox" v-if="danmu">
 | 
			
		||||
      <input type="text" focus="true" style="width:600rpx;margin-left:30rpx;font-size:26rpx" maxlength="20" @blur="danmu=false" :focus="danmu" v-model="danmutext">
 | 
			
		||||
      <input type="text" focus="true" style="width:600rpx;margin-left:30rpx;font-size:26rpx" maxlength="100" @blur="danmu=false" :focus="danmu" v-model="danmutext">
 | 
			
		||||
      <view class="danmufasong" @click="sendMessage(room.MessageType.CHAT,danmutext)">
 | 
			
		||||
        <text style="font-size:24rpx;color:#fff">发送</text>
 | 
			
		||||
      </view>
 | 
			
		||||
 | 
			
		||||
@ -8,6 +8,8 @@
 | 
			
		||||
import GoEasyIM from './goeasy-im-1.0.9';
 | 
			
		||||
// import GoEasyIM from './goeasy-im-1.1.1';
 | 
			
		||||
import restApi from './restapi';
 | 
			
		||||
import music from './music.mp3'
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
function Friend(uuid, name, avatar,time = "", text = "",date = "",unReadMessage = 0) {
 | 
			
		||||
    this.uuid = uuid;
 | 
			
		||||
@ -53,6 +55,8 @@ function IMService() {
 | 
			
		||||
    //群聊消息记录,map格式,每个群对应一个数组
 | 
			
		||||
    this.groupMessages = {};
 | 
			
		||||
    
 | 
			
		||||
    this.uid = 0;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
     * 监听器们
 | 
			
		||||
     *
 | 
			
		||||
@ -283,6 +287,14 @@ IMService.prototype.initialIMListeners = function () {
 | 
			
		||||
                friends.sort(paixu)
 | 
			
		||||
               
 | 
			
		||||
            }
 | 
			
		||||
            if(message.senderId != this.uid){
 | 
			
		||||
                const innerAudioContext = uni.createInnerAudioContext();
 | 
			
		||||
                innerAudioContext.autoplay = true;
 | 
			
		||||
                innerAudioContext.src = music;
 | 
			
		||||
                innerAudioContext.onPlay(() => {
 | 
			
		||||
                    console.log('开始播放');
 | 
			
		||||
                });
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            let that = this
 | 
			
		||||
            if(!friend && friend == undefined){
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								static/music.mp3
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								static/music.mp3
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user