Commit 29216807 authored by limingzhe's avatar limingzhe

fix: 断线重连 时间异常

parent 9d041721
...@@ -881,6 +881,9 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -881,6 +881,9 @@ export class PlayComponent implements OnInit, OnDestroy {
} else { } else {
const resultData = this.getResultData(); const resultData = this.getResultData();
this.userResultData = resultData; this.userResultData = resultData;
const duration = new Date().getTime() - this.localStartTime;
this.setStoreData('duration', duration);
this.setStoreData('resultData', resultData); this.setStoreData('resultData', resultData);
} }
this.sendResult(); this.sendResult();
...@@ -2367,9 +2370,10 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -2367,9 +2370,10 @@ export class PlayComponent implements OnInit, OnDestroy {
} }
const resultData = this.getStoreData('resultData'); const resultData = this.getStoreData('resultData');
const duration = this.getStoreData('duration');
const resultPic = this.getStoreData('resultPic') || ''; const resultPic = this.getStoreData('resultPic') || '';
const duration = new Date().getTime() - this.localStartTime; // const duration = new Date().getTime() - this.localStartTime;
c.sendAnswer({resultData, resultPic, duration}); c.sendAnswer({resultData, resultPic, duration});
// } // }
......
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