sellerAccount.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. import { requestApi } from '../util/network'
  2. // 获取店铺账户组列表
  3. export const getSellerAccountGroupList =
  4. () =>
  5. requestApi(
  6. '/Selleraccount/group_list',
  7. 'POST',
  8. {
  9. 'client_type': 'wap'
  10. },
  11. 'seller'
  12. )
  13. // 获取店铺子账户列表
  14. export const getSellerAccountList =
  15. () =>
  16. requestApi(
  17. '/Selleraccount/account_list',
  18. 'POST',
  19. {
  20. 'client_type': 'wap'
  21. },
  22. 'seller'
  23. )
  24. // 获取店铺单个子账户信息
  25. export const getSellerAccountInfo =
  26. (sellerId) =>
  27. requestApi(
  28. '/Selleraccount/account_info',
  29. 'POST',
  30. {
  31. 'seller_id': sellerId,
  32. 'client_type': 'wap'
  33. },
  34. 'seller'
  35. )
  36. // 删除店铺子账户
  37. export const delSellerAccount =
  38. (sellerId) =>
  39. requestApi(
  40. '/Selleraccount/account_del',
  41. 'POST',
  42. {
  43. 'seller_id': sellerId,
  44. 'client_type': 'wap'
  45. },
  46. 'seller'
  47. )
  48. // 编辑店铺子账户
  49. export const editSellerAccount =
  50. (data) =>
  51. requestApi(
  52. '/Selleraccount/account_edit',
  53. 'POST',
  54. {
  55. 'seller_id': data.seller_id,
  56. 'group_id': data.sellergroup_id,
  57. 'client_type': 'wap'
  58. },
  59. 'seller'
  60. )
  61. // 新增店铺子账户
  62. export const addSellerAccount =
  63. (data) =>
  64. requestApi(
  65. '/Selleraccount/account_add',
  66. 'POST',
  67. {
  68. 'member_name': data.member_name,
  69. 'password': data.password,
  70. 'seller_name': data.seller_name,
  71. 'group_id': data.sellergroup_id,
  72. 'client_type': 'wap'
  73. },
  74. 'seller'
  75. )