lsc vor 2 Jahren
Ursprung
Commit
9d093d7712
1 geänderte Dateien mit 32 neuen und 27 gelöschten Zeilen
  1. 32 27
      js/Desktop/DeskTop.js

+ 32 - 27
js/Desktop/DeskTop.js

@@ -3919,31 +3919,36 @@ U.MD.D.I.getContents2 = function (cid, s, task, t, uid, type, iframe) {
 }
 
 U.MD.D.I.setContents = function (cid, s, task, t, uid, type,text, loading,span) {
-    var xmlhttp;
-    var Mac, Sn, DeviceId
-    if (window.XMLHttpRequest) {
-        //  IE7+, Firefox, Chrome, Opera, Safari 浏览器执行代码
-        xmlhttp = new XMLHttpRequest();
-    }
-    else {
-        // IE6, IE5 浏览器执行代码
-        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
-    }
-    xmlhttp.onreadystatechange = function () {
-        if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
-            if (xmlhttp.response) {
-                // resolve(res.value[0][0].text);
-                // iframe.contentWindow.editor.minder.importData('json', JSON.parse(xmlhttp.response)[0][0].text).then(function (data) {
-                //     $(fileInput).val('');
-                // });
-                span.innerHTML = '上传成功'
-                setTimeout(() => {
-                    loading.style.display = 'none'
-                }, 1000);
-            }
-        }
-    }
-    xmlhttp.open("GET", US.Config.pbl + "insertWord2y?uid=" + uid + "&cid=" + cid + "&s=" + s + "&task=" + task + "&t=" + t+ "&text=" + text + "&type=" + type, true);
-    xmlhttp.send();
-
+    // var xmlhttp;
+    // var Mac, Sn, DeviceId
+    // if (window.XMLHttpRequest) {
+    //     //  IE7+, Firefox, Chrome, Opera, Safari 浏览器执行代码
+    //     xmlhttp = new XMLHttpRequest();
+    // }
+    // else {
+    //     // IE6, IE5 浏览器执行代码
+    //     xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
+    // }
+    // xmlhttp.onreadystatechange = function () {
+    //     if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
+    //         if (xmlhttp.response) {
+    //             // resolve(res.value[0][0].text);
+    //             // iframe.contentWindow.editor.minder.importData('json', JSON.parse(xmlhttp.response)[0][0].text).then(function (data) {
+    //             //     $(fileInput).val('');
+    //             // });
+    //             span.innerHTML = '上传成功'
+    //             setTimeout(() => {
+    //                 loading.style.display = 'none'
+    //             }, 1000);
+    //         }
+    //     }
+    // }
+    // xmlhttp.open("GET", US.Config.pbl + "insertWord2y?uid=" + uid + "&cid=" + cid + "&s=" + s + "&task=" + task + "&t=" + t+ "&text=" + text + "&type=" + type, true);
+    // xmlhttp.send();
+    U.A.Request(US.Config.pbl + "insertWord2y", [uid,cid,s,task,t,text,type], function (res) {
+        span.innerHTML = '上传成功'
+        setTimeout(() => {
+            loading.style.display = 'none'
+        }, 1000);
+    }, [], { "type": "POST", "withCredentials": true });
 }