Blame view

urbanops-module-infra/src/main/resources/codegen/vue3_vben/api/api.ts.vm 1.01 KB
2f252ffd   王彪总   feat(pay): 实现支付宝支...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
  import { defHttp } from '@/utils/http/axios'
  #set ($baseURL = "/${table.moduleName}/${simpleClassName_strikeCase}")
  
  // 查询${table.classComment}列表
  export function get${simpleClassName}Page(params) {
    return defHttp.get({ url: '${baseURL}/page', params })
  }
  
  // 查询${table.classComment}详情
  export function get${simpleClassName}(id: number) {
    return defHttp.get({ url: `${baseURL}/get?id=${id}` })
  }
  
  // 新增${table.classComment}
  export function create${simpleClassName}(data) {
    return defHttp.post({ url: '${baseURL}/create', data })
  }
  
  // 修改${table.classComment}
  export function update${simpleClassName}(data) {
    return defHttp.put({ url: '${baseURL}/update', data })
  }
  
  // 删除${table.classComment}
  export function delete${simpleClassName}(id: number) {
    return defHttp.delete({ url: `${baseURL}/delete?id=${id}` })
  }
  
  // 导出${table.classComment} Excel
  export function export${simpleClassName}(params) {
    return defHttp.download({ url: '${baseURL}/export-excel', params }, '${table.classComment}.xls')
  }