starwork-uniapp/src/typings.ts

51 lines
703 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
}
2025-01-02 19:26:12 +08:00
export type TabBarItem = {
2024-12-31 10:58:07 +08:00
icon: string
title: string
isDot?: boolean
value?: number
}
2025-01-02 19:26:12 +08:00
export type HomeTabItem = {
2024-12-31 10:58:07 +08:00
icon: string
name: string
2025-01-07 17:12:46 +08:00
url?: string
2024-12-31 10:58:07 +08:00
id: number
}
2025-01-02 19:26:12 +08:00
export type HomeTab = {
name: string
2024-12-31 10:58:07 +08:00
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'
}
2025-01-02 19:26:12 +08:00
export enum PlatId {
web = 1,
app = 2,
miniProgram = 3,
pc = 4
}