|
@@ -236,6 +236,7 @@ export default {
|
|
|
task_id: this.$route.query.task_id,
|
|
|
// 连麦
|
|
|
connect: false,
|
|
|
+ connectStudent: {},
|
|
|
// 等待接通
|
|
|
callLoading: false,
|
|
|
dialogVisible: false,
|
|
@@ -312,9 +313,9 @@ export default {
|
|
|
}
|
|
|
return '#38d514';
|
|
|
},
|
|
|
- connectStudent() {
|
|
|
- let connect = this.student_list.find(item => item.deal_mode !== 0);
|
|
|
- return connect || {};
|
|
|
+ connectUid() {
|
|
|
+ let connect = this.student_list.find(item => item.connection_status !== 0);
|
|
|
+ return connect ? connect.room_user_id : '';
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -461,6 +462,7 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
this.callLoading = true;
|
|
|
+ this.connectStudent = student;
|
|
|
GetLiveRoomInfo({ task_id: this.task_id })
|
|
|
.then(({ video_mode }) => {
|
|
|
let uid = student.room_user_id;
|
|
@@ -518,25 +520,23 @@ export default {
|
|
|
|
|
|
// 下麦
|
|
|
handsDown() {
|
|
|
+ console.log(this.connectUid);
|
|
|
common.handsDown({
|
|
|
- uid: this.connectStudent.room_user_id,
|
|
|
+ uid: this.connectUid,
|
|
|
success: str => {
|
|
|
if (this.callLoading) {
|
|
|
common.sendPublishMessage({
|
|
|
type: 'handsDown-load',
|
|
|
- uid: this.connectStudent.room_user_id
|
|
|
+ uid: this.connectUid
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- this.dealStudentConnection(
|
|
|
- this.connectStudent.room_user_id,
|
|
|
- 0,
|
|
|
- this.connectStudent.connection_mode
|
|
|
- );
|
|
|
+ this.dealStudentConnection(this.connectUid, 0, this.connectStudent.connection_mode);
|
|
|
|
|
|
this.callLoading = false;
|
|
|
common.updateMcResult('', 0);
|
|
|
this.$message.success('下麦成功');
|
|
|
+ this.connectStudent = {};
|
|
|
},
|
|
|
fail: data => {
|
|
|
this.callLoading = false;
|