Commit 8f62d1fd authored by kai's avatar kai

debug

parent f4540731
...@@ -90,16 +90,22 @@ export default class NewClass extends middleLayerBase { ...@@ -90,16 +90,22 @@ export default class NewClass extends middleLayerBase {
} }
exitGame(data = null) { exitGame(data = null) {
console.log('=========exitGame=========');
const tpl = cc.find('Canvas')?.getComponent(this.courseItem.template_name);
cc.game.removePersistRootNode(this.node); console.log(JSON.stringify(tpl));
console.log(JSON.stringify(tpl['data']));
console.log('this.courseItem: ', JSON.stringify(this.courseItem));
if(!data) { if(!data) {
const tpl = cc.find('Canvas')?.getComponent(this.courseItem.template_name);
if (tpl) { if (tpl) {
data = tpl['data']; data = tpl['data'];
console.log('tpl-data: ', JSON.stringify(data));
} }
} }
cc.game.removePersistRootNode(this.node);
if (this.token && data) { if (this.token && data) {
this.callNetworkApiPost(`api/dige/v1/user/report`, { this.callNetworkApiPost(`api/dige/v1/user/report`, {
token: this.token, token: this.token,
...@@ -121,6 +127,9 @@ export default class NewClass extends middleLayerBase { ...@@ -121,6 +127,9 @@ export default class NewClass extends middleLayerBase {
this.callNativeFunction({ name: "exit", value: "" }); this.callNativeFunction({ name: "exit", value: "" });
}); });
} }
console.log('=========exitGame DONE=========');
} }
initListener() { initListener() {
......
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