|
@@ -32,7 +32,7 @@
|
|
|
正在呼叫【{{ connectStudent.student_name }}】,等待对方接通...
|
|
|
</p>
|
|
|
<div>
|
|
|
- <el-button type="danger" circle @click="handsDown('loading')">
|
|
|
+ <el-button type="danger" circle @click="handsDown">
|
|
|
<svg-icon icon-class="hang-up" />
|
|
|
</el-button>
|
|
|
</div>
|
|
@@ -149,8 +149,18 @@
|
|
|
<span class="name">{{ item.student_name }}</span>
|
|
|
</div>
|
|
|
<div class="student-list-right">
|
|
|
- <svg-icon icon-class="video" @click="invite(item, 1)" />
|
|
|
- <svg-icon icon-class="voice" @click="invite(item, 2)" />
|
|
|
+ <svg-icon
|
|
|
+ v-if="item.connection_mode === 1 && item.connection_status !== 0"
|
|
|
+ icon-class="hang-up"
|
|
|
+ @click="handsDown"
|
|
|
+ />
|
|
|
+ <svg-icon v-else icon-class="video" @click="invite(item, 1)" />
|
|
|
+ <svg-icon
|
|
|
+ v-if="item.connection_mode === 2 && item.connection_status !== 0"
|
|
|
+ icon-class="hang-up"
|
|
|
+ @click="handsDown"
|
|
|
+ />
|
|
|
+ <svg-icon v-else icon-class="voice" @click="invite(item, 2)" />
|
|
|
</div>
|
|
|
</li>
|
|
|
</ul>
|
|
@@ -206,7 +216,8 @@ import {
|
|
|
GetLiveRoomInfo,
|
|
|
StudentExitLiveRoom,
|
|
|
StartGroup,
|
|
|
- GetGroupStatus
|
|
|
+ GetGroupStatus,
|
|
|
+ DealStudentConnection
|
|
|
} from '@/api/live';
|
|
|
import { app } from '@/store/mutation-types';
|
|
|
import SelectMaterial from '@/components/live/SelectMaterial.vue';
|
|
@@ -452,14 +463,14 @@ export default {
|
|
|
.then(({ video_mode }) => {
|
|
|
let uid = student.room_user_id;
|
|
|
if (video_mode === mode) {
|
|
|
- this.inviteStudent(uid, student);
|
|
|
+ this.inviteStudent(uid, student, mode);
|
|
|
} else {
|
|
|
common.roomUpdate({
|
|
|
video_mode: mode,
|
|
|
roomUpdateSuccess: data => {
|
|
|
console.log(data, '连麦音视频模式更新请求成功!');
|
|
|
this.roomInfo.video_mode = mode;
|
|
|
- this.inviteStudent(uid, student);
|
|
|
+ this.inviteStudent(uid, student, mode);
|
|
|
},
|
|
|
roomUpdateFailed: data => {
|
|
|
this.callLoading = false;
|
|
@@ -475,11 +486,12 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
|
|
|
- inviteStudent(uid, connectStudent) {
|
|
|
+ inviteStudent(uid, connectStudent, mode) {
|
|
|
common.invite({
|
|
|
uid,
|
|
|
success: str => {
|
|
|
console.log('邀请上麦成功', str);
|
|
|
+ this.dealStudentConnection(uid, 1, mode);
|
|
|
common.sendPublishMessage({
|
|
|
type: 'inviteImage',
|
|
|
connectStudent
|
|
@@ -493,17 +505,29 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
|
|
|
+ dealStudentConnection(room_user_id, deal_mode, connection_mode) {
|
|
|
+ DealStudentConnection({
|
|
|
+ task_id: this.task_id,
|
|
|
+ room_user_id,
|
|
|
+ deal_mode,
|
|
|
+ connection_mode
|
|
|
+ }).then(() => {
|
|
|
+ this.getLiveRoomStudentList();
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
// 下麦
|
|
|
- handsDown(type) {
|
|
|
+ handsDown() {
|
|
|
common.handsDown({
|
|
|
uid: this.connectStudent.room_user_id,
|
|
|
success: str => {
|
|
|
- if (type === 'loading') {
|
|
|
+ if (this.callLoading) {
|
|
|
common.sendPublishMessage({
|
|
|
type: 'handsDown-load',
|
|
|
uid: this.connectStudent.room_user_id
|
|
|
});
|
|
|
}
|
|
|
+ this.dealStudentConnection(this.connectStudent.room_user_id, 0, this.roomInfo.video_mode);
|
|
|
|
|
|
this.callLoading = false;
|
|
|
this.connectStudent = '';
|
|
@@ -937,6 +961,7 @@ $live-bc: #3d3938;
|
|
|
}
|
|
|
|
|
|
&-right {
|
|
|
+ height: 794px;
|
|
|
padding: 8px;
|
|
|
background-color: #2c2c2c;
|
|
|
border-end-end-radius: 8px;
|
|
@@ -988,6 +1013,11 @@ $live-bc: #3d3938;
|
|
|
margin-bottom: 16px;
|
|
|
}
|
|
|
|
|
|
+ ul {
|
|
|
+ height: calc(100% - 18px);
|
|
|
+ overflow: auto;
|
|
|
+ }
|
|
|
+
|
|
|
li {
|
|
|
display: flex;
|
|
|
margin-bottom: 16px;
|