lsc há 2 anos atrás
pai
commit
d37847d63e
1 ficheiros alterados com 11 adições e 5 exclusões
  1. 11 5
      js/Desktop/DeskTop.js

+ 11 - 5
js/Desktop/DeskTop.js

@@ -2802,15 +2802,12 @@ U.MD.D.I.openApplicationJie = function (str, cid, stage, task, tool) {
                 _iframe.contentWindow.document.body.appendChild(script4);
             };
         }
-        _jie.onclick = () => {
+        _jie.onclick = async () => {
             let text = ''
             if (aTool == 6) {
                 text = _iframe.contentWindow.$("#U_MD_O_H_wordEditor")[0].innerHTML.escapeQuotes()
             } else if (aTool == 3) {
-                text = _iframe.contentWindow.editor.minder.exportData('json').then(function (content) {
-                    console.log(content);
-                    return content
-                });
+                text = await U.MD.D.I.getEditorContent(_iframe);
             }
             _loading.style.display = 'flex'
             console.log(_loading);
@@ -2875,4 +2872,13 @@ U.MD.D.I.openApplicationJie = function (str, cid, stage, task, tool) {
         U.MD.D.T.taskbar(_taskbar); //创建任务处理
     }
 
+}
+
+U.MD.D.I.getEditorContent = function(iframe){
+    return new Promise((resolve, reject) => {
+        iframe.contentWindow.editor.minder.exportData('json').then(function (content) {
+            console.log(content);
+            resolve(content)
+        });
+    });
 }