feat: 为通知路由添加认证要求,确保用户登录后才能访问

This commit is contained in:
2026-01-08 01:04:30 +07:00
parent 9ee8ffb806
commit ddb025b124
2 changed files with 3 additions and 0 deletions

View File

@@ -14,8 +14,10 @@ export const useUserStore = defineStore("user", () => {
const isAuthenticated = computed(() => !!token.value);
async function updateProfile() {
const { initializeWallet } = useWalletStore();
const { data } = await safeClient(client.api.user.profile.get(), { silent: true });
state.userProfile = data.value || null;
initializeWallet();
}
function setToken(value: string) {