my.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. import {
  2. request
  3. } from '@/request/request.js';
  4. /*
  5. * 获取关注数量
  6. *
  7. *
  8. */
  9. export function getMyCount() {
  10. return request({
  11. url: `/api/fans/count`,
  12. method: 'get'
  13. })
  14. }
  15. /*
  16. * 获取用户信息
  17. *
  18. *
  19. */
  20. export function getUserInfoById(userId) {
  21. return request({
  22. url: `/manager/userInfo/${userId}`,
  23. method: 'get'
  24. })
  25. }
  26. /*
  27. * 用户是否关注
  28. *
  29. *
  30. */
  31. export function isFans(userId) {
  32. return request({
  33. url: `/api/fans/attention/${userId}`,
  34. method: 'get'
  35. })
  36. }
  37. /*
  38. * 关注用户
  39. *
  40. *
  41. */
  42. export function attention(userId) {
  43. return request({
  44. url: `/api/fans/${userId}`,
  45. method: 'get'
  46. })
  47. }
  48. /*
  49. * 取消关注
  50. *
  51. *
  52. */
  53. export function cancelAttention(userId) {
  54. return request({
  55. url: `/api/fans/${userId}`,
  56. method: 'delete'
  57. })
  58. }
  59. /*
  60. * 获取粉丝列表
  61. *
  62. *
  63. */
  64. export function getFansListByPage(currPage, pageSize) {
  65. return request({
  66. url: `/api/fans/${currPage}/${pageSize}`,
  67. method: 'get'
  68. })
  69. }
  70. /*
  71. * 获取关注列表
  72. *
  73. *
  74. */
  75. export function getFansAttentionListByPage(currPage, pageSize) {
  76. return request({
  77. url: `/api/fans/attention/${currPage}/${pageSize}`,
  78. method: 'get'
  79. })
  80. }
  81. /*
  82. * 获取客户列表
  83. *
  84. */
  85. export function getCustomerListByPage(data) {
  86. return request({
  87. url: `/manager/client/${data.currPage}/${data.pageSize}`,
  88. method: 'post',
  89. data: data
  90. })
  91. }
  92. /*
  93. * 获取客户详情
  94. *
  95. *
  96. */
  97. export function getCustomerDetailById(id) {
  98. return request({
  99. url: `/manager/client/${id}`,
  100. method: 'get'
  101. })
  102. }