Bläddra i källkod

拼音接口更新

zq 6 dagar sedan
förälder
incheckning
5bea05faf4

+ 1 - 8
src/api/book.js

@@ -1,14 +1,7 @@
 import { http } from '@/utils/http';
 
 /**
- * 为文本生成拼音解析文本
- */
-export function CrateParsedTextInfo_Pinyin(data) {
-  return http.post(`/OtherSysTool/GCLSTeachingServer/TextAnalyser/CrateParsedTextInfo_Pinyin`, data);
-}
-
-/**
- * @description 得到教材章节结构
+ * @description 拼音生成(兼容旧版格式)
  * @param {object} data
  */
 export function PinyinBuild_OldFormat(data) {

+ 2 - 2
src/views/book/courseware/create/components/base/rich_text/RichText.vue

@@ -51,7 +51,7 @@
 
 <script>
 import { getRichTextData } from '@/views/book/courseware/data/richText';
-import { CrateParsedTextInfo_Pinyin } from '@/api/book';
+import { PinyinBuild_OldFormat } from '@/api/book';
 import { isEnable } from '@/views/book/courseware/data/common';
 
 import ModuleMixin from '../../common/ModuleMixin';
@@ -126,7 +126,7 @@ export default {
       data.text = text.replace(/<[^>]+>/g, '').replace(/&nbsp;/g, ' ');
       data.is_first_sentence_first_hz_pinyin_first_char_upper_case =
         this.data.property.is_first_sentence_first_hz_pinyin_first_char_upper_case;
-      CrateParsedTextInfo_Pinyin(data).then(({ parsed_text }) => {
+      PinyinBuild_OldFormat(data).then(({ parsed_text }) => {
         if (parsed_text) {
           const mergedData = parsed_text.paragraph_list.map((outerArr, i) =>
             outerArr.map((innerArr, j) =>

+ 2 - 2
src/views/book/courseware/create/components/base/stem/Stem.vue

@@ -24,7 +24,7 @@
 
 <script>
 import { getStemData } from '@/views/book/courseware/data/stem';
-import { CrateParsedTextInfo_Pinyin } from '@/api/book';
+import { PinyinBuild_OldFormat } from '@/api/book';
 import { isEnable } from '@/views/book/courseware/data/common';
 import ModuleMixin from '../../common/ModuleMixin';
 import RichText from '@/components/RichText.vue';
@@ -78,7 +78,7 @@ export default {
       this.data.paragraph_list_parameter.is_first_sentence_first_hz_pinyin_first_char_upper_case =
         this.data.property.is_first_sentence_first_hz_pinyin_first_char_upper_case;
 
-      CrateParsedTextInfo_Pinyin(this.data.paragraph_list_parameter).then((res) => {
+      PinyinBuild_OldFormat(this.data.paragraph_list_parameter).then((res) => {
         if (res.parsed_text) {
           this.data.paragraph_list = res.parsed_text.paragraph_list;
         }

+ 2 - 2
src/views/book/courseware/create/components/question/notes/Notes.vue

@@ -103,7 +103,7 @@
 <script>
 import { isEnable } from '@/views/book/courseware/data/common';
 import ModuleMixin from '../../common/ModuleMixin';
-import { CrateParsedTextInfo_Pinyin } from '@/api/book';
+import { PinyinBuild_OldFormat } from '@/api/book';
 import UploadPicture from '../new_word/components/UploadPicture.vue';
 
 import { getNotesData, getOption } from '@/views/book/courseware/data/notes';
@@ -208,7 +208,7 @@ export default {
       this.data.paragraph_list_parameter.text = text.replace(/<[^>]+>/g, '');
       this.data.paragraph_list_parameter.is_first_sentence_first_hz_pinyin_first_char_upper_case =
         this.data.property.is_first_sentence_first_hz_pinyin_first_char_upper_case;
-      CrateParsedTextInfo_Pinyin(this.data.paragraph_list_parameter).then((res) => {
+      PinyinBuild_OldFormat(this.data.paragraph_list_parameter).then((res) => {
         if (res.parsed_text) {
           const mergedData = res.parsed_text.paragraph_list.map((outerArr, i) =>
             outerArr.map((innerArr, j) =>

+ 2 - 2
src/views/book/courseware/create/components/question/table/Table.vue

@@ -129,7 +129,7 @@
 <script>
 import { isEnable } from '@/views/book/courseware/data/common';
 import ModuleMixin from '../../common/ModuleMixin';
-import { CrateParsedTextInfo_Pinyin } from '@/api/book';
+import { PinyinBuild_OldFormat } from '@/api/book';
 
 import { getRandomNumber } from '@/utils';
 import PinyinText from '@/components/PinyinText.vue';
@@ -317,7 +317,7 @@ export default {
       this.data.paragraph_list_parameter.text = text.replace(/<[^>]+>/g, '');
       this.data.paragraph_list_parameter.is_first_sentence_first_hz_pinyin_first_char_upper_case =
         this.data.property.is_first_sentence_first_hz_pinyin_first_char_upper_case;
-      CrateParsedTextInfo_Pinyin(this.data.paragraph_list_parameter).then((res) => {
+      PinyinBuild_OldFormat(this.data.paragraph_list_parameter).then((res) => {
         if (res.parsed_text) {
           const mergedData = res.parsed_text.paragraph_list.map((outerArr, i) =>
             outerArr.map((innerArr, j) =>