Skip to content

Commit 54cd93d

Browse files
committed
feat: add getAllMemberList function to retrieve all users
--bug=1057955 --user=刘瑞斌 【共享资源】创建者显示为进入系统管理前工作空间存在的用户,但应该显示全量,因为系统管理不区分工作空间 https://www.tapd.cn/62980211/s/1722579
1 parent 66699ef commit 54cd93d

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

ui/src/api/user/user.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,16 @@ const getUserList: (loading?: Ref<boolean>) => Promise<Result<Record<string, any
3434
return get('/user/list', undefined, loading)
3535
}
3636

37+
/**
38+
* 获取全部用户
39+
*/
40+
const getAllMemberList: (arg: string, loading?: Ref<boolean>) => Promise<Result<Record<string, any>[]>> = (
41+
arg,
42+
loading,
43+
) => {
44+
return get('/user/list', undefined, loading)
45+
}
46+
3747
/**
3848
* 校验验证码
3949
* @param request 请求对象
@@ -91,6 +101,7 @@ export default {
91101
getUserProfile,
92102
getProfile,
93103
getUserList,
104+
getAllMemberList,
94105
postResetPassword,
95106
checkCode,
96107
sendEmit,

ui/src/utils/dynamics-api/shared-api.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import paragraphSystemShareApi from '@/api/system-shared/paragraph'
1414
import problemSystemShareApi from '@/api/system-shared/problem'
1515
import chatUserSystemShareApi from '@/api/system-shared/chat-user'
1616
import workspaceApi from '@/api/workspace/workspace'
17+
import systemUserApi from '@/api/user/user'
1718

1819
// 普通 API
1920
const workspaceApiMap = {
@@ -36,7 +37,7 @@ const systemShareApiMap = {
3637
paragraph: paragraphSystemShareApi,
3738
problem: problemSystemShareApi,
3839
chatUser: chatUserSystemShareApi,
39-
workspace: workspaceApi, // 共享的应该查全部人吧
40+
workspace: systemUserApi, // 共享的应该查全部人吧
4041
} as any
4142

4243
// 资源管理 API

0 commit comments

Comments
 (0)