Commit 9ee305a1 authored by limingzhe's avatar limingzhe

fix: debug

parent 17319ced
...@@ -139,6 +139,9 @@ export default class NewClass extends middleLayerBase { ...@@ -139,6 +139,9 @@ export default class NewClass extends middleLayerBase {
cc.game.removePersistRootNode(this.node); cc.game.removePersistRootNode(this.node);
if (this.token && data) { if (this.token && data) {
console.log('data str: ', JSON.stringify(data));
this.callNetworkApiPost(`api/dige/v1/user/report`, { this.callNetworkApiPost(`api/dige/v1/user/report`, {
token: this.token, token: this.token,
syllabus_id: this.courseItem.course_id, syllabus_id: this.courseItem.course_id,
......
...@@ -72,6 +72,7 @@ export abstract class middleLayerBase extends cc.Component { ...@@ -72,6 +72,7 @@ export abstract class middleLayerBase extends cc.Component {
xhr.setRequestHeader('content-type', 'application/json'); xhr.setRequestHeader('content-type', 'application/json');
xhr.onreadystatechange = () => { xhr.onreadystatechange = () => {
if (xhr.readyState == 4) { if (xhr.readyState == 4) {
console.log("xhr.responseText: ", xhr.responseText);
callBack(JSON.parse(xhr.responseText)); callBack(JSON.parse(xhr.responseText));
} }
} }
......
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