folder-type.ts 534 B

123456789101112131415161718192021222324
  1. import { FOLDER_TYPE_LIST } from "./constant";
  2. import axios from "./instance";
  3. export interface FloderType {
  4. filesTypeId: number;
  5. filesTypeName: string;
  6. parentId: number;
  7. modalShow?: boolean;
  8. flatShow?: boolean;
  9. }
  10. export type FloderTypes = FloderType[];
  11. export const fetchFloderTypes = async () => {
  12. const types = await axios.get<FloderTypes>(FOLDER_TYPE_LIST);
  13. types.push({
  14. filesTypeId: -1,
  15. filesTypeName: "照片制卷",
  16. flatShow: false,
  17. modalShow: false,
  18. parentId: 39,
  19. });
  20. return types;
  21. };