Browse Source

currentTreeID 取值

natasha 2 months ago
parent
commit
b473bdf3e7

+ 2 - 2
src/views/book/courseware/preview/components/article/index.vue

@@ -276,7 +276,7 @@ export default {
     NotesPreview,
   },
   mixins: [PreviewMixin],
-  inject: ['bookInfo'],
+  inject: ['bookInfo', 'getCoursewareId'],
   props: ['isMobile'],
   data() {
     return {
@@ -317,7 +317,7 @@ export default {
       NNPENewWordList: [],
       NpcNewWordMp3: [],
       colLength: 1,
-      courseware_id: this.$route.params.id,
+      courseware_id: this.getCoursewareId(),
       multilingualTextList: {},
       analyser_url: '',
     };

+ 2 - 1
src/views/book/courseware/preview/components/new_word/NewWordPreview.vue

@@ -1559,6 +1559,7 @@ export default {
     Strockplay,
     writeTableZoom,
   },
+  inject: ['getCoursewareId'],
   mixins: [PreviewMixin],
   props: {
     newData: {
@@ -1591,7 +1592,7 @@ export default {
       indexStr: Math.random().toString(36).substring(2, 10),
       is_change: false,
       is_list: true, // 列表还是卡片展示
-      courseware_id: this.$route.params.id,
+      courseware_id: this.getCoursewareId(),
       rowWidth: 0,
       multilingualTextList: {}, // 多语言对应的切割后的翻译
       titleTrans: {},

+ 2 - 1
src/views/book/courseware/preview/components/video_interaction/Report.vue

@@ -50,6 +50,7 @@ export default {
       getPermissionControl: () => this.permissionControl,
     };
   },
+  inject: ['getCoursewareId'],
   props: ['reportResult', 'exerciseList', 'userAnswer', 'fileList'],
   data() {
     return {
@@ -127,7 +128,7 @@ export default {
       this.loading = true;
       let data = {
         exercise_id,
-        courseware_id: this.$route.params.id,
+        courseware_id: this.getCoursewareId(),
       };
       GetCoursewareExerciseView(data)
         .then((res) => {