Explorar el Código

Merge branch '1.3bug' into dev

skyblued hace 3 años
padre
commit
30a11546cd
Se han modificado 2 ficheros con 3 adiciones y 2 borrados
  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++){