config.ts 642 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. interface RetryRequest {
  2. isOpenRetry: boolean
  3. count: number
  4. waitTime: number
  5. }
  6. const config: {
  7. base_url: string
  8. result_code: number | string
  9. default_headers: AxiosHeaders
  10. request_timeout: number,
  11. } = {
  12. /**
  13. * api请求基础路径
  14. */
  15. base_url: import.meta.env.VITE_BASE_URL + import.meta.env.VITE_API_URL,
  16. /**
  17. * 接口成功返回状态码
  18. */
  19. result_code: 200,
  20. /**
  21. * 接口请求超时时间
  22. */
  23. request_timeout: 30000,
  24. /**
  25. * 默认接口请求类型
  26. * 可选值:application/x-www-form-urlencoded multipart/form-data
  27. */
  28. default_headers: 'application/json',
  29. }
  30. export { config }