Browse Source

Merge branch '1.3bug' into dev

skyblued 2 years ago
parent
commit
30a11546cd
2 changed files with 3 additions and 2 deletions
  1. 2 1
      src/views/live-class/index.tsx
  2. 1 1
      src/views/video-class/index.tsx

+ 2 - 1
src/views/live-class/index.tsx

@@ -45,7 +45,8 @@ export default defineComponent({
     } catch {
       //
     }
-    const list = this.subjectList.map((n: any) => n.subjects).flat()
+    const list = this.subjectList.map((n: any) => n.subjects).flat().sort((a,b) => a.id - b.id)
+    console.log([...list])
     const userSubjectId = this.params.subjectId
     let isRest = true
     for(let i = 0; i < list.length; i++){

+ 1 - 1
src/views/video-class/index.tsx

@@ -45,7 +45,7 @@ export default defineComponent({
     } catch {
       //
     }
-    const list = this.subjectList.map((n: any) => n.subjects).flat()
+    const list = this.subjectList.map((n: any) => n.subjects).flat().sort((a,b) => a.id - b.id)
     const userSubjectId = this.params.lessonSubject
     let isRest = true
     for(let i = 0; i < list.length; i++){