import { usePost, stringify, useGet } from "@/.cool"; import type { SubjectCourseResult } from './course' import type { FileList } from '../types/index' import type { SubjectCatalogResult } from '@/services/subject/catalog' export interface SubjectKnowledgeCardResult { id?: string name?: string cardName?: string subjectId?: string catalogId?: string iconPath?: string content?: string contentVoicePath?: string sortNum?: string remark?: string updateUserId?: string updateUserName?: string createdUserId?: string createdUserName?: string createdTime?: string userCardId?: string updateTime?: string } export interface SubjectCardResult { userCardList?: SubjectKnowledgeCardResult[] catalogList?: SubjectCatalogResult[] } export function getSubjectKnowledgeCardPage(parameter: any) { return useGet(`/subject/card/page`, parameter) } // export function addSubjectKnowledgeCard(parameter: SubjectKnowledgeCardResult) { // return usePost(`/subject/card`, parameter) // } // export function updateSubjectKnowledgeCard(parameter: SubjectKnowledgeCardResult) { // return usePut(`/subject/card/${parameter.id}`, parameter) // } export function fetchSubjectKnowledgeCard(parameter: any) { return useGet(`/subject/card/${parameter.id}`) } export function getSubjectKnowledgeCard(parameter: any) { return useGet(`/subject/user-card/accord/card`, parameter) as Promise } // export function deleteSubjectKnowledgeCards(parameter: string[]) { // return useDelete(`/subject/card`, parameter) // } // export function exportSubjectKnowledgeCard(parameter: any) { // return useGet(`/subject/card/export`, parameter, { // responseType: 'blob', // headers: { // 'Content-Type': 'application/json;charset=UTF-8', // }, // }) // }