info.ts 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. import { usePost, stringify, useGet } from "@/.cool";
  2. import type { SubjectCatalogResult } from './catalog'
  3. export interface SubjectInfoResult {
  4. id?: string
  5. mainTitle?: string
  6. assistantTitle?: string
  7. content?: string
  8. subjectType?: string
  9. price?: string
  10. salePrice?: string
  11. dealNum?: string
  12. remark?: string
  13. updateUserId?: string
  14. updateUserName?: string
  15. createdUserId?: string
  16. createdUserName?: string
  17. createdTime?: string
  18. updateTime?: string
  19. interactionFlag?: boolean
  20. catalogList?: SubjectCatalogResult[]
  21. iconPath?: string
  22. }
  23. // export function getSubjectInfoPage(parameter: any) {
  24. // return useGet<GetPage<any>>(`/subject/info/page`, parameter)
  25. // }
  26. // export function addSubjectInfo(parameter: SubjectInfoResult) {
  27. // return usePost<any>(`/subject/info`, parameter)
  28. // }
  29. // export function updateSubjectInfo(parameter: SubjectInfoResult) {
  30. // return usePut<any>(`/subject/info/${parameter.id}`, parameter)
  31. // }
  32. export function fetchSubjectConfigInfo(parameter: any) {
  33. return useGet(`/subject/info/config/info/${parameter.id}`) as Promise<SubjectInfoResult>
  34. }
  35. export function fetchSubjectAppInfo(parameter: any) {
  36. return useGet(`/subject/info/app/info/${parameter.id}`) as Promise<any>
  37. }
  38. export function fetchSubjectInfo(parameter: any) {
  39. return useGet(`/subject/info/${parameter.id}`) as Promise<SubjectInfoResult>
  40. }
  41. // export function deleteSubjectInfos(parameter: string[]) {
  42. // return useDelete<any>(`/subject/info`, parameter)
  43. // }
  44. // export function exportSubjectInfo(parameter: any) {
  45. // return useGet<any>(`/subject/info/export`, parameter, {
  46. // responseType: 'blob',
  47. // headers: {
  48. // 'Content-Type': 'application/json;charset=UTF-8',
  49. // },
  50. // })
  51. // }
  52. export function querySubjectInfo(parameter: any) {
  53. return useGet(`/subject/info`, parameter) as Promise<SubjectInfoResult[]>
  54. }