fix: vip取值优化
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
// 用户头像
|
||||
|
||||
1
Yi.Ai.Vue3/types/import_meta.d.ts
vendored
1
Yi.Ai.Vue3/types/import_meta.d.ts
vendored
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user