视频 聊天
This commit is contained in:
parent
5c9cbb4cc2
commit
6dd041e762
|
@ -280,11 +280,11 @@
|
||||||
that.connecting = false
|
that.connecting = false
|
||||||
that.connected = false
|
that.connected = false
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
|
console.log('onError', err);
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
content: '网络较差,请稍后再试',
|
content: '网络较差,请稍后再试',
|
||||||
showCancel: false
|
showCancel: false
|
||||||
})
|
})
|
||||||
console.log('onError', err);
|
|
||||||
});
|
});
|
||||||
uni.onSocketMessage(function (res) {
|
uni.onSocketMessage(function (res) {
|
||||||
console.log('收到服务器内容:' + JSON.stringify(res));
|
console.log('收到服务器内容:' + JSON.stringify(res));
|
||||||
|
@ -345,10 +345,10 @@
|
||||||
this.$queue.showToast('请输入聊天内容');
|
this.$queue.showToast('请输入聊天内容');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.chatId == '' || this.chatId == undefined) {
|
// if (this.chatId == '' || this.chatId == undefined) {
|
||||||
this.$queue.showToast('网络较差,请稍后再试');
|
// this.$queue.showToast('网络较差,请稍后再试');
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
let userId = this.$queue.getData('userId');
|
let userId = this.$queue.getData('userId');
|
||||||
let avatar = this.$queue.getData('avatar');
|
let avatar = this.$queue.getData('avatar');
|
||||||
let phone = this.$queue.getData('phone');
|
let phone = this.$queue.getData('phone');
|
||||||
|
|
|
@ -244,14 +244,13 @@
|
||||||
}
|
}
|
||||||
},200)
|
},200)
|
||||||
} else {
|
} else {
|
||||||
console.log(88)
|
|
||||||
audo.pause()
|
audo.pause()
|
||||||
this.dataList[k].state = 'pause'
|
this.dataList[k].state = 'pause'
|
||||||
uni.createVideoContext(this.dataList[k].id+''+k,this).seek(0)
|
uni.createVideoContext(this.dataList[k].id+''+k,this).seek(0)
|
||||||
uni.createVideoContext(this.dataList[k].id+''+k,this).pause()
|
uni.createVideoContext(this.dataList[k].id+''+k,this).pause()
|
||||||
}
|
}
|
||||||
var p = k+1;
|
// var p = k+1;
|
||||||
console.log('预加载第' + (p + 1) + '个视频:' + this.dataList[p].id+''+p)
|
// console.log('预加载第' + (k) + '个视频:' + this.dataList[k].id+''+p)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
@ -270,17 +269,14 @@
|
||||||
},
|
},
|
||||||
onShow(){
|
onShow(){
|
||||||
console.log('回到前台');
|
console.log('回到前台');
|
||||||
if(this.dataList.length !== 0){
|
|
||||||
if(this.isClick){
|
if(this.isClick){
|
||||||
this.dataList[this.k].state = 'pause';
|
this.dataList[this.k].state = 'pause';
|
||||||
uni.createVideoContext(this.dataList[this.k].id+''+this.k,this).pause()
|
uni.createVideoContext(this.dataList[this.k].id+''+this.k,this).pause()
|
||||||
audo.pause()
|
audo.pause()
|
||||||
|
|
||||||
// this.dataList[this.k].state = 'play';
|
// this.dataList[this.k].state = 'play';
|
||||||
// uni.createVideoContext(this.dataList[this.k].id+''+this.k,this).play()
|
// uni.createVideoContext(this.dataList[this.k].id+''+this.k,this).play()
|
||||||
// audo.play()
|
// audo.play()
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
onHide(){
|
onHide(){
|
||||||
if(this.isClick){
|
if(this.isClick){
|
||||||
|
|
Loading…
Reference in New Issue