wallet.js 2.2 KB

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