Commit 521b3b81 authored by xiaoye's avatar xiaoye

Merge branch 'main' of https://code.moenext.com/mycard/tabulator-another-web into mycard-git

parents d40d3c04 c97bad9d
Pipeline #38197 passed with stages
in 2 minutes and 14 seconds
......@@ -487,9 +487,9 @@
match.array.filter(i => i.round == round).forEach((i, v) => {
if (i.player1.id || i.player2.id) {
string += `[${v + 1}]组\n`;
string += `\t[选手A][${i.player1.name ?? ''}]\n`;
string += `\t[选手A][${i.player1.fullName ?? ''}]\n`;
string += `\t[比 分][${i.status == 'Finished' ? `${i.player1.score} : ${i.player2.score}` : 'VS'}]\n`;
string += `\t[选手B][${i.player2.name ?? ''}]\n`;
string += `\t[选手B][${i.player2.fullName ?? ''}]\n`;
}
});
}
......@@ -666,7 +666,7 @@
]);
for (let i = 0; i < copyValue; i++) {
let p = participant.array[i];
string += `[${map.get(i) ?? `${i + 1}名`}]${p.name}\n`
string += `[${map.get(i) ?? `${i + 1}名`}]${p.fullName}\n`
}
UniApp.copy(string);
},
......
......@@ -5,6 +5,7 @@ interface player {
id : number;
score : number;
name : string;
fullName : string;
}
class Match {
......@@ -24,16 +25,18 @@ class Match {
this.round = obj.round;
this.isThirdPlaceMatch = obj.isThirdPlaceMatch;
this.status = obj.status;
const name1 = obj.player1?.name.split('+') ?? [];
const name1 = obj.player1?.name.split(/[\+\uFF0B]/) ?? [];
this.player1 = {
id : obj.player1Id,
name : (name1.length == 2 && !Number.isNaN(name1[0]) && name1[0].length > 3) ? name1[1] : obj.player1?.name ?? '',
fullName : obj.player1?.name ?? '',
score : obj.player1Score
};
const name2 = obj.player2?.name.split('+') ?? [];
const name2 = obj.player2?.name.split(/[\+\uFF0B]/) ?? [];
this.player2 = {
id : obj.player2Id,
name : (name2.length == 2 && !Number.isNaN(name2[0]) && name2[0].length > 3) ? name2[1] : obj.player2?.name ?? '',
fullName : obj.player2?.name ?? '',
score : obj.player2Score
};
this.winnerId = obj.winnerId as number | null;
......
......@@ -5,6 +5,7 @@ import { Base64 } from 'js-base64';
class Participant {
id : number;
name : string;
fullName : string;
quit : boolean;
tournamentId : number;
score : Score;
......@@ -12,7 +13,8 @@ class Participant {
deck : YGOProDeck | undefined;
constructor(obj: ParticipantObject) {
const name = obj.name.split('+');
this.fullName = obj.name;
const name = obj.name.split(/[\+\uFF0B]/);
this.name = (name.length == 2 && !Number.isNaN(name[0]) && name[0].length > 3) ? name[1] : obj.name;
this.tournamentId = obj.tournamentId;
this.id = obj.id;
......
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