Blame view

yudao-ui-admin-vue3/src/api/system/errorCode/index.ts 1004 Bytes
9e2e220b   xingyu   refactor: vue3 ax...
1
  import { useAxios } from '@/hooks/web/useAxios'
80a3ae8d   xingyu   feat: add vue3(el...
2
3
  import type { ErrorCodeVO } from './types'
  
9e2e220b   xingyu   refactor: vue3 ax...
4
5
  const request = useAxios()
  
80a3ae8d   xingyu   feat: add vue3(el...
6
  // 查询错误码列表
9e2e220b   xingyu   refactor: vue3 ax...
7
8
  export const getErrorCodePageApi = (params) => {
    return request.get({ url: '/system/error-code/page', params })
80a3ae8d   xingyu   feat: add vue3(el...
9
10
11
12
  }
  
  // 查询错误码详情
  export const getErrorCodeApi = (id: number) => {
9e2e220b   xingyu   refactor: vue3 ax...
13
    return request.get({ url: '/system/error-code/get?id=' + id })
80a3ae8d   xingyu   feat: add vue3(el...
14
15
16
  }
  
  // 新增错误码
9e2e220b   xingyu   refactor: vue3 ax...
17
18
  export const createErrorCodeApi = (data: ErrorCodeVO) => {
    return request.post({ url: '/system/error-code/create', data })
80a3ae8d   xingyu   feat: add vue3(el...
19
20
21
  }
  
  // 修改错误码
9e2e220b   xingyu   refactor: vue3 ax...
22
23
  export const updateErrorCodeApi = (data: ErrorCodeVO) => {
    return request.put({ url: '/system/error-code/update', data })
80a3ae8d   xingyu   feat: add vue3(el...
24
25
26
27
  }
  
  // 删除错误码
  export const deleteErrorCodeApi = (id: number) => {
9e2e220b   xingyu   refactor: vue3 ax...
28
    return request.delete({ url: '/system/error-code/delete?id=' + id })
80a3ae8d   xingyu   feat: add vue3(el...
29
30
31
  }
  // 导出错误码
  export const excelErrorCodeApi = (params) => {
9e2e220b   xingyu   refactor: vue3 ax...
32
    return request.get({ url: '/system/error-code/export-excel', params, responseType: 'blob' })
80a3ae8d   xingyu   feat: add vue3(el...
33
  }