wallet.js 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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. // 提现
  19. export function extractCash(data) {
  20. return request({
  21. url: '/api/extract/cash',
  22. method: 'post',
  23. data
  24. });
  25. }
  26. // 提现信息
  27. export function extractBank(data) {
  28. return request({
  29. url: '/api/extract/bank',
  30. method: 'get',
  31. data
  32. });
  33. }
  34. // #ifdef H5
  35. // 公众号充值
  36. export function rechargeWechat(data) {
  37. return request({
  38. url: '/api/recharge/wechat',
  39. method: 'post',
  40. data
  41. });
  42. }
  43. // #endif
  44. // #ifdef MP
  45. // 小程序充值
  46. export function rechargeRoutine(data) {
  47. return request({
  48. url: '/api/recharge/routine',
  49. method: 'post',
  50. data
  51. });
  52. }
  53. // #endif
  54. // #ifdef APP
  55. // 支付宝支付
  56. export function aliPay(data) {
  57. return request({
  58. url: '/api/recharge/ali',
  59. method: 'post',
  60. data
  61. });
  62. }
  63. // 微信支付
  64. export function wxPay(data) {
  65. return request({
  66. url: '/api/recharge/wxapp',
  67. method: 'post',
  68. data
  69. });
  70. }
  71. // #endif
  72. // 佣金充值余额
  73. export function commissionPay(data) {
  74. return request({
  75. url: '/api/recharge/brokerage',
  76. method: 'post',
  77. data
  78. });
  79. }
  80. // 获取提现支付宝账号
  81. export function aliInfo(data) {
  82. return request({
  83. url: '/api/ali/info',
  84. method: 'get',
  85. data
  86. });
  87. }
  88. //获取默认银行卡账号
  89. export function bankInfo(data) {
  90. return request({
  91. url: '/api/bank/info',
  92. method: 'get',
  93. data
  94. });
  95. }
  96. // 保存提现支付宝账号
  97. export function setAliInfo(data) {
  98. return request({
  99. url: '/api/ali/edit',
  100. method: 'post',
  101. data
  102. });
  103. }
  104. //保存默认银行卡账号
  105. export function setBankInfo(data) {
  106. return request({
  107. url: '/api/bank/edit',
  108. method: 'post',
  109. data
  110. });
  111. }
  112. // 账户余额
  113. export function balance(data) {
  114. return request({
  115. url: '/api/user/balance',
  116. method: 'get',
  117. data
  118. });
  119. }
  120. // 充值分类金额
  121. export function rechargeIndex(data) {
  122. return request({
  123. url: '/api/recharge/index',
  124. method: 'get',
  125. data
  126. });
  127. }