Commit 885f708a authored by Tt's avatar Tt

1

parent c285f217
......@@ -193,6 +193,7 @@ export default class LayerRecord extends cc.Component {
}); //结束录音
}
async recrodEnd(data) {
pg.hw.addRecord(data)
this.recordAudio = data.audioUrl;
this.showPlay();
let score = data.result.overall;
......
......@@ -387,9 +387,9 @@ export default class PuzzleJigsaw 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,
word_count: this.data.word_count || 0,
sentence_count: this.data.sentence_count || 0,
zi_count: this.data.zi_count || 0,
score: score,
};
let recordList = pg.hw.getRecord();
......@@ -408,10 +408,11 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
// pg.event.emit('layer_ending_show', { coin: this.coin })
const midd = cc.find('middleLayer');
if (!midd) return this.log("no middleLayer");
this.sendData(this.coin);
let middleLayer = midd.getComponent('middleLayer');
middleLayer.saveGolds(this.coin); // 保存金币数量;num 是获得金币的数量,数字类型;
middleLayer.goNextPage(); // 跳转到下一页
this.sendData(this.coin).then(()=>{
let middleLayer = midd.getComponent('middleLayer');
middleLayer.saveGolds(this.coin); // 保存金币数量;num 是获得金币的数量,数字类型;
middleLayer.goNextPage(); // 跳转到下一页
})
}
......
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