config.js 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. // 配置文件
  2. const env = wx.getAccountInfoSync().miniProgram;
  3. // 请求根路径
  4. let baseUrl = "http://8.136.199.33:8500/api",
  5. pcUrl,
  6. reportLinkUrl,
  7. intemalLinkUrl,
  8. reportStrategyUrl,
  9. ficcReport,
  10. pushRulesUrl;
  11. if (env.envVersion === "develop") {
  12. //开发
  13. baseUrl = "http://8.136.199.33:8500/api";
  14. pcUrl = "https://cygxpctest.hzinsights.com/cygx_pc";
  15. reportLinkUrl = "http://xcxh5test.hzinsights.com/xcx_h5/raiReportDtl";
  16. intemalLinkUrl = "http://xcxh5test.hzinsights.com/xcx_h5/internalDetials";
  17. reportStrategyUrl = "http://xcxh5test.hzinsights.com/xcx_h5/strategyReport";
  18. ficcReport = "http://xcxh5test.hzinsights.com/xcx_h5/ficcReportDtl";
  19. pushRulesUrl = "http://xcxh5test.hzinsights.com/xcx_h5/pushrulesPages";
  20. } else if (env.envVersion === "trial") {
  21. //体验版
  22. baseUrl = "http://8.136.199.33:8500/api"; // 测试
  23. //baseUrl = "https://cygx.hzinsights.com/api"; //生产
  24. pcUrl = "https://cygxpctest.hzinsights.com/cygx_pc"; // 测试
  25. //pcUrl = "https://cygxpc.hzinsights.com/cygx_pc"; //生产
  26. reportLinkUrl = "http://xcxh5test.hzinsights.com/xcx_h5/raiReportDtl"; //测试
  27. //reportLinkUrl = "https://details.hzinsights.com/raiReportDtl"; //生产
  28. intemalLinkUrl = "http://xcxh5test.hzinsights.com/xcx_h5/internalDetials";
  29. reportStrategyUrl = "http://xcxh5test.hzinsights.com/xcx_h5/strategyReport"; //测试
  30. //reportStrategyUrl = "https://details.hzinsights.com/strategyReport"; //生产
  31. ficcReport = "http://xcxh5test.hzinsights.com/xcx_h5/ficcReportDtl";
  32. pushRulesUrl = "http://xcxh5test.hzinsights.com/xcx_h5/pushrulesPages";
  33. } else if (env.envVersion === "release") {
  34. //正式版
  35. baseUrl = "https://cygx.hzinsights.com/api";
  36. pcUrl = "https://cygxpc.hzinsights.com/cygx_pc"; //生产
  37. reportLinkUrl = "https://details.hzinsights.com/raiReportDtl"; //生产
  38. intemalLinkUrl = "https://details.hzinsights.com/internalDetials"; //生产
  39. reportStrategyUrl = "https://details.hzinsights.com/strategyReport"; //生产
  40. ficcReport = "https://details.hzinsights.com/ficcReportDtl";
  41. pushRulesUrl = "https://details.hzinsights.com/pushrulesPages";
  42. }
  43. module.exports = {
  44. baseUrl,
  45. pcUrl,
  46. reportLinkUrl,
  47. reportStrategyUrl,
  48. intemalLinkUrl,
  49. ficcReport,
  50. pushRulesUrl
  51. };