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

Merge branch 'feat/zl' into 'develop'

save

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