card.ts 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. import { usePost, stringify, useGet } from "@/.cool";
  2. import type { SubjectCourseResult } from './course'
  3. import type { FileList } from '../types/index'
  4. export interface SubjectKnowledgeCardResult {
  5. id?: string
  6. name?: string
  7. subjectId?: string
  8. catalogId?: string
  9. iconPath?: string
  10. content?: string
  11. contentVoicePath?: string
  12. sortNum?: string
  13. remark?: string
  14. updateUserId?: string
  15. updateUserName?: string
  16. createdUserId?: string
  17. createdUserName?: string
  18. createdTime?: string
  19. updateTime?: string
  20. }
  21. export interface SubjectCardResult {
  22. userCardList?: string[]
  23. catalogList?: SubjectKnowledgeCardResult[]
  24. }
  25. export function getSubjectKnowledgeCardPage(parameter: any) {
  26. return useGet(`/subject/card/page`, parameter)
  27. }
  28. // export function addSubjectKnowledgeCard(parameter: SubjectKnowledgeCardResult) {
  29. // return usePost(`/subject/card`, parameter)
  30. // }
  31. // export function updateSubjectKnowledgeCard(parameter: SubjectKnowledgeCardResult) {
  32. // return usePut(`/subject/card/${parameter.id}`, parameter)
  33. // }
  34. export function fetchSubjectKnowledgeCard(parameter: any) {
  35. return useGet(`/subject/card/${parameter.id}`)
  36. }
  37. export function getSubjectKnowledgeCard(parameter: any) {
  38. return useGet(`/subject/user-card/accord/card`, parameter) as Promise<SubjectCardResult>
  39. }
  40. // export function deleteSubjectKnowledgeCards(parameter: string[]) {
  41. // return useDelete(`/subject/card`, parameter)
  42. // }
  43. // export function exportSubjectKnowledgeCard(parameter: any) {
  44. // return useGet(`/subject/card/export`, parameter, {
  45. // responseType: 'blob',
  46. // headers: {
  47. // 'Content-Type': 'application/json;charset=UTF-8',
  48. // },
  49. // })
  50. // }