chore: 优化代码结构,将 CustomRequestOptions 定义到 http/types.ts 下
This commit is contained in:
@@ -1,14 +1,9 @@
|
||||
import type { CustomRequestOptions } from '@/http/types'
|
||||
import { useUserStore } from '@/store'
|
||||
import { getEnvBaseUrl } from '@/utils'
|
||||
import { platform } from '@/utils/platform'
|
||||
import { stringifyQuery } from './tools/queryString'
|
||||
|
||||
export type CustomRequestOptions = UniApp.RequestOptions & {
|
||||
query?: Record<string, any>
|
||||
/** 出错时是否隐藏错误提示 */
|
||||
hideErrorToast?: boolean
|
||||
} & IUniUploadFileOptions // 添加uni.uploadFile参数类型
|
||||
|
||||
// 请求基准地址
|
||||
const baseUrl = getEnvBaseUrl()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user