config.js 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. const h5Url='https://h5.bosszan.com'
  2. const ossUrl='https://yi-zhipin.oss-cn-hangzhou.aliyuncs.com/emoji/'
  3. const productionApiUrl = 'https://www.bosszan.com/sqx_fast'
  4. const productionWssUrl = 'wss://www.bosszan.com/wss/websocket/'
  5. const productionChatUrl = 'wss://www.bosszan.com/wss/chatSocket/'
  6. const testApiUrl = 'https://yizhizan.edccc.cn/sqx_fast'
  7. const testWssUrl = 'wss://yizhizan.edccc.cn/wss/websocket/'
  8. const testChatUrl = 'wss://yizhizan.edccc.cn/wss/chatSocket/'
  9. let isProduction = true // 判断是否是生产环境
  10. if (isProduction) {
  11. //正式环境
  12. const ROOTPATH = productionApiUrl;
  13. const ROOTPATH1 = productionApiUrl;
  14. const ROOTPATH2 = productionWssUrl; //联系客服
  15. const ROOTPATH3 = productionChatUrl; //聊天
  16. const ROOTPATH4 = "https://www.bosszan.com";
  17. module.exports = {
  18. APIHOST: ROOTPATH,
  19. APIHOST1: ROOTPATH1,
  20. WSHOST: ROOTPATH2,
  21. WSHOST1: ROOTPATH3,
  22. WSHOST4: ROOTPATH4,
  23. h5Url,
  24. ossUrl,
  25. isProduction,
  26. test: {
  27. APIHOST: testApiUrl,
  28. APIHOST1: testApiUrl,
  29. WSHOST: testWssUrl,
  30. WSHOST1: testChatUrl
  31. },
  32. production: {
  33. APIHOST: productionApiUrl,
  34. APIHOST1: productionApiUrl,
  35. WSHOST: productionWssUrl,
  36. WSHOST1: productionChatUrl
  37. }
  38. };
  39. }else{
  40. //测试环境
  41. const ROOTPATH = testApiUrl;
  42. const ROOTPATH1 = testApiUrl;
  43. const ROOTPATH2 = testWssUrl; //联系客服
  44. const ROOTPATH3 = testChatUrl; //聊天
  45. const ROOTPATH4 = "";
  46. module.exports = {
  47. APIHOST: ROOTPATH,
  48. APIHOST1: ROOTPATH1,
  49. WSHOST: ROOTPATH2,
  50. WSHOST1: ROOTPATH3,
  51. WSHOST4: ROOTPATH4,
  52. h5Url,
  53. ossUrl,
  54. isProduction,
  55. test: {
  56. APIHOST: testApiUrl,
  57. APIHOST1: testApiUrl,
  58. WSHOST: testWssUrl,
  59. WSHOST1: testChatUrl
  60. },
  61. production: {
  62. APIHOST: productionApiUrl,
  63. APIHOST1: productionApiUrl,
  64. WSHOST: productionWssUrl,
  65. WSHOST1: productionChatUrl
  66. }
  67. };
  68. }