typings.d.ts 761 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // 全局要用的类型放到这里
  2. declare global {
  3. type IResData<T> = {
  4. Status: number
  5. Message: string
  6. Data: T
  7. OtherData?: any
  8. }
  9. // uni.uploadFile文件上传参数
  10. type IUniUploadFileOptions = {
  11. file?: File
  12. files?: UniApp.UploadFileOptionFiles[]
  13. filePath?: string
  14. name?: string
  15. formData?: any
  16. }
  17. type IUserInfo = {
  18. nickName?: string
  19. avatarUrl?: string
  20. /** 微信的 openid,非微信没有这个字段 */
  21. openid?: string
  22. token?: string
  23. gender?: number
  24. language?: string
  25. city?: string
  26. province?: string
  27. country?: string
  28. is_demote?: boolean
  29. }
  30. type IAppInfo = {
  31. token?: string
  32. userid?: string
  33. openid?: string
  34. }
  35. }
  36. export {} // 防止模块污染