Commit 1a589246 authored by limingzhe's avatar limingzhe

fix: 提交部分重写

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