starwork-uniapp/src/typings.ts

59 lines
868 B
TypeScript
Raw Normal View History

2024-12-31 10:05:55 +08:00
// 全局要用的类型放到这里
2025-01-02 16:11:01 +08:00
export type IResData<T> = {
2024-12-31 10:58:07 +08:00
errorCode: number
errorMsg: string
2024-12-31 10:05:55 +08:00
data: T
}
// uni.uploadFile文件上传参数
type IUniUploadFileOptions = {
file?: File
files?: UniApp.UploadFileOptionFiles[]
filePath?: string
name?: string
formData?: any
}
type IUserInfo = {
nickname?: string
avatar?: string
openid?: string
token?: string
}
2024-12-31 10:58:07 +08:00
type TabBarItem = {
icon: string
title: string
isDot?: boolean
value?: number
}
type HomeTabItem = {
icon: string
title: string
id: number
}
type HomeTab = {
title: string
list: HomeTabItem[]
2024-12-31 10:05:55 +08:00
}
2025-01-02 16:11:01 +08:00
export enum AccountChannel {
phone = '1',
email = '2'
}
export enum CodeType {
login = '1',
reset = '2',
bindPhone = '3',
unbindPhone = '4',
deleteAccount = '5',
bindEmail = '6',
unbindEmail = '7',
deleteLock = '8',
updatePassword = '9'
}