config.ts 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. import {
  2. exampleList,
  3. fireDetailByPsw,
  4. getAttachListByPsw,
  5. getCode,
  6. getCompanyList,
  7. getDownloadProcess,
  8. getFireList,
  9. getMessageList,
  10. getModelSceneList,
  11. getRoleList,
  12. getSceneList,
  13. insertCaseFile,
  14. saveCaseFileInfo,
  15. sendUserMsg,
  16. updateCaseFile,
  17. updatePsw,
  18. uploadAttachFile,
  19. uploadAttachImage,
  20. uploadFile,
  21. uploadModel,
  22. userLogin,
  23. userReg,
  24. } from "./urls";
  25. // 不需要登录就能请求的接口
  26. export const notLoginUrls = [
  27. userLogin,
  28. getCode,
  29. sendUserMsg,
  30. userReg,
  31. updatePsw,
  32. getCompanyList,
  33. fireDetailByPsw,
  34. getAttachListByPsw,
  35. ];
  36. // 需要用表单提交的数据
  37. export const fromUrls: string[] = [];
  38. // 带文件的请求
  39. export const fileUrls = [
  40. uploadAttachFile,
  41. uploadAttachImage,
  42. uploadModel,
  43. updateCaseFile,
  44. uploadFile,
  45. insertCaseFile,
  46. saveCaseFileInfo,
  47. ];
  48. // 需要限定卫GET请求方式的url
  49. export const GetUrls = [getRoleList, getCompanyList];
  50. // 需要限定请求方式的url
  51. export const PostUrls = [
  52. exampleList,
  53. getFireList,
  54. getMessageList,
  55. getSceneList,
  56. getModelSceneList,
  57. ];
  58. // 未认证code
  59. export const unAuthCode = [3004, 4008];
  60. export const successCode = [0, "000000", 200];
  61. // baseURL
  62. export const baseURL = import.meta.env.DEV ? "/api" : "";
  63. export const notOpenUrls: string[] = [uploadModel, getDownloadProcess];