|
@@ -2902,31 +2902,26 @@ U.MD.D.I.getContent = function (cid, s, task, t, uid, type, iframe) {
|
|
|
// }, [], { "type": "GET", "withCredentials": true });
|
|
|
|
|
|
var xmlhttp;
|
|
|
- var Mac,Sn,DeviceId
|
|
|
- if (window.XMLHttpRequest)
|
|
|
- {
|
|
|
+ var Mac, Sn, DeviceId
|
|
|
+ if (window.XMLHttpRequest) {
|
|
|
// IE7+, Firefox, Chrome, Opera, Safari 浏览器执行代码
|
|
|
- xmlhttp=new XMLHttpRequest();
|
|
|
+ xmlhttp = new XMLHttpRequest();
|
|
|
}
|
|
|
- else
|
|
|
- {
|
|
|
+ else {
|
|
|
// IE6, IE5 浏览器执行代码
|
|
|
- xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
|
|
|
+ xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
|
|
|
}
|
|
|
- xmlhttp.onreadystatechange=function()
|
|
|
- {
|
|
|
- debugger
|
|
|
- if (xmlhttp.readyState==4 && xmlhttp.status==200)
|
|
|
- {
|
|
|
- // if (res.value[0].length > 0) {
|
|
|
- // // resolve(res.value[0][0].text);
|
|
|
- // iframe.contentWindow.editor.minder.importData('json', res.value[0][0].text).then(function (data) {
|
|
|
- // $(fileInput).val('');
|
|
|
- // });
|
|
|
- // }
|
|
|
+ xmlhttp.onreadystatechange = function () {
|
|
|
+ if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
|
|
|
+ if (xmlhttp.response && JSON.parse(xmlhttp.response)[0].length > 0) {
|
|
|
+ // resolve(res.value[0][0].text);
|
|
|
+ iframe.contentWindow.editor.minder.importData('json', JSON.parse(xmlhttp.response)[0][0].text).then(function (data) {
|
|
|
+ $(fileInput).val('');
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- xmlhttp.open("GET",US.Config.pbl + "selectWord2?uid=" + uid + "&cid=" + cid + "&s=" + s + "&task=" + task + "&t=" + t + "&type=" + type,true);
|
|
|
+ xmlhttp.open("GET", US.Config.pbl + "selectWord2?uid=" + uid + "&cid=" + cid + "&s=" + s + "&task=" + task + "&t=" + t + "&type=" + type, true);
|
|
|
xmlhttp.send();
|
|
|
|
|
|
}
|