user.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. import request from '@/utils/request'
  2. // 查询用户列表
  3. export function listUser(query) {
  4. return request({
  5. url: '/yq/gas/user/getList',
  6. method: 'get',
  7. params: query
  8. })
  9. }
  10. // 查询用户详细
  11. export function getUser(id) {
  12. return request({
  13. url: '/yq/gas/user/' + id,
  14. method: 'get'
  15. })
  16. }
  17. // 新增用户
  18. export function addUser(data) {
  19. return request({
  20. url: '/yq/gas/user',
  21. method: 'post',
  22. data: data
  23. })
  24. }
  25. // 修改用户
  26. export function updateUser(data) {
  27. return request({
  28. url: '/yq/gas/user',
  29. method: 'put',
  30. data: data
  31. })
  32. }
  33. // 删除用户
  34. export function delUser(id) {
  35. return request({
  36. url: '/yq/gas/user/' + id,
  37. method: 'delete'
  38. })
  39. }
  40. // 黑名单管理列表
  41. export function getBlacklist(query) {
  42. return request({
  43. url: '/yq/gas/user/getBlacklist',
  44. method: 'get',
  45. params: query
  46. })
  47. }
  48. // 手机号验证
  49. export function getForPhone(value,id) {
  50. return request({
  51. url: '/yq/gas/user/getForPhone?phone='+value+'&id='+id,
  52. method: 'get',
  53. })
  54. }
  55. // 工号验证
  56. export function getForJobnum(value,id) {
  57. return request({
  58. url: '/yq/gas/user/getForJobnum?jobNum='+value+'&id='+id,
  59. method: 'get',
  60. })
  61. }