wallet.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. import request from '@/utils/request'
  2. // 获取用户消费记录
  3. export function spreadCommission(data, state) {
  4. return request({
  5. url: '/api/spread/commission/' + state,
  6. method: 'get',
  7. data
  8. });
  9. }
  10. // 获取账户余额
  11. export function userBalance(data) {
  12. return request({
  13. url: '/api/user/balance',
  14. method: 'get',
  15. data
  16. });
  17. }
  18. export function wallet(data) {
  19. return request({
  20. url: '/api/wallet',
  21. method: 'get',
  22. data
  23. });
  24. }
  25. // 提现
  26. export function extractCash(data) {
  27. return request({
  28. url: '/api/extract/cash',
  29. method: 'post',
  30. data
  31. });
  32. }
  33. // 提现
  34. export function exchangeCash(data) {
  35. return request({
  36. url: '/api/extract/brokerage',
  37. method: 'post',
  38. data
  39. });
  40. }
  41. // 提现信息
  42. export function extractBank(data) {
  43. return request({
  44. url: '/api/extract/bank',
  45. method: 'get',
  46. data
  47. });
  48. }
  49. // #ifdef H5
  50. // 公众号充值
  51. export function rechargeWechat(data) {
  52. return request({
  53. url: '/api/recharge/wechat',
  54. method: 'post',
  55. data
  56. });
  57. }
  58. // #endif
  59. // #ifdef MP
  60. // 小程序充值
  61. export function rechargeRoutine(data) {
  62. return request({
  63. url: '/api/recharge/routine',
  64. method: 'post',
  65. data
  66. });
  67. }
  68. // #endif
  69. // 获取提现支付宝账号
  70. export function aliInfo(data) {
  71. return request({
  72. url: '/api/ali/info',
  73. method: 'get',
  74. data
  75. });
  76. }
  77. //获取默认银行卡账号
  78. export function bankInfo(data) {
  79. return request({
  80. url: '/api/bank/info',
  81. method: 'get',
  82. data
  83. });
  84. }
  85. // 保存提现支付宝账号
  86. export function setAliInfo(data) {
  87. return request({
  88. url: '/api/ali/edit',
  89. method: 'post',
  90. data
  91. });
  92. }
  93. //保存默认银行卡账号
  94. export function setBankInfo(data) {
  95. return request({
  96. url: '/api/bank/edit',
  97. method: 'post',
  98. data
  99. });
  100. }
  101. // 账户余额
  102. export function balance(data) {
  103. return request({
  104. url: '/api/user/balance',
  105. method: 'get',
  106. data
  107. });
  108. }
  109. // 账户余额
  110. export function cashList(data) {
  111. return request({
  112. url: '/api/voucher/list',
  113. method: 'get',
  114. data
  115. });
  116. }
  117. //充值金额
  118. export function moneyChong(data) {
  119. return request({
  120. url: '/api/recharge/index',
  121. method: 'get',
  122. data
  123. })
  124. }
  125. // 分红额度列表
  126. export function tradeList(data) {
  127. return request({
  128. url: '/api/award_range/list',
  129. method: 'get',
  130. data
  131. });
  132. }
  133. // 分红额度转账
  134. export function trade(data) {
  135. return request({
  136. url: '/api/trade',
  137. method: 'post',
  138. data
  139. });
  140. }