Commit e5a6c2cf authored by liujiangnan's avatar liujiangnan

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

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