123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- import {
- requestByGet,
- requestByPost,
- type PaginationParams,
- } from "@dage/service";
- import type { FileItem } from ".";
- export interface CollectionThumbListItem {
- id: number;
- type: string;
- thumb: string;
- }
- export interface CollectionListParams extends PaginationParams {
- type?: string;
- }
- export interface CollectionListItem {
- id: number;
- name: string;
- thumb: string;
- /** 年代 */
- dictAge: string;
- /** 摘要 */
- digest: string;
- }
- export interface CollectionDetail extends CollectionListItem {
- rtf: string;
- size: string;
- author: string;
- files: FileItem[];
- }
- export const getCollectionThumbListApi = () => {
- return requestByGet<CollectionThumbListItem[]>("/api/show/collection/thumb");
- };
- export const getCollectionListApi = (params: CollectionListParams) => {
- return requestByPost("/api/show/collection/pageList", params);
- };
- export const getCollectionDetailApi = (id: number) => {
- return requestByGet<CollectionDetail>(`/api/show/collection/detail/${id}`);
- };
|