Q3学习计划
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
922 B

2 months ago
2 months ago
  1. /** 封装通用信息 */
  2. type BaseProfile = {
  3. /** 用户ID */
  4. id: number
  5. /** 头像 */
  6. avatar: string
  7. /** 账户名 */
  8. account: string
  9. /** 昵称 */
  10. nickname?: string
  11. }
  12. /** 小程序登录 登录用户信息 */
  13. export type LoginResult = BaseProfile & {
  14. /** 手机号 */
  15. mobile: string
  16. /** 登录凭证 */
  17. token: string
  18. }
  19. /** 个人信息 用户详情信息 */
  20. export type ProfileDetail = BaseProfile & {
  21. /** 性别 */
  22. gender?: Gender
  23. /** 生日 */
  24. birthday?: string
  25. /** 省市区 */
  26. fullLocation?: string
  27. /** 职业 */
  28. profession?: string
  29. }
  30. /** 性别 */
  31. export type Gender = '女' | '男'
  32. /** 个人信息 修改请求体参数 */
  33. export type ProfileParams = Pick<
  34. ProfileDetail,
  35. 'nickname' | 'gender' | 'birthday' | 'profession'
  36. > & {
  37. /** 省份编码 */
  38. provinceCode?: string
  39. /** 城市编码 */
  40. cityCode?: string
  41. /** 区/县编码 */
  42. countyCode?: string
  43. }