config.ts 1.3 KB

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