model.ts 540 B

12345678910111213141516171819202122232425262728293031
  1. import axios from './instance'
  2. import {
  3. MODEL_LIST
  4. } from './constant'
  5. export enum ModelType {
  6. SWKK,
  7. SWKJ,
  8. SWSS,
  9. SWMX,
  10. }
  11. export const ModelTypeDesc: Record<ModelType, string> = {
  12. [ModelType.SWKK]: '四维看看',
  13. [ModelType.SWKJ]: '四维看见',
  14. [ModelType.SWSS]: '四维深时',
  15. [ModelType.SWMX]: '三维模型',
  16. }
  17. export interface Model {
  18. id: string
  19. title: string
  20. type: ModelType
  21. size: number,
  22. time: string
  23. }
  24. export type Models = Model[]
  25. export const getModels = () =>
  26. axios.post<Models>(MODEL_LIST)