typings.d.ts 731 B

12345678910111213141516171819202122232425262728293031323334353637
  1. // 全局要用的类型放到这里
  2. declare global {
  3. type IResData<T> = {
  4. code: number
  5. msg: string
  6. data: T
  7. }
  8. // uni.uploadFile文件上传参数
  9. type IUniUploadFileOptions = {
  10. file?: File
  11. files?: UniApp.UploadFileOptionFiles[]
  12. filePath?: string
  13. name?: string
  14. formData?: any
  15. }
  16. type IUserInfo = {
  17. token?: string
  18. userid?: string
  19. username?: string
  20. realname?: string
  21. welcome?: string
  22. avatar?: string
  23. tenantId?: string | number
  24. sex?: number
  25. phone?: string
  26. email?: string
  27. /** 微信的 openid,非微信没有这个字段 */
  28. openid?: string
  29. // 存到本地的时间戳
  30. localStorageTime: number
  31. }
  32. }
  33. export {} // 防止模块污染