修改用户搜索的api地址
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { user } from '@/services/system/api';
|
||||
import { userSearch } from '@/services/system/api';
|
||||
import type { ProColumns } from '@ant-design/pro-components';
|
||||
import {
|
||||
ProFormSelect,
|
||||
@@ -88,7 +88,7 @@ const TableList: React.FC = () => {
|
||||
<ProTable<SYSTEM.User>
|
||||
rowKey="id"
|
||||
headerTitle="用户管理"
|
||||
request={user}
|
||||
request={userSearch}
|
||||
columns={columns}
|
||||
search={false}
|
||||
params={params}
|
||||
|
||||
@@ -78,6 +78,15 @@ export async function importImage(formData: FormData) {
|
||||
return result;
|
||||
}
|
||||
|
||||
export async function userSearch(params?: { [key: string]: string | number }) {
|
||||
const { current, pageSize, ...rest } = params ?? {};
|
||||
const result = await request<SYSTEM.Page<SYSTEM.User>>('/api-user/users/search', {
|
||||
method: 'GET',
|
||||
params: { page: current, limit: pageSize, ...rest },
|
||||
});
|
||||
return { data: result.data, total: result.count };
|
||||
}
|
||||
|
||||
export async function role() {
|
||||
const result = await request<SYSTEM.Page<SYSTEM.Role>>('/api-user/roles', {
|
||||
method: 'GET',
|
||||
|
||||
Reference in New Issue
Block a user