index.ts 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. const mapEnvVersion = {
  2. /**
  3. * 开发版
  4. */
  5. // develop: 'http://192.168.1.166:8080', // 张
  6. // develop: 'http://192.168.1.101:8080',
  7. // develop: 'http://192.168.0.157:8080',
  8. // develop: 'http://192.168.1.253:8080',
  9. // develop: 'http://192.168.0.19:8080', // 邓
  10. // develop: 'http://192.168.0.217:8080', // 黄
  11. // develop: 'http://192.168.0.11:8080', // 王
  12. develop: 'http://192.168.1.21:8080', // 田
  13. // develop: 'http://74949mkfh190.vicp.fun', // 付
  14. // develop: 'http://47.109.84.152:8081',
  15. // develop: 'https://5ed0f7cc.r9.vip.cpolar.cn',
  16. // develop: 'https://smqjh.api.zswlgz.com',
  17. /**
  18. * 体验版
  19. */
  20. // trial: "http://192.168.1.166:8080/jeecg-boot",
  21. // trial: 'http://192.168.0.157:8080',
  22. trial: 'http://47.109.84.152:8081',
  23. // trial: 'http://192.168.1.166:8080,
  24. // trial: 'https://smqjh.api.zswlgz.com',
  25. /**
  26. * 正式版
  27. */
  28. release: 'https://smqjh.api.zswlgz.com',
  29. }
  30. /**
  31. * Base URL请求基本url
  32. */
  33. export const BASE_URL
  34. = handleEnvVersion()
  35. /**
  36. * 静态资源服务
  37. */
  38. export const StaticUrl = 'https://zswl-smqjh.oss-cn-chengdu.aliyuncs.com/static/static'
  39. function handleEnvVersion() {
  40. // #ifdef H5
  41. const mode = import.meta.env.MODE
  42. const h5Server = {
  43. development: 'http://47.109.84.152:8081',
  44. // development: 'http://192.168.0.157:8080',
  45. // development: 'http://192.168.1.21:8080',
  46. production: 'https://smqjh.api.zswlgz.com',
  47. }
  48. return h5Server[mode as 'development' | 'production']
  49. // #endif
  50. // #ifdef MP-WEIXIN
  51. return mapEnvVersion[uni.getAccountInfoSync().miniProgram.envVersion]
  52. // #endif
  53. }
  54. /**
  55. * h5小橘重定向地址
  56. */
  57. export const REDIRECT_URL = 'https://smqjh.h5.zswlgz.com/#/subPack-refueling/commonTab/index'