feat: 创建企业逻辑对接
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import router from '@/router';
|
||||
import { defineStore } from 'pinia';
|
||||
import { fetchProfileInfo } from '@/api/all/login';
|
||||
import { useSidebarStore } from '@/stores/modules/side-bar';
|
||||
// import { useSidebarStore } from '@/stores/modules/side-bar';
|
||||
import { glsWithCatch, slsWithCatch, rlsWithCatch } from '@/utils/stroage';
|
||||
|
||||
interface UserInfo {
|
||||
@ -10,6 +10,8 @@ interface UserInfo {
|
||||
head_image: String;
|
||||
current_enterprise_id: number;
|
||||
mobile: string;
|
||||
primary_enterprise: any; // 主企业信息
|
||||
[key: string]: any;
|
||||
// 添加其他用户属性...
|
||||
}
|
||||
|
||||
@ -37,6 +39,10 @@ export const useUserStore = defineStore('user', {
|
||||
isLogin(): boolean {
|
||||
return !!this.token;
|
||||
},
|
||||
// 是否开通企业
|
||||
isOpenEnterprise(): boolean {
|
||||
return this.userInfo?.primary_enterprise?.subscribe_status === 1;
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
// 设置 Token
|
||||
|
||||
Reference in New Issue
Block a user