feat: 大量升级,v2.0.0
This commit is contained in:
23
src/service/index/foo.ts
Normal file
23
src/service/index/foo.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { http } from '@/utils/http'
|
||||
import type { IFooItem } from './foo.d'
|
||||
|
||||
export { IFooItem }
|
||||
|
||||
/** get 请求 */
|
||||
export const getFooAPI = (name: string) => {
|
||||
return http<IFooItem>({
|
||||
url: `/foo`,
|
||||
method: 'GET',
|
||||
query: { name },
|
||||
})
|
||||
}
|
||||
|
||||
/** get 请求 */
|
||||
export const postFooAPI = (name: string) => {
|
||||
return http<IFooItem>({
|
||||
url: `/foo`,
|
||||
method: 'POST',
|
||||
query: { name }, // post 请求也支持 query
|
||||
data: { name },
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user