Api.js.btl 928 B

12345678910111213141516171819202122232425262728293031323334
  1. import request from '@/utils/request'
  2. // 获取${functionName}分页
  3. export function ${classNameFirstLower}Page(data) {
  4. return request({
  5. url: '/${moduleName}/${busName}/page',
  6. method: 'get',
  7. data: data
  8. })
  9. }
  10. // 提交${functionName}表单 add为false时为编辑,默认为新增
  11. export function ${classNameFirstLower}SubmitForm(data, add = true) {
  12. return request({
  13. url: '/${moduleName}/${busName}/'+ (add ? 'add' : 'edit'),
  14. method: 'post',
  15. data: data
  16. })
  17. }
  18. // 删除${functionName}
  19. export function ${classNameFirstLower}Delete(data) {
  20. return request({
  21. url: '/${moduleName}/${busName}/delete',
  22. method: 'post',
  23. data: data
  24. })
  25. }
  26. // 获取${functionName}详情
  27. export function ${classNameFirstLower}Detail(data) {
  28. return request({
  29. url: '/${moduleName}/${busName}/detail',
  30. method: 'get',
  31. data: data
  32. })
  33. }