chore: 类型文件统一加前缀 I

This commit is contained in:
菲鸽
2024-02-01 15:35:41 +08:00
parent ff2eee6613
commit 1b7ae81550
3 changed files with 8 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
export type FooItem = {
export type IFooItem = {
id: string
name: string
}

View File

@@ -1,11 +1,11 @@
import { http } from '@/utils/http'
import type { FooItem } from './foo.d'
import type { IFooItem } from './foo.d'
export { FooItem }
export { IFooItem }
/** get 请求 */
export const getFoo = (name: string) => {
return http<FooItem>({
return http<IFooItem>({
url: `/foo`,
method: 'GET',
query: { name },
@@ -14,7 +14,7 @@ export const getFoo = (name: string) => {
/** get 请求 */
export const postFoo = (name: string) => {
return http<FooItem>({
return http<IFooItem>({
url: `/foo`,
method: 'POST',
query: { name }, // post 请求也支持 query