skyblued 2 gadi atpakaļ
vecāks
revīzija
6e315175c2
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 {
     } 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
     const userSubjectId = this.params.subjectId
     let isRest = true
     let isRest = true
     for(let i = 0; i < list.length; i++){
     for(let i = 0; i < list.length; i++){

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

@@ -45,7 +45,7 @@ export default defineComponent({
     } catch {
     } 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
     const userSubjectId = this.params.lessonSubject
     let isRest = true
     let isRest = true
     for(let i = 0; i < list.length; i++){
     for(let i = 0; i < list.length; i++){