Api.js.vm 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. ## export const ${moduleVar}Api = {
  2. // 添加${tableDesc} @author ${author}
  3. export const add${moduleClass}= (ajax,data) => {
  4. return ajax.request({
  5. url: '/${moduleVar}/add',
  6. data,
  7. method: 'post'
  8. });
  9. }
  10. // 分页查询${tableDesc} @author ${author}
  11. export const query${moduleClass}= (ajax,data) => {
  12. return ajax.request({
  13. url: '/${moduleVar}/page/query',
  14. data,
  15. method: 'post'
  16. });
  17. }
  18. // 批量删除${tableDesc} @author ${author}
  19. export const batchDelete${moduleClass}= (ajax,idList) => {
  20. return ajax.request({
  21. url: '/${moduleVar}/deleteByIds',
  22. data:idList,
  23. method: 'post'
  24. });
  25. }
  26. // 修改${tableDesc} @author ${author}
  27. export const update${moduleClass}= (ajax,data) => {
  28. return ajax.request({
  29. url: '/${moduleVar}/update',
  30. data,
  31. method: 'post'
  32. });
  33. }
  34. // 导出全部 @author ${author}
  35. ## export const exportAll:(ajax,data)=>{
  36. ## return postDownloadAxios('/${moduleVar}/export/all',data);
  37. ## }
  38. ## // 批量导出 @author ${author}
  39. ## export const batchExport: (ajax,idList) => {
  40. ## return postDownloadAxios('/${moduleVar}/export/batch', idList);
  41. ## }
  42. ## };