添加排位相框
This commit is contained in:
@@ -59,18 +59,22 @@ export default defineStore("store", {
|
||||
}
|
||||
const rankInfos = this.config.randInfos || [];
|
||||
let lvlName = "";
|
||||
let lvlImage = "";
|
||||
if (this.user.scores) {
|
||||
rankInfos.some((r, index) => {
|
||||
lvlName = rankInfos[index].name;
|
||||
lvlImage = rankInfos[index].icoin;
|
||||
if (r.upgrade_scores > this.user.scores) {
|
||||
if (rankInfos[index - 1]) {
|
||||
lvlName = rankInfos[index - 1].name;
|
||||
lvlImage = rankInfos[index - 1].icoin;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
this.user.lvlName = lvlName;
|
||||
this.user.lvlImage = lvlImage;
|
||||
}
|
||||
},
|
||||
updateDevice(deviceId, deviceName) {
|
||||
@@ -81,18 +85,21 @@ export default defineStore("store", {
|
||||
this.config = config;
|
||||
const rankInfos = config.randInfos || [];
|
||||
let lvlName = "";
|
||||
let lvlImage = "";
|
||||
if (this.user.scores) {
|
||||
rankInfos.some((r, index) => {
|
||||
lvlName = rankInfos[index].name;
|
||||
if (r.upgrade_scores > this.user.scores) {
|
||||
if (rankInfos[index - 1]) {
|
||||
lvlName = rankInfos[index - 1].name;
|
||||
lvlImage = rankInfos[index - 1].icoin;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
this.user.lvlName = lvlName;
|
||||
this.user.lvlImage = lvlImage;
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user