用户中心逻辑完善

This commit is contained in:
kron
2025-12-31 11:56:45 +08:00
parent 910530748d
commit 25f51ad53a
2 changed files with 26 additions and 9 deletions

View File

@@ -49,6 +49,7 @@ export default defineStore("store", {
rank: [],
ringRank: [],
},
online: false,
}),
// 计算属性
@@ -69,6 +70,9 @@ export default defineStore("store", {
updateRank(data = {}) {
this.rankData = { ...(data || {}) };
},
updateOnline(online) {
this.online = online;
},
async updateUser(user = {}) {
this.user = { ...defaultUser, ...user };
if (this.user.rankLvl !== undefined) {