index.ts 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * @Author: 半生瓜 1515706227@qq.com
  3. * @Date: 2024-05-07 10:39:27
  4. * @LastEditors: 半生瓜 1515706227@qq.com
  5. * @LastEditTime: 2024-05-15 10:11:30
  6. * @FilePath: \vue-element-plus-admin-mini\src\api\table\index.ts
  7. * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  8. */
  9. import request from '@/axios'
  10. import type { TableData } from './types'
  11. export const getTableListApi = (params: any) => {
  12. return request.get({ url: '/mock/example/list', params })
  13. }
  14. export const getCardTableListApi = (params: any) => {
  15. return request.get({ url: '/mock/card/list', params })
  16. }
  17. export const getTreeTableListApi = (params: any) => {
  18. return request.get({ url: '/mock/example/treeList', params })
  19. }
  20. //查询全部产品配置参数接口
  21. export const getSystem = () => {
  22. return request.post({ url: '/config/manage/all' })
  23. }
  24. //查询活动公告接口
  25. export const getBulletin = () => {
  26. return request.post({ url: '/bulletin/manage/all' })
  27. }
  28. //保存活动公告接口
  29. export const saveBulletin = (params) => {
  30. return request.post({ url: '/bulletin/manage/save', data: params })
  31. }
  32. //模板上传接口
  33. export const upTemplate = (params: any) => {
  34. return request.post({ url: '/zone/template/uploadTemplateZip', params })
  35. }
  36. //保存系统设置接口
  37. export const saveSystem = (params: any) => {
  38. return request.post({ url: '/config/manage/update', data: params })
  39. }
  40. //删除活动公告
  41. export const deleteBulletin = (params: any) => {
  42. return request.post({ url: '/bulletin/manage/delete', params })
  43. }
  44. export const saveTableApi = (data: Partial<TableData>): Promise<IResponse> => {
  45. return request.post({ url: '/mock/example/save', data })
  46. }
  47. export const getTableDetApi = (id: string): Promise<IResponse<TableData>> => {
  48. return request.get({ url: '/mock/example/detail', params: { id } })
  49. }
  50. export const delTableListApi = (ids: string[] | number[]): Promise<IResponse> => {
  51. return request.post({ url: '/mock/example/delete', data: { ids } })
  52. }