修改用户搜索的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 type { ProColumns } from '@ant-design/pro-components';
|
||||||
import {
|
import {
|
||||||
ProFormSelect,
|
ProFormSelect,
|
||||||
@@ -88,7 +88,7 @@ const TableList: React.FC = () => {
|
|||||||
<ProTable<SYSTEM.User>
|
<ProTable<SYSTEM.User>
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
headerTitle="用户管理"
|
headerTitle="用户管理"
|
||||||
request={user}
|
request={userSearch}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
search={false}
|
search={false}
|
||||||
params={params}
|
params={params}
|
||||||
|
|||||||
@@ -78,6 +78,15 @@ export async function importImage(formData: FormData) {
|
|||||||
return result;
|
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() {
|
export async function role() {
|
||||||
const result = await request<SYSTEM.Page<SYSTEM.Role>>('/api-user/roles', {
|
const result = await request<SYSTEM.Page<SYSTEM.Role>>('/api-user/roles', {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
|
|||||||
Reference in New Issue
Block a user