数据完善

This commit is contained in:
kron
2025-07-01 10:57:49 +08:00
parent a03af4e58c
commit afab40d1a1
5 changed files with 90 additions and 130 deletions

View File

@@ -33,6 +33,21 @@ export default defineStore("store", {
// 方法
actions: {
getLvlName(score) {
let lvlName = "";
const rankInfos = this.config.randInfos || [];
rankInfos.some((r, index) => {
lvlName = rankInfos[index].name;
if (r.upgrade_scores > score) {
if (rankInfos[index - 1]) {
lvlName = rankInfos[index - 1].name;
}
return true;
}
return false;
});
return lvlName;
},
updateRank(data = {}) {
this.rankData = { rank: data.rank || [], ringRank: data.ringRank || [] };
},