Commit 9ffbc008 authored by limingzhe's avatar limingzhe

fix: debug

parent 6711cdfb
......@@ -626,6 +626,10 @@ export default class NewClass extends middleLayerBase {
...this.studyRecordModel,
recordData: reportData
}, res => {
if (res == null) {
console.log('reportData => res is null');
return;
}
console.log('reportData => res:', res);
});
}
......
......@@ -583,10 +583,14 @@ export abstract class middleLayerBase extends cc.Component {
xhr.setRequestHeader('content-type', 'application/json');
xhr.onreadystatechange = () => {
console.log('xhr: ', xhr.toString());
if (xhr.readyState == 4) {
console.log('xhr.responseText : ' + xhr.responseText);
callBack(JSON.parse(xhr.responseText));
console.log('xhr.status: ', xhr.status);
if (xhr.responseText) {
console.log('xhr.responseText : ' + xhr.responseText);
callBack(JSON.parse(xhr.responseText));
} else {
callBack(null);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment