refactor: ♻️ 我的和登录页面优化,添加主题设置

This commit is contained in:
Ray.Hao
2025-04-05 10:05:05 +08:00
parent 572d347bdb
commit 6a245e9d26
21 changed files with 2594 additions and 182 deletions

View File

@@ -64,11 +64,19 @@ export const useUserStore = defineStore("user", () => {
}
};
// 判断用户信息是否完整
const isUserInfoComplete = (): boolean => {
if (!userInfo.value) return false;
return !!(userInfo.value.nickname && userInfo.value.avatar);
};
return {
userInfo,
login,
loginByWechat,
logout,
getInfo,
isUserInfoComplete,
};
});