baseLeagueEntity.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. import request from '@/utils/request'
  2. import qs from 'qs'
  3. export const getBaseLeagueEntitys = (params) => {
  4. return new request({
  5. url: './project/baseLeagueEntitys/',
  6. method: 'get',
  7. params: params
  8. });
  9. }
  10. export const get = (id) => {
  11. return new request({
  12. url: './project/baseLeagueEntitys/' + id,
  13. method: 'get',
  14. });
  15. }
  16. export function saveOrUpdate(baseLeagueEntity, token) {
  17. return new request({
  18. url: './project/baseLeagueEntitys',
  19. method: (baseLeagueEntity.id ? 'put' : 'post'),
  20. headers: {
  21. token
  22. },
  23. data: {
  24. baseLeagueEntity
  25. }
  26. });
  27. }
  28. export function del(id) {
  29. return new request({
  30. url: './project/baseLeagueEntitys/' + id,
  31. method: 'delete',
  32. });
  33. }
  34. export function saveBaseLeagueEntityAndInfos(baseLeagueEntity,baseLeagueInfos, token) {
  35. return new request({
  36. url: './project/baseLeagueEntitys/saveBaseLeagueEntityAndInfos',
  37. method: 'put',
  38. headers: {
  39. token
  40. },
  41. data: {
  42. baseLeagueEntity,
  43. baseLeagueInfos
  44. }
  45. });
  46. }
  47. export const getBaseLeagues = (params) => {
  48. return new request({
  49. url: './project/baseLeagueInfos/getBaseLeagues',
  50. method: 'get',
  51. params: params
  52. });
  53. }