|
@@ -3919,36 +3919,35 @@ 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);
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
+ 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 });
|
|
|
+ xmlhttp.open("POST", US.Config.pbl + "insertWord2y", true);
|
|
|
+ xmlhttp.send();
|
|
|
+ xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
|
|
+ // 设置请求头,表示请求体的编码格式
|
|
|
+ xhr.send("uid=" + uid + "&cid=" + cid + "&s=" + s + "&task=" + task + "&t=" + t+ "&text=" + text + "&type=" + type);
|
|
|
+ // 设置请求体,使用url-encoded格式的数据
|
|
|
}
|