2025-08-11 16:33:15 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 在 uniapp 的 RequestOptions 和 IUniUploadFileOptions 基础上,添加自定义参数
|
|
|
|
|
|
*/
|
|
|
|
|
|
export type CustomRequestOptions = UniApp.RequestOptions & {
|
|
|
|
|
|
query?: Record<string, any>
|
|
|
|
|
|
/** 出错时是否隐藏错误提示 */
|
|
|
|
|
|
hideErrorToast?: boolean
|
2025-12-15 14:17:33 +08:00
|
|
|
|
/** 是否返回原始数据 add by panda 25.12.10 */
|
|
|
|
|
|
original?: boolean
|
2025-08-11 16:33:15 +08:00
|
|
|
|
} & IUniUploadFileOptions // 添加uni.uploadFile参数类型
|
|
|
|
|
|
|
2025-09-23 14:56:45 +08:00
|
|
|
|
// 通用响应格式(兼容 msg + message 字段)
|
|
|
|
|
|
export type IResponse<T = any> = {
|
|
|
|
|
|
code: number
|
2025-06-22 20:00:45 +08:00
|
|
|
|
data: T
|
|
|
|
|
|
message: string
|
2025-09-23 14:56:45 +08:00
|
|
|
|
[key: string]: any // 允许额外属性
|
|
|
|
|
|
} | {
|
|
|
|
|
|
code: number
|
|
|
|
|
|
data: T
|
|
|
|
|
|
msg: string
|
|
|
|
|
|
[key: string]: any // 允许额外属性
|
2025-06-22 20:00:45 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-12-12 19:14:26 +08:00
|
|
|
|
/** 分页参数 */
|
|
|
|
|
|
export interface PageParam {
|
|
|
|
|
|
pageNo: number
|
2025-06-22 20:00:45 +08:00
|
|
|
|
pageSize: number
|
2025-12-12 19:14:26 +08:00
|
|
|
|
[key: string]: any // 允许额外属性
|
2025-06-22 20:00:45 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-12-12 19:14:26 +08:00
|
|
|
|
/** 分页结果 */
|
2025-06-22 20:00:45 +08:00
|
|
|
|
export interface PageResult<T> {
|
|
|
|
|
|
list: T[]
|
|
|
|
|
|
total: number
|
|
|
|
|
|
}
|
2025-12-15 21:55:56 +08:00
|
|
|
|
|
2025-12-15 16:33:02 +08:00
|
|
|
|
/** 加载状态枚举 - 从 wot-design-uni 重新导出 */
|
|
|
|
|
|
export type { LoadMoreState } from 'wot-design-uni/components/wd-loadmore/types'
|