index.ts 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import request from '@/config/axios'
  2. export interface UserVO {
  3. id: number
  4. avatar: string | undefined
  5. birthday: number | undefined
  6. createTime: number | undefined
  7. loginDate: number | undefined
  8. loginIp: string
  9. mark: string
  10. mobile: string
  11. name: string | undefined
  12. nickname: string | undefined
  13. registerIp: string
  14. sex: number
  15. status: number
  16. areaId: number | undefined
  17. areaName: string | undefined
  18. levelName: string | null
  19. point: number | undefined | null
  20. totalPoint: number | undefined | null
  21. experience: number | null | undefined
  22. }
  23. // 查询会员用户列表
  24. export const getUserPage = async (params) => {
  25. return await request.get({ url: `/member/user/page`, params })
  26. }
  27. // 查询会员用户详情
  28. export const getUser = async (id: number) => {
  29. return await request.get({ url: `/member/user/get?id=` + id })
  30. }
  31. // 修改会员用户
  32. export const updateUser = async (data: UserVO) => {
  33. return await request.put({ url: `/member/user/update`, data })
  34. }
  35. // 修改会员用户等级
  36. export const updateUserLevel = async (data: any) => {
  37. return await request.put({ url: `/member/user/update-level`, data })
  38. }
  39. // 修改会员用户积分
  40. export const updateUserPoint = async (data: any) => {
  41. return await request.put({ url: `/member/user/update-point`, data })
  42. }