withdrawAccount.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. import request from '../utils/request'
  2. const app=getApp()
  3. /**
  4. * 获取账户列表
  5. * @param params
  6. * @returns {Promise<any>}
  7. */
  8. export function getList(params) {
  9. return request({
  10. url: 'care/seller/rebate/rebate_account/page',
  11. method: 'POST',
  12. loading: false,
  13. needToken:true,
  14. data: params,
  15. headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
  16. })
  17. }
  18. /**
  19. * 获取机构提现账户列表
  20. * @param shopid
  21. */
  22. export function getListByShopId(shopid) {
  23. return request({
  24. url: `care/seller/rebate/rebate_account/list/${shopid}`,
  25. needToken:true,
  26. method: 'get'
  27. })
  28. }
  29. /** 新增账户 */
  30. export function add(params) {
  31. return request({
  32. url: 'care/seller/rebate/rebate_account',
  33. method: 'POST',
  34. needToken:true,
  35. loading: true,
  36. data: params
  37. })
  38. }
  39. /** 删除账户 */
  40. export function deletes(params) {
  41. const ids = params.toString()
  42. return request({
  43. url: `care/seller/rebate/rebate_account/${ids}`,
  44. method: 'DELETE',
  45. needToken:true,
  46. loading: true,
  47. data: params
  48. })
  49. }
  50. /** 更新账户 */
  51. export function update(id, params) {
  52. return request({
  53. url: `care/seller/rebate/rebate_account/${id}`,
  54. method: 'put',
  55. needToken:true,
  56. data: params
  57. })
  58. }
  59. /** 查询单个账户 */
  60. export function get(id, params) {
  61. return request({
  62. url: `care/seller/rebate/rebate_account/${id}`,
  63. method: 'get',
  64. needToken:true,
  65. loading: false,
  66. params
  67. })
  68. }