memberFriend.js 939 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import { requestApi } from '../util/network'
  2. // 添加好友
  3. export const addFriend =
  4. (mId) =>
  5. requestApi(
  6. '/Membersnsfriend/friend_add',
  7. 'POST',
  8. {
  9. m_id: mId
  10. },
  11. 'member'
  12. )
  13. export const delFriend =
  14. (mId) =>
  15. requestApi(
  16. '/Membersnsfriend/friend_del',
  17. 'POST',
  18. {
  19. m_id: mId
  20. },
  21. 'member'
  22. )
  23. // 好友列表
  24. export const getFriendList =
  25. (params) =>
  26. requestApi(
  27. '/Membersnsfriend/friend_list',
  28. 'POST',
  29. {
  30. page: params.page,
  31. per_page: params.per_page
  32. },
  33. 'member'
  34. )
  35. // 好友列表
  36. export const searchFriend =
  37. (params, mName) =>
  38. requestApi(
  39. '/Membersnsfriend/member_list',
  40. 'POST',
  41. {
  42. page: params.page,
  43. per_page: params.per_page,
  44. m_name: mName
  45. },
  46. 'member'
  47. )