dusenyao 4 years ago
parent
commit
4fb3f8261b

+ 3 - 3
src/api/live.js

@@ -167,11 +167,11 @@ export function StartGroup(data) {
 }
 
 /**
- * 是否开启分组讨论
+ * 得到分组状态
  * @param {Object} data {task_id 任务ID}
  */
-export function IsEnableGroup(data) {
-  let params = getRequestParams('live_room-live_room_dispatch-IsEnableGroup');
+export function GetGroupStatus(data) {
+  let params = getRequestParams('live_room-live_room_dispatch-GetGroupStatus');
 
   return request({
     method: 'post',

+ 4 - 4
src/views/live/student/group.vue

@@ -101,7 +101,7 @@
 import {
   StudentExitLiveRoom,
   GetLiveRoomInfo,
-  IsEnableGroup,
+  GetGroupStatus,
   GetMyGroupInfo_Student,
   CreateEnterLiveRoomSession
 } from '@/api/live';
@@ -185,7 +185,7 @@ export default {
   },
   mounted() {
     common.downloadWebSDK(this);
-    this.isEnableGroup();
+    this.GetGroupStatus();
   },
   beforeDestroy() {
     clearInterval(this.timer);
@@ -251,9 +251,9 @@ export default {
     },
 
     // 分组讨论
-    isEnableGroup() {
+    GetGroupStatus() {
       this.timer = setInterval(() => {
-        IsEnableGroup({ task_id: this.task_id })
+        GetGroupStatus({ task_id: this.task_id })
           .then(({ is_enable_group }) => {
             if (is_enable_group === 'false') {
               clearInterval(this.timer);

+ 4 - 4
src/views/live/student/index.vue

@@ -133,7 +133,7 @@ import {
   StudentExitLiveRoom,
   GetCurMaterialSent,
   GetLiveRoomInfo,
-  IsEnableGroup,
+  GetGroupStatus,
   GetMyGroupInfo_Student
 } from '@/api/live';
 import CurMaterial from '@/components/live/CurMaterial.vue';
@@ -238,7 +238,7 @@ export default {
   mounted() {
     this.getCurMaterialSent();
     this.getLiveRoomStudentListPolling();
-    this.isEnableGroup();
+    this.GetGroupStatus();
   },
   beforeDestroy() {
     // 清除所有定时器
@@ -351,9 +351,9 @@ export default {
     },
 
     // 分组讨论
-    isEnableGroup() {
+    GetGroupStatus() {
       this.timer_group = setInterval(() => {
-        IsEnableGroup({ task_id: this.task_id })
+        GetGroupStatus({ task_id: this.task_id })
           .then(({ is_enable_group }) => {
             if (is_enable_group === 'true') {
               clearInterval(this.timer_group);

+ 2 - 2
src/views/live/teacher/index.vue

@@ -196,7 +196,7 @@ import {
   GetLiveRoomInfo,
   StudentExitLiveRoom,
   StartGroup,
-  IsEnableGroup
+  GetGroupStatus
 } from '@/api/live';
 import SelectMaterial from '@/components/live/SelectMaterial.vue';
 import CompleteList from './CompleteList.vue';
@@ -284,7 +284,7 @@ export default {
     }
   },
   created() {
-    IsEnableGroup({ task_id: this.task_id }).then(({ is_enable_group }) => {
+    GetGroupStatus({ task_id: this.task_id }).then(({ is_enable_group }) => {
       if (is_enable_group === 'true') {
         this.$router.push({
           path: '/live/teacher/group',