Commit e5a6c2cf authored by liujiangnan's avatar liujiangnan

fix: 视频播放器未释放问题

parent f1dae3b7
...@@ -71,6 +71,7 @@ export default class NewClass extends middleLayerBase { ...@@ -71,6 +71,7 @@ export default class NewClass extends middleLayerBase {
} }
exitGame(data = null) { exitGame(data = null) {
cc.game.removePersistRootNode(this.node);
if (this.token) { if (this.token) {
this.callNetworkApiPost(`api/dige/v1/user/report`, { this.callNetworkApiPost(`api/dige/v1/user/report`, {
token: this.token, token: this.token,
...@@ -80,10 +81,14 @@ export default class NewClass extends middleLayerBase { ...@@ -80,10 +81,14 @@ export default class NewClass extends middleLayerBase {
study_duration: Date.now() - this.courseOpenTimeStamp, study_duration: Date.now() - this.courseOpenTimeStamp,
result: JSON.stringify(data), result: JSON.stringify(data),
}, () => { }, () => {
cc.director.loadScene("emptyScene", () => {
this.callNativeFunction({ name: "exit", value: "" }); this.callNativeFunction({ name: "exit", value: "" });
}); });
});
} else { } else {
cc.director.loadScene("emptyScene", () => {
this.callNativeFunction({ name: "exit", value: "" }); this.callNativeFunction({ name: "exit", value: "" });
});
} }
} }
......
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