info.ts 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. }
  22. // export function getSubjectInfoPage(parameter: any) {
  23. // return useGet<GetPage<any>>(`/subject/info/page`, parameter)
  24. // }
  25. // export function addSubjectInfo(parameter: SubjectInfoResult) {
  26. // return usePost<any>(`/subject/info`, parameter)
  27. // }
  28. // export function updateSubjectInfo(parameter: SubjectInfoResult) {
  29. // return usePut<any>(`/subject/info/${parameter.id}`, parameter)
  30. // }
  31. export function fetchSubjectConfigInfo(parameter: any) {
  32. return useGet(`/subject/info/config/info/${parameter.id}`) as Promise<SubjectInfoResult>
  33. }
  34. export function fetchSubjectInfo(parameter: any) {
  35. return useGet(`/subject/info/${parameter.id}`) as Promise<SubjectInfoResult>
  36. }
  37. // export function deleteSubjectInfos(parameter: string[]) {
  38. // return useDelete<any>(`/subject/info`, parameter)
  39. // }
  40. // export function exportSubjectInfo(parameter: any) {
  41. // return useGet<any>(`/subject/info/export`, parameter, {
  42. // responseType: 'blob',
  43. // headers: {
  44. // 'Content-Type': 'application/json;charset=UTF-8',
  45. // },
  46. // })
  47. // }