index.ts 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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.1.20:8080', // 黄
  11. // develop: 'http://192.168.0.11:8081', // 王
  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://25740642.r3.cpolar.top',
  17. develop: 'https://smqjh.api.zswlgz.com',
  18. /**
  19. * 体验版
  20. */
  21. // trial: "http://192.168.1.166:8080/jeecg-boot",
  22. // trial: 'http://192.168.0.157:8080',
  23. trial: 'http://47.109.84.152:8081',
  24. // trial: 'http://192.168.0.11:8081', // 王
  25. // trial: 'http://192.168.1.166:8080,
  26. // trial: 'https://smqjh.api.zswlgz.com',
  27. /**
  28. * 正式版
  29. */
  30. release: 'https://smqjh.api.zswlgz.com',
  31. }
  32. /**
  33. * Base URL请求基本url
  34. */
  35. export const BASE_URL
  36. = handleEnvVersion()
  37. /**
  38. * 静态资源服务
  39. */
  40. export const StaticUrl = 'https://zswl-smqjh.oss-cn-chengdu.aliyuncs.com/static/static'
  41. function handleEnvVersion() {
  42. // #ifdef H5
  43. const mode = import.meta.env.MODE
  44. const h5Server = {
  45. development: 'http://47.109.84.152:8081',
  46. // development: 'http://192.168.0.157:8080',
  47. // development: 'http://192.168.0.11:8081',
  48. // development: 'http://192.168.1.21:8080',
  49. // development: 'https://smqjh.api.zswlgz.com',
  50. // production: 'https://smqjh.api.zswlgz.com',
  51. production: 'http://47.109.84.152:8081',
  52. }
  53. console.log(mode, '==================mode===================')
  54. return h5Server[mode as 'development' | 'production']
  55. // #endif
  56. // #ifdef MP-WEIXIN
  57. return mapEnvVersion[uni.getAccountInfoSync().miniProgram.envVersion]
  58. // #endif
  59. }
  60. /**
  61. * h5小橘重定向地址
  62. */
  63. export const REDIRECT_URL = 'https://smqjh.h5.zswlgz.com/#/subPack-refueling/commonTab/index'