|
@@ -111,7 +111,10 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
task_id: this.$route.query.task_id,
|
|
|
- room_user_id: this.$route.query.live_room_sys_user_id,
|
|
|
+ room_user_id: '',
|
|
|
+ session_id: '',
|
|
|
+ live_room_sys_user_id: '',
|
|
|
+ room_id: '',
|
|
|
// 定时器
|
|
|
timer: null,
|
|
|
rtc: null,
|
|
@@ -159,11 +162,10 @@ export default {
|
|
|
common.createScript(
|
|
|
'https://class.csslcloud.net/static/SDK/docSDK/drawSdk_3.0.js'
|
|
|
).onload = () => {
|
|
|
- const { live_room_sys_user_id, room_id, sessionid } = this.$route.query;
|
|
|
this.rtc = common.initSDK({
|
|
|
- userid: live_room_sys_user_id,
|
|
|
- roomid: room_id,
|
|
|
- sessionid
|
|
|
+ userid: this.live_room_sys_user_id,
|
|
|
+ roomid: this.room_id,
|
|
|
+ sessionid: this.session_id
|
|
|
});
|
|
|
common.initListener(this); // 注册监听事件
|
|
|
this.getLiveStat();
|
|
@@ -184,7 +186,6 @@ export default {
|
|
|
this.getMyGroupInfo_Student();
|
|
|
},
|
|
|
mounted() {
|
|
|
- common.downloadWebSDK(this);
|
|
|
this.GetGroupStatus();
|
|
|
},
|
|
|
beforeDestroy() {
|
|
@@ -290,8 +291,15 @@ export default {
|
|
|
getMyGroupInfo_Student() {
|
|
|
GetMyGroupInfo_Student({
|
|
|
task_id: this.task_id
|
|
|
- }).then(({ student_list }) => {
|
|
|
+ }).then(({ live_room_sys_user_id, room_id, student_list }) => {
|
|
|
+ let data = student_list.find(el => {
|
|
|
+ return el.is_self === 'true';
|
|
|
+ });
|
|
|
+ this.session_id = data.session_id;
|
|
|
+ this.live_room_sys_user_id = live_room_sys_user_id;
|
|
|
+ this.room_id = room_id;
|
|
|
this.student_list = student_list;
|
|
|
+ common.downloadWebSDK(this);
|
|
|
});
|
|
|
}
|
|
|
}
|