index.ts 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import request from '@/config/axios'
  2. // 博物馆照片 VO
  3. export interface PhotosVO {
  4. id: number // 主键
  5. groupId: number // 照片组表id
  6. photoUrl: string // 照片存储路径
  7. createdAt: Date // 上传时间
  8. }
  9. // 博物馆照片 API
  10. export const PhotosApi = {
  11. // 查询博物馆照片分页
  12. getPhotosPage: async (params: any) => {
  13. return await request.get({ url: `/photos-manage/photos/photos`, params })
  14. },
  15. // 查询博物馆照片详情
  16. getPhotos: async (id: number) => {
  17. return await request.get({ url: `/photos-manage/photos/get?id=` + id })
  18. },
  19. // 新增博物馆照片
  20. createPhotos: async (data: PhotosVO) => {
  21. return await request.post({ url: `/photos-manage/photos/create`, data })
  22. },
  23. // 修改博物馆照片
  24. updatePhotos: async (data: PhotosVO) => {
  25. return await request.put({ url: `/photos-manage/photos/update`, data })
  26. },
  27. // 删除博物馆照片
  28. deletePhotos: async (id: number) => {
  29. return await request.delete({ url: `/photos-manage/photos/delete?id=` + id })
  30. },
  31. // 导出博物馆照片 Excel
  32. exportPhotos: async (params) => {
  33. return await request.download({ url: `/photos-manage/photos/export-excel`, params })
  34. }
  35. // getImageDetail : async (id ?: string ): Promise<any> => {
  36. // return await request.get({ url: '/photos-manage/photo-group/get?id=' + id })
  37. // }
  38. }