config.ts 766 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. const config: {
  2. base_url: {
  3. base: string
  4. dev: string
  5. pro: string
  6. test: string
  7. }
  8. result_code: number | string
  9. default_headers: AxiosHeaders
  10. request_timeout: number
  11. } = {
  12. /**
  13. * api请求基础路径
  14. */
  15. base_url: {
  16. // 开发环境接口前缀
  17. base: '',
  18. // 打包开发环境接口前缀
  19. dev: '',
  20. // 打包生产环境接口前缀
  21. pro: '',
  22. // 打包测试环境接口前缀
  23. test: ''
  24. },
  25. /**
  26. * 接口成功返回状态码
  27. */
  28. result_code: '0000',
  29. /**
  30. * 接口请求超时时间
  31. */
  32. request_timeout: 60000,
  33. /**
  34. * 默认接口请求类型
  35. * 可选值:application/x-www-form-urlencoded multipart/form-data
  36. */
  37. default_headers: 'application/json'
  38. }
  39. export { config }