提交 eb9eba29 编写于 作者: 张磊's avatar 张磊

Merge branch 'feat/zl' into 'develop'

save

See merge request !66
......@@ -38,7 +38,7 @@
</div>
<div class="viedo-btn-wrap" :id="rtc.viewslist[index] ? rtc.viewslist[index].id : ''">
<el-button class="call-btn"
:class="{calling1: item.role == 1 && doctorTrtcEntryStatus== 3, calling2: item.role == 2 && userTrtcEntryStatus== 3}"
:class="{calling1: item.role == 1 && doctorTrtcEntryStatus != 2, calling2: item.role == 2 && userTrtcEntryStatus != 2}"
@click="drivingCall(item)">
{{ item.role == 1 ? showText(doctorTrtcEntryStatus) : showText(userTrtcEntryStatus)}}
</el-button>
......@@ -181,18 +181,18 @@ export default {
},
// 主动呼叫
drivingCall(data) {
if(data.role == 1 && this.doctorTrtcEntryStatus == 3){
if(data.role == 1 && this.doctorTrtcEntryStatus != 2){
return false;
}
if(data.role == 2 && this.userTrtcEntryStatus == 3){
if(data.role == 2 && this.userTrtcEntryStatus != 2){
return false;
}
console.log('--this.roomId', data, this.roomId);
let url = `/im/team/call/direct/`;
let params = {
imAccId: data.accId,
imTeamId: this.currentChat.tid,
liveRoomId: this.roomId
// imTeamId: this.currentChat.tid,
// liveRoomId: this.roomId
};
this.POST(url, params).then((res) => {
if (res.code === "000000") {
......@@ -202,7 +202,6 @@ export default {
message: '呼叫成功',
type: "success",
});
console.log('--data', data);
if(data.role == 1){
this.doctorTrtcEntryStatus = 3;
}
......@@ -224,6 +223,7 @@ export default {
.then((res) => {
if (res.code == "000000") {
let { liveInfo, memberList } = res.data;
console.log('---liveInfo', liveInfo, memberList);
if (liveInfo) {
this.startTime = liveInfo.startTimestamp;
this.endTime = liveInfo.endTimestamp;
......@@ -401,8 +401,15 @@ export default {
if (item.liveUserId == id) {
item.status = 2;
this.setTime(item.role);
if(item.role == 1){
this.doctorTrtcEntryStatus = 1;
}
if(item.role == 2){
this.userTrtcEntryStatus = 1;
}
}
});
console.log('---this.addNewMember', this.memberList, id);
},
// 用户下线
removeMember(id) {
......@@ -411,6 +418,7 @@ export default {
item.status = 3;
}
});
console.log('---this.removeMember', this.memberList, id);
},
//设置进行时长 1表示为问诊 2为接诊 3为问诊开始 4为问诊结束
setTime(flag) {
......
......@@ -54,7 +54,7 @@ class RtcClient {
userId: this.userId_,
mirror: true
});
// this.startRTC()
this.startRTC()
} catch (e) {
console.error('加入房间失败 ' + e);
this.vueInstance.reloadfn()
......@@ -198,6 +198,8 @@ class RtcClient {
//对于本地流,调用该方法会触发远端 Client.on('unmute-audio') 事件。
//音频轨道默认是开启的,若你调用 muteAudio() 后可用该方法重新启用音频。
unmuteLocalAudio() {
const a = this.localStream_.getAudioTrack();
console.log('---a',a);
this.localStream_.unmuteAudio();
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册