@indfnd/utils 0.1.41 → 0.1.43

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indfnd/utils",
3
- "version": "0.1.41",
3
+ "version": "0.1.43",
4
4
  "author": "huxuetong",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
package/src/api/user.ts CHANGED
@@ -7,8 +7,13 @@ import { getGlobalConfig } from '@/api/platform/config.js'
7
7
  const UC_CONTEXT = config.ucExtServerContext
8
8
 
9
9
  export async function listUserTreeApi(params) {
10
- const DATAVERSION_KEY = 'ind-cache-dataVersion-organTree' + getUserInfoCache()?.manageUnitId
11
-
10
+ // 需要区分params: showPosition, isHideProjectTeam 作为不同的树缓存,后端使用统一版本号
11
+ const cacheKeySuffix =
12
+ Object.keys(params || {}).length > 0
13
+ ? '-' + JSON.stringify(params || {}, Object.keys(params || {}).sort())
14
+ : ''
15
+ const DATAVERSION_KEY =
16
+ 'ind-cache-dataVersion-organTree' + getUserInfoCache()?.manageUnitId + cacheKeySuffix
12
17
  //0.读取全局配置,是否使用缓存
13
18
  const globalConfigData = await getGlobalConfig()
14
19
  if (!globalConfigData?.enableTreeLocalCache || globalConfigData?.enableTreeLocalCache !== '1') {
@@ -1 +1 @@
1
- {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/api/user.ts"],"names":[],"mappings":"AAQA,wBAAsB,eAAe,CAAC,MAAM,KAAA,gBA2B3C"}
1
+ {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/api/user.ts"],"names":[],"mappings":"AAQA,wBAAsB,eAAe,CAAC,MAAM,KAAA,gBAgC3C"}