company.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. import request from '@/utils/request'
  2. // 查询企业列表
  3. export function listCompany(query) {
  4. return request({
  5. url: '/company/company/list',
  6. method: 'get',
  7. params: query
  8. })
  9. }
  10. // 查询企业详细
  11. export function getCompany(companyId) {
  12. return request({
  13. url: '/company/company/' + companyId,
  14. method: 'get'
  15. })
  16. }
  17. // 新增企业
  18. export function addCompany(data) {
  19. return request({
  20. url: '/company/company',
  21. method: 'post',
  22. data: data
  23. })
  24. }
  25. export function resetPwd(companyId) {
  26. return request({
  27. url: '/company/company/resetPwd/'+companyId,
  28. method: 'post'
  29. })
  30. }
  31. // 修改企业
  32. export function updateCompany(data) {
  33. return request({
  34. url: '/company/company',
  35. method: 'put',
  36. data: data
  37. })
  38. }
  39. // 删除企业
  40. export function delCompany(companyId) {
  41. return request({
  42. url: '/company/company/' + companyId,
  43. method: 'delete'
  44. })
  45. }
  46. // 导出企业
  47. export function exportCompany(query) {
  48. return request({
  49. url: '/company/company/export',
  50. method: 'get',
  51. params: query
  52. })
  53. }
  54. export function getCompanyList() {
  55. return request({
  56. url: '/company/company/getCompanyList',
  57. method: 'get'
  58. })
  59. }
  60. export function recharge(data) {
  61. return request({
  62. url: '/company/company/recharge',
  63. method: 'post',
  64. data: data
  65. })
  66. }
  67. export function deduct(data) {
  68. return request({
  69. url: '/company/company/deduct',
  70. method: 'post',
  71. data: data
  72. })
  73. }