Ver código fonte

偏旁改为部首

natasha 1 ano atrás
pai
commit
4aa498e471
2 arquivos alterados com 16 adições e 14 exclusões
  1. 15 13
      src/views/wordcard/print.vue
  2. 1 1
      src/views/wordcard/writeTable.vue

+ 15 - 13
src/views/wordcard/print.vue

@@ -47,8 +47,8 @@
 
                 <div class="item-info-row">
                   <div class="item-info-half">
-                    <label>偏旁:</label>
-                    <div :id="'character-target-info-div' + indexT"></div>
+                    <label>部首:</label>
+                    <div>{{ data.radical }}</div>
                   </div>
                   <div class="item-info-half">
                     <label>笔画:</label>
@@ -302,21 +302,23 @@ export default {
       _this.dataConfig = JSON.parse(writeTableData);
       if (_this.dataConfig) {
         _this.dataConfig.result.forEach((item) => {
-          if (item.pinyin) {
-            let MethodName = 'tool-PinyinToVoiceFile';
+          if (item.con) {
+            let MethodName = 'tool-TextToVoiceFile';
             let datas = {
-              pinyin: item.pinyin.split(' ').join(','),
+              text: item.con,
             };
-            getLogin(MethodName, datas).then((res) => {
-              if (res.status === 1) {
-                _this.$set(item, 'audio_file', res.file_id);
-              }
-            });
+            getLogin(MethodName, datas)
+              .then((res) => {
+                if (res.status === 1) {
+                  _this.$set(item, 'audio_file', res.file_id);
+                }
+              })
+              .catch(() => {});
           }
         });
-        _this.$nextTick(() => {
-          _this.initHanziwrite();
-        });
+        // _this.$nextTick(() => {
+        // _this.initHanziwrite();
+        // });
       }
       setTimeout(() => {
         _this.download2();

+ 1 - 1
src/views/wordcard/writeTable.vue

@@ -48,7 +48,7 @@
 
               <div class="item-info-row">
                 <div class="item-info-half">
-                  <label>偏旁:</label>
+                  <label>部首:</label>
                   <div>{{ data.radical }}</div>
                 </div>
                 <div class="item-info-half">