Commit 1a589246 authored by limingzhe's avatar limingzhe

fix: 提交部分重写

parent 6bc2fea1
......@@ -881,9 +881,10 @@ export class PlayComponent implements OnInit, OnDestroy {
} else {
const resultData = this.getResultData();
this.userResultData = resultData;
this.sendResult();
this.setStoreData('resultData', resultData);
}
this.sendResult();
const resultLayer = new MySprite()
......@@ -1853,22 +1854,25 @@ export class PlayComponent implements OnInit, OnDestroy {
this.canTouch = false;
setTimeout(() => {
// this.hideSubmit();
this.convertCanvasToImage();
// this.hideSubmit();
setTimeout(() => {
this.setAnswerData(() => {
this.initResultView();
this.canTouch = true;
});
// setTimeout(() => {
// this.firstShowResultView();
}, 500);
}, 500);
// }, 10);
}, 10);
}
firstShowResultView() {
this.setAnswerData(() => {
this.initResultView();
this.canTouch = true;
});
}
cancelBtnClick() {
this.checkPanel.visible = false;
......@@ -2362,8 +2366,11 @@ export class PlayComponent implements OnInit, OnDestroy {
return;
}
const resultData = this.getStoreData('resultData') || {};
const resultPic = this.getStoreData('resultPic') || '';
const duration = new Date().getTime() - this.localStartTime;
c.sendAnswer({resultData: this.userResultData, resultPic: this.userResultPic || '', duration});
c.sendAnswer({resultData, resultPic, duration});
// }
......@@ -3716,7 +3723,9 @@ export class PlayComponent implements OnInit, OnDestroy {
if (!this.uploadUrl) {
// this.userResultPic = ''//true
this.sendResult();
// this.sendResult();
this.firstShowResultView();
return
}
console.log('2 uploadUrl: ', this.uploadUrl.toString());
......@@ -3741,7 +3750,10 @@ export class PlayComponent implements OnInit, OnDestroy {
if (res['url']) {
console.log('res url: ', res['url']);
this.userResultPic = res['url'];
this.sendResult();
// this.sendResult();
this.setStoreData('resultPic', this.userResultPic);
this.firstShowResultView();
}
});
......
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