fix(credit): 修正员工列表加载逻辑
- 将查询参数从 isStaff 改为 isAdmin 以正确获取管理员列表 - 保持原有的错误处理和加载状态管理逻辑
This commit is contained in:
@@ -345,7 +345,7 @@ export default function CreditCompanyPage() {
|
|||||||
if (staffList.length) return
|
if (staffList.length) return
|
||||||
setStaffLoading(true)
|
setStaffLoading(true)
|
||||||
try {
|
try {
|
||||||
const res = await listUsers({ isStaff: true } as any)
|
const res = await listUsers({ isAdmin: true } as any)
|
||||||
setStaffList((res || []) as User[])
|
setStaffList((res || []) as User[])
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('加载员工列表失败:', e)
|
console.error('加载员工列表失败:', e)
|
||||||
|
|||||||
Reference in New Issue
Block a user