Pārlūkot izejas kodu

Merge branch '1.3bug' into dev

skyblued 3 gadi atpakaļ
vecāks
revīzija
30a11546cd
2 mainītis faili ar 3 papildinājumiem un 2 dzēšanām
  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++){