// 全局要用的类型放到这里

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
  /** 扩展的 */
  sex?: number
  userId?: number
  accessToken?: string
  refreshToken?: string
  expiresTime?: any
  userStatusEnabled?: boolean
  point?: number
  level?: { cardCode: string; icon: string; level: number; name: string; point: number }
  userAuthStatus?: 0 | 1 | 2
  mobile?: string
  birthday?: number
}

enum TestEnum {
  A = 'a',
  B = 'b',
}
