Browse Source

WordPhrase

guanchunjie 3 years ago
parent
commit
08470ef22d
1 changed files with 27 additions and 64 deletions
  1. 27 64
      src/components/Adult/preview/WordPhrase.vue

+ 27 - 64
src/components/Adult/preview/WordPhrase.vue

@@ -179,69 +179,33 @@ export default {
       this.data.list1 = [];
       this.data.list2 = [];
       this.data.list3 = [];
-      this.data.list1 = [
-        {
-          word: "国",
-          sentence: "我是一个中国人,我爱我的国家", // 例句,
-          begin_position: 12,
-          end_position: 13,
-          source_scope: 1,
-          source_courseware_id_path: "BOOK1/C0001/CW001", // 来源课件 ID 路径 "source_courseware_name_path":"教材1/章节1/课件1", //来源课件名称路径
-        },
-        {
-          word: "国",
-          sentence: "我是一个中国人,我爱我的国家", // 例句,
-          begin_position: 5,
-          end_position: 6,
-          source_scope: 1,
-          source_courseware_id_path: "BOOK1/C0001/CW001", // 来源课件 ID 路径 "source_courseware_name_path":"教材1/章节1/课件1", //来源课件名称路径
-        },
-      ];
-      this.data.list2 = [
-        {
-          word: "国",
-          sentence: "我是一个中国人,我爱我的国家", // 例句,
-          begin_position: 12,
-          end_position: 13,
-          source_scope: 1,
-          source_courseware_id_path: "BOOK1/C0001/CW001", // 来源课件 ID 路径 "source_courseware_name_path":"教材1/章节1/课件1", //来源课件名称路径
-        },
-        {
-          word: "国",
-          sentence: "我是一个中国人,我爱我的国家", // 例句,
-          begin_position: 5,
-          end_position: 6,
-          source_scope: 1,
-          source_courseware_id_path: "BOOK1/C0001/CW001", // 来源课件 ID 路径 "source_courseware_name_path":"教材1/章节1/课件1", //来源课件名称路径
-        },
-      ];
-      // let Mname =
-      //   "book-courseware_manager-GetCoursewareWordExampleSentenceList";
-      // // 获取本课的 本教材的 本套的 的例句
-      // getContent(Mname, {
-      //   courseware_id: this.currentTreeID, // 课件id
-      //   word: val, //生词
-      //   search_scope: 2, //检索范围0 本课件  1本教材 2本套
-      //   is_contain_word_variants: false,
-      // }).then((res) => {
-      //   this.data.list3 = res.sentence_list;
-      //   getContent(Mname, {
-      //     courseware_id: this.currentTreeID, // 课件id
-      //     word: val, //生词
-      //     search_scope: 1, //检索范围0 本课件  1本教材 2本套
-      //     is_contain_word_variants: false,
-      //   }).then((res) => {
-      //     this.data.list2 = res.sentence_list;
-      //     getContent(Mname, {
-      //       courseware_id: this.currentTreeID, // 课件id
-      //       word: val, //生词
-      //       search_scope: 0, //检索范围0 本课件  1本教材 2本套
-      //       is_contain_word_variants: false,
-      //     }).then((res) => {
-      //       this.data.list1 = res.sentence_list;
-      //     });
-      //   });
-      // });
+      let Mname =
+        "book-courseware_manager-GetCoursewareWordExampleSentenceList";
+      // 获取本课的 本教材的 本套的 的例句
+      getContent(Mname, {
+        courseware_id: this.currentTreeID, // 课件id
+        word: val, //生词
+        search_scope: 2, //检索范围0 本课件  1本教材 2本套
+        is_contain_word_variants: false,
+      }).then((res) => {
+        this.data.list3 = res.sentence_list;
+        getContent(Mname, {
+          courseware_id: this.currentTreeID, // 课件id
+          word: val, //生词
+          search_scope: 1, //检索范围0 本课件  1本教材 2本套
+          is_contain_word_variants: false,
+        }).then((res) => {
+          this.data.list2 = res.sentence_list;
+          getContent(Mname, {
+            courseware_id: this.currentTreeID, // 课件id
+            word: val, //生词
+            search_scope: 0, //检索范围0 本课件  1本教材 2本套
+            is_contain_word_variants: false,
+          }).then((res) => {
+            this.data.list1 = res.sentence_list;
+          });
+        });
+      });
     },
     // 关闭单词详情
     closeWordShow(val) {
@@ -262,7 +226,6 @@ export default {
       this.getWordLiju(this.data.new_word);
     },
     changeDetailIndex(val) {
-      debugger;
       if (val == "last") {
         this.detailIndex--;
       } else {