All checks were successful
Build and Deploy Front / deploy (push) Successful in 5m22s
补齐系统用户重置密码入口与网盘下载提示;规范禁止 type=outline;顺带修复揽收单下游预报后刷新列表。 Co-authored-by: Cursor <cursoragent@cursor.com>
31 lines
1.0 KiB
TypeScript
31 lines
1.0 KiB
TypeScript
import type { UserDto } from './generated/models/UserDto'
|
|
import type { UserDtoPagedResultDto } from './generated/models/UserDtoPagedResultDto'
|
|
import { axiosInstance } from './axios-config'
|
|
import { resolveAdminApiPath } from '@/utils/adminApi'
|
|
|
|
function internalUserListUrl() {
|
|
return resolveAdminApiPath('/rbac/user/internal-list')
|
|
}
|
|
|
|
function resetPasswordUrl() {
|
|
return resolveAdminApiPath('/rbac/user/reset-password')
|
|
}
|
|
|
|
/** 内部用户列表(排除纯客户账号),响应结构与 UserDtoPagedResultDto 兼容 */
|
|
export async function getInternalUserList(params: {
|
|
keyword?: string
|
|
organizationId?: string
|
|
page?: number
|
|
pageSize?: number
|
|
}): Promise<UserDtoPagedResultDto> {
|
|
const res = await axiosInstance.get<UserDtoPagedResultDto>(internalUserListUrl(), { params })
|
|
return res.data
|
|
}
|
|
|
|
/** 管理员重置用户密码(无需旧密码) */
|
|
export async function resetUserPassword(id: string, newPassword: string): Promise<void> {
|
|
await axiosInstance.post(resetPasswordUrl(), { newPassword }, { params: { id } })
|
|
}
|
|
|
|
export type { UserDto }
|