diff --git a/src/api/material.ts b/src/api/material.ts index ec5fdb3..2f28160 100644 --- a/src/api/material.ts +++ b/src/api/material.ts @@ -11,8 +11,10 @@ import fetch from '@/utils/axios' export const getKinds = (params: Type.Object = {}) => fetch('design/cate', params) type TGetListParam = { - cate: number - pageSize: number + first_id?: number + second_id?: string + cate?: number + pageSize?: number } export type TGetListData = { diff --git a/src/utils/axios.ts b/src/utils/axios.ts index 68a49af..e654366 100644 --- a/src/utils/axios.ts +++ b/src/utils/axios.ts @@ -85,7 +85,7 @@ const fetch = ( type: TFetchMethod = 'get', exheaders: Record = {}, extra: Record = {} -): Promise> => { +): Promise => { if (params?._noLoading) { delete params._noLoading } else { @@ -106,7 +106,7 @@ const fetch = ( return axios[type](url, params, { headers: Object.assign(headerObject, exheaders), ...extra, - }) as Promise> + }) as Promise } }