|
@@ -105,6 +105,7 @@ import type { TableData } from './types'
|
|
|
|
|
|
const request = useAxios()
|
|
|
|
|
|
+<<<<<<< HEAD
|
|
|
export const getTableListApi = async (params: any): Promise<IResponse> => {
|
|
|
const res = await request.get({ url: '/example/list', params })
|
|
|
return res && res.data
|
|
@@ -123,6 +124,25 @@ export const getTableDetApi = async (id: string): Promise<IResponse<TableData>>
|
|
|
export const delTableListApi = async (ids: string[] | number[]): Promise<IResponse> => {
|
|
|
const res = await request.post({ url: '/example/delete', data: { ids } })
|
|
|
return res && res.data
|
|
|
+=======
|
|
|
+export const getTableListApi = ({ params }) => {
|
|
|
+ return request.get<{
|
|
|
+ total: number
|
|
|
+ list: TableData[]
|
|
|
+ }>({ url: '/example/list', params })
|
|
|
+}
|
|
|
+
|
|
|
+export const saveTableApi = ({ data }) => {
|
|
|
+ return request.post<TableData>({ url: '/example/save', data })
|
|
|
+}
|
|
|
+
|
|
|
+export const getTableDetApi = ({ params }) => {
|
|
|
+ return request.get<TableData>({ url: '/example/detail', params })
|
|
|
+}
|
|
|
+
|
|
|
+export const delTableListApi = ({ data }) => {
|
|
|
+ return request.post({ url: '/example/delete', data })
|
|
|
+>>>>>>> 2c4729596351950077165070f44bd309003f4a55
|
|
|
}
|
|
|
|
|
|
```
|