@das-fed/utils 6.4.0-dev.61 → 6.4.0-dev.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,8 +17,8 @@ const y = i, T = () => {
17
17
  return JSON.stringify(e) === "{}" && t.personalInfo && (e = t.personalInfo), {
18
18
  id: e.id ?? "",
19
19
  name: e.name ?? "",
20
- phone: e.phone ?? "",
21
20
  userName: e.userName ?? "",
21
+ phone: e.phone ?? "",
22
22
  email: e.email ?? "",
23
23
  headPicture: e.headPicture ?? ""
24
24
  };
@@ -29,11 +29,22 @@ const y = i, T = () => {
29
29
  userName: e.userName ?? "",
30
30
  name: e.name ?? "",
31
31
  areaCode: e.areaCode ?? "",
32
+ region: e.region ?? "",
32
33
  phone: e.phone ?? "",
34
+ email: e.email ?? "",
33
35
  flag: e.flag ?? null,
34
- tenant: e.tenant ?? {}
36
+ tenant: e.tenant ?? {},
37
+ headPicture: e.headPicture ?? "",
38
+ nickName: e.nickName ?? "",
39
+ gender: e.gender ?? null,
40
+ status: e.status ?? null,
41
+ statusName: e.statusName ?? null,
42
+ tags: e.tags ?? [],
43
+ type: e.type ?? null,
44
+ address: e.address ?? "",
45
+ description: e.description ?? ""
35
46
  };
36
- }, C = () => {
47
+ }, N = () => {
37
48
  let e = JSON.parse(sessionStorage.getItem("projectInfo") || "{}");
38
49
  const t = u();
39
50
  return JSON.stringify(e) === "{}" && t.projectInfo && (e = t.projectInfo), {
@@ -82,22 +93,23 @@ const y = i, T = () => {
82
93
  enable: (e == null ? void 0 : e.enable) ?? !1,
83
94
  originalCode: (e == null ? void 0 : e.originalCode) ?? "",
84
95
  routeUrl: (e == null ? void 0 : e.routeUrl) ?? "",
96
+ displayPosition: (e == null ? void 0 : e.displayPosition) ?? 1,
85
97
  type: (e == null ? void 0 : e.type) ?? null
86
98
  };
87
- }, f = () => {
99
+ }, v = () => {
88
100
  const e = JSON.parse(sessionStorage.getItem("personal-config") || "{}");
89
101
  return {
90
102
  style: (e == null ? void 0 : e.style) ?? "",
91
103
  skinStyle: (e == null ? void 0 : e.skinStyle) ?? ""
92
104
  };
93
- }, N = (e, t) => {
94
- const r = "permission-btn", o = m(), a = g(location.href, "app") || "", n = t || a || o.currentSubAppCode;
95
- if (!n) return;
96
- const s = g(location.href, "menu") || "", l = e || s || o.currentSubApp.currentMenuCode, c = JSON.parse(sessionStorage.getItem(r) || "{}");
105
+ }, C = (e, t) => {
106
+ const r = "permission-btn", a = m(), o = g(location.href, "app") || "", s = t || o || a.currentSubAppCode;
107
+ if (!s) return;
108
+ const n = g(location.href, "menu") || "", l = e || n || a.currentSubApp.currentMenuCode, c = JSON.parse(sessionStorage.getItem(r) || "{}");
97
109
  if (!c || JSON.stringify(c) === "{}") return;
98
- const p = c[n][l];
99
- return p && p.length ? p : c[n]["origin-auth"] ? c[n]["origin-auth"][l] ?? [] : [];
100
- }, v = (e, t) => N(e, t) ?? [], m = () => {
110
+ const p = c[s][l];
111
+ return p && p.length ? p : c[s]["origin-auth"] ? c[s]["origin-auth"][l] ?? [] : [];
112
+ }, f = (e, t) => C(e, t) ?? [], m = () => {
101
113
  const e = JSON.parse(sessionStorage.getItem("subApps") || "{}");
102
114
  return {
103
115
  appcategorys: e.appcategorys ?? [],
@@ -106,20 +118,20 @@ const y = i, T = () => {
106
118
  subAppList: e.subAppList ?? [],
107
119
  menuCollapses: e.menuCollapses ?? []
108
120
  };
109
- }, D = (e, t = !1) => {
110
- var o, a;
121
+ }, k = (e, t = !1) => {
122
+ var a, o;
111
123
  const r = m().subAppList;
112
124
  if (e)
113
- return t ? ((o = r == null ? void 0 : r.find((n) => n.code === e)) == null ? void 0 : o.originalMenus) ?? [] : ((a = r == null ? void 0 : r.find((n) => n.code === e)) == null ? void 0 : a.menus) ?? [];
125
+ return t ? ((a = r == null ? void 0 : r.find((s) => s.code === e)) == null ? void 0 : a.originalMenus) ?? [] : ((o = r == null ? void 0 : r.find((s) => s.code === e)) == null ? void 0 : o.menus) ?? [];
114
126
  {
115
- let n = {};
116
- return t ? r == null || r.forEach((s) => {
117
- n[s.code] = s.originalMenus ?? [];
118
- }) : r == null || r.forEach((s) => {
119
- n[s.code] = s.menus ?? [];
120
- }), n;
127
+ let s = {};
128
+ return t ? r == null || r.forEach((n) => {
129
+ s[n.code] = n.originalMenus ?? [];
130
+ }) : r == null || r.forEach((n) => {
131
+ s[n.code] = n.menus ?? [];
132
+ }), s;
121
133
  }
122
- }, U = () => {
134
+ }, D = () => {
123
135
  const e = JSON.parse(sessionStorage.getItem("tabs") || "{}");
124
136
  return {
125
137
  currentCode: e.currentCode ?? "",
@@ -127,7 +139,7 @@ const y = i, T = () => {
127
139
  tabMap: e.tabMap ?? {},
128
140
  preTab: e.preTab ?? {}
129
141
  };
130
- }, k = () => {
142
+ }, U = () => {
131
143
  const e = u(), t = sessionStorage.getItem("minioAddress");
132
144
  return t || (e.baseURL ? e.baseURL : location.origin);
133
145
  }, E = () => ({
@@ -135,21 +147,21 @@ const y = i, T = () => {
135
147
  }), z = () => localStorage.getItem("fav-icon") || "./logo.svg";
136
148
  y() || I();
137
149
  var d;
138
- (d = C()) != null && d.id || S();
150
+ (d = N()) != null && d.id || S();
139
151
  export {
140
152
  z as getFavIcon,
141
153
  M as getHomeInfo,
142
154
  E as getInstanceInfo,
143
- D as getMenus,
144
- k as getMinioAddress,
145
- N as getPageAuth,
146
- v as getPageAuthBtn,
147
- f as getPersonalConfig,
155
+ k as getMenus,
156
+ U as getMinioAddress,
157
+ C as getPageAuth,
158
+ f as getPageAuthBtn,
159
+ v as getPersonalConfig,
148
160
  A as getPersonalInfo,
149
- C as getProjectInfo,
161
+ N as getProjectInfo,
150
162
  O as getProjectMessage,
151
163
  m as getSubApps,
152
- U as getTabInfo,
164
+ D as getTabInfo,
153
165
  J as getTenantInfo,
154
166
  y as getToken,
155
167
  T as getUserInfo
Binary file
@@ -29,20 +29,57 @@ export interface TenantInfo {
29
29
  userId: string
30
30
  /** 用户名 */
31
31
  userName: string
32
+ /** 用户名称 */
32
33
  name: string
34
+ /** 昵称 */
35
+ nickName: string
36
+ /** 手机号 */
37
+ phone: string
38
+ /** 邮箱 */
39
+ email: string
40
+ /** 性别 1 男 2 女 */
41
+ gender: number
42
+ /** 用户状态 1 正常 2 锁定 3 禁用*/
43
+ status: number
44
+ /** 状态名称 */
45
+ statusName: string
46
+ /** 用户类型。0:普通 1:管理员 */
47
+ type: number
33
48
  /** 租户信息 */
34
49
  tenant: {
50
+ /** 租户ID */
35
51
  id: string
52
+ /** 租户名 */
36
53
  name: string
54
+ /** 域,如:qq,das */
55
+ domain: string
56
+ /** 管理员用户ID */
37
57
  adminUserId: string
58
+ /** 租户描述 */
38
59
  description: string
39
- domain: string
60
+ /** 是否开通三员权限管理,0表示未开通,1表示已开通。 */
61
+ thirdManaged: number
40
62
  }
41
63
  /** 用户标识 2 - B端身份, 4 - C 端身份, 6 - B+C 端身份 */
42
64
  flag: number
65
+ /** 当前区号 */
43
66
  areaCode: string
44
- /** 手机号 */
45
- phone: string
67
+ /** 地区 */
68
+ region: string
69
+ /** 地址 */
70
+ address: string
71
+ /** 描述 */
72
+ description: string
73
+
74
+ /** 头像 */
75
+ headPicture: string
76
+ /** 用户标签 */
77
+ tags: {
78
+ id: number
79
+ key: string
80
+ value: string
81
+ desc: string
82
+ }[]
46
83
  }
47
84
 
48
85
  export interface HomeInfo {
@@ -54,6 +91,8 @@ export interface HomeInfo {
54
91
  enable: boolean
55
92
  originalCode: string
56
93
  routeUrl: string
94
+ /** 首页展示位置 1在应用中心左侧 2在应用中心右侧 */
95
+ displayPosition: 1 | 2
57
96
  type: number | null
58
97
  }
59
98
 
@@ -9,13 +9,11 @@ declare const tokenStorage: () => {
9
9
  accessToken: any;
10
10
  accessTokenExpiredAt: any;
11
11
  refreshToken: any;
12
- redirectUri: any;
13
12
  };
14
13
  save: (data: {
15
14
  accessToken?: string | null;
16
15
  accessTokenExpiredAt?: string | number | null;
17
16
  refreshToken?: string | null;
18
- redirectUri?: string;
19
17
  info?: any;
20
18
  }) => void;
21
19
  remove: () => void;