Commit 85d32df4 authored by Tt's avatar Tt

1

parent eb715451
No preview for this file type
......@@ -87,10 +87,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
sendData(score) {
return new Promise(res => {
let upData: any = {
word_count: this.data.word_count,
sentence_count: this.data.sentence_count,
zi_count: this.data.zi_count,
score: score,
word_count: this.data.word_count || 0,
sentence_count: this.data.sentence_count || 0,
zi_count: this.data.zi_count || 0,
score: score || 0,
};
let recordList = pg.hw.getRecord();
if (recordList && recordList.length > 0) {
......@@ -109,10 +109,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
// this.replay();
// })
// pg.event.emit('layer_ending_show', { coin: this.data.questions.length * 3 })
this.sendData(this.data.questions.length * 3).then(() => {
const middleLayer = cc.find('middleLayer').getComponent('middleLayer');
middleLayer.saveGolds(this.data.questions.length * 3); // 保存金币数量;num 是获得金币的数量,数字类型;
this.sendData(this.data.questions.length * 3);
middleLayer.goNextPage(); // 跳转到下一页
})
}
private rightList: Array<any>;
private createCount: number;
......
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