Browse Source

bugfix: 修复比赛时后面记录会刷新前面记录的问题,现在只在后面记录得分高于前面记录时刷新。

pull/27/head
zjz1993 5 years ago
parent
commit
130aa48227
  1. 2
      models-built/contest_player.js
  2. 2
      models-built/contest_player.js.map
  3. 2
      models/contest_player.ts

2
models-built/contest_player.js

@ -138,7 +138,7 @@ var ContestPlayer = /** @class */ (function (_super) {
if (this.score_details[judge_state.problem_id] && this.score_details[judge_state.problem_id].judge_id > judge_state.id)
return [2 /*return*/];
this.score_details[judge_state.problem_id] = {
score: judge_state.score,
score: Math.max(judge_state.score, this.score_details[judge_state.problem_id].score),
judge_id: judge_state.id
};
this.score = 0;

2
models-built/contest_player.js.map

File diff suppressed because one or more lines are too long

2
models/contest_player.ts

@ -82,7 +82,7 @@ export default class ContestPlayer extends Model {
if (this.score_details[judge_state.problem_id] && this.score_details[judge_state.problem_id].judge_id > judge_state.id) return;
this.score_details[judge_state.problem_id] = {
score: judge_state.score,
score: Math.max(judge_state.score ,this.score_details[judge_state.problem_id].score),
judge_id: judge_state.id
};

Loading…
Cancel
Save