starwork-uniapp/src/typings.ts

30 lines
469 B
TypeScript
Raw Normal View History

2024-12-31 10:05:55 +08:00
// 全局要用的类型放到这里
type IResData<T> = {
code: number
msg: string
data: T
}
// uni.uploadFile文件上传参数
type IUniUploadFileOptions = {
file?: File
files?: UniApp.UploadFileOptionFiles[]
filePath?: string
name?: string
formData?: any
}
type IUserInfo = {
nickname?: string
avatar?: string
/** 微信的 openid非微信没有这个字段 */
openid?: string
token?: string
}
enum TestEnum {
A = 'a',
2024-12-31 10:19:20 +08:00
B = 'b'
2024-12-31 10:05:55 +08:00
}