my.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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. * @param {Object} data = {loginName用户名|pwd密码|name昵称|sex性别|phone手机号|email邮箱|portrait头像|organizationId组织类型}
  29. *
  30. */
  31. export function updateUserDetails(data) {
  32. return request({
  33. url: `/manager/userInfo/update`,
  34. method: 'post',
  35. data: data
  36. })
  37. }
  38. /*
  39. * 用户是否关注
  40. *
  41. *
  42. */
  43. export function isFans(userId) {
  44. return request({
  45. url: `/api/fans/attention/${userId}`,
  46. method: 'get'
  47. })
  48. }
  49. /*
  50. * 关注用户
  51. *
  52. *
  53. */
  54. export function attention(userId) {
  55. return request({
  56. url: `/api/fans/${userId}`,
  57. method: 'get'
  58. })
  59. }
  60. /*
  61. * 取消关注
  62. *
  63. *
  64. */
  65. export function cancelAttention(userId) {
  66. return request({
  67. url: `/api/fans/${userId}`,
  68. method: 'delete'
  69. })
  70. }
  71. /*
  72. * 获取粉丝列表
  73. *
  74. *
  75. */
  76. export function getFansListByPage(currPage, pageSize) {
  77. return request({
  78. url: `/api/fans/${currPage}/${pageSize}`,
  79. method: 'get'
  80. })
  81. }
  82. /*
  83. * 获取关注列表
  84. *
  85. *
  86. */
  87. export function getFansAttentionListByPage(currPage, pageSize) {
  88. return request({
  89. url: `/api/fans/attention/${currPage}/${pageSize}`,
  90. method: 'get'
  91. })
  92. }
  93. /*
  94. * 获取客户列表
  95. *
  96. */
  97. export function getCustomerListByPage(data) {
  98. return request({
  99. url: `/manager/client/${data.currPage}/${data.pageSize}`,
  100. method: 'post',
  101. data: data
  102. })
  103. }
  104. /*
  105. * 获取客户详情
  106. *
  107. *
  108. */
  109. export function getCustomerDetailById(id) {
  110. return request({
  111. url: `/manager/client/${id}`,
  112. method: 'get'
  113. })
  114. }