浏览代码

Merge branch '1.3bug' into dev

skyblued 2 年之前
父节点
当前提交
30a11546cd
共有 2 个文件被更改,包括 3 次插入2 次删除
  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++){