fix: vip取值优化

This commit is contained in:
Gsh
2025-12-11 21:47:48 +08:00
parent 6e2ca8f1c3
commit 5ed79c6dd0
2 changed files with 3 additions and 2 deletions

View File

@@ -1,9 +1,9 @@
import {useUserStore} from '@/stores/index.js';
import { useUserStore } from '@/stores/index.js';
// 判断是否是 VIP 用户
export function isUserVip(): boolean {
const userStore = useUserStore();
return userStore.userInfo.isVip;
return userStore?.userInfo?.isVip;
}
// 用户头像

View File

@@ -6,6 +6,7 @@ interface ImportMetaEnv {
readonly VITE_WEB_ENV: string;
readonly VITE_WEB_BASE_API: string;
readonly VITE_API_URL: string;
readonly VITE_BUILD_COMPRESS: string;
readonly VITE_SSO_SEVER_URL: string;
readonly VITE_APP_VERSION: string;
}