user.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. import request from '@/utils/request'
  2. // 首页用户统计
  3. export function indexStatics(query) {
  4. return request({
  5. url: '/business/tran_record/count',
  6. method: 'get',
  7. params: query
  8. })
  9. }
  10. // 查询app用户列表
  11. export function listUser(query) {
  12. return request({
  13. url: '/business/user/list',
  14. method: 'get',
  15. params: query
  16. })
  17. }
  18. // 查询app用户列表
  19. export function channelList() {
  20. return request({
  21. url: '/business/channel/allList',
  22. method: 'get',
  23. // params: query
  24. })
  25. }
  26. // 查询app用户详细
  27. export function getUser(userid) {
  28. return request({
  29. url: '/business/user/' + userid,
  30. method: 'get'
  31. })
  32. }
  33. // 新增app用户
  34. export function addUser(data) {
  35. return request({
  36. url: '/business/user',
  37. method: 'post',
  38. data: data
  39. })
  40. }
  41. // 修改app用户
  42. export function updateUser(data) {
  43. return request({
  44. url: '/business/user',
  45. method: 'put',
  46. data: data
  47. })
  48. }
  49. // 删除app用户
  50. export function delUser(userid) {
  51. return request({
  52. url: '/business/user/' + userid,
  53. method: 'delete'
  54. })
  55. }
  56. // 重置密码
  57. export function resetUser(data) {
  58. return request({
  59. url: '/business/user/restPwd',
  60. method: 'post',
  61. data: data
  62. })
  63. }
  64. // 充值
  65. export function userCharge(data) {
  66. return request({
  67. url: '/business/user/charge',
  68. method: 'post',
  69. data: data
  70. })
  71. }