app.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // #ifdef H5
  2. let VUE_APP_WS_URL = `ws://${location.hostname}?type=user`
  3. // #endif
  4. let openPlantGrass = '-openPlantGrass-'
  5. // 网络接口修改此字符 小程序域名要求
  6. // let httpApi = 'http://192.168.3.20:8324' //测试
  7. // let httpApi = 'https://crmeb.hdlkeji.com' //测试
  8. // let httpApi = 'https://multi-merchant.hdlkeji.com' //测试
  9. // let httpApi = 'https://demo.hdlkeji.com' //测试
  10. let httpApi = 'https://hongbaomi.com' //生产
  11. // let httpApi = 'https://mer1.crmeb.net' //生产
  12. // 聊天接口修改此字符 小程序聊天要求wss 例如:wss://mer.crmeb.net
  13. // let wsApi = 'ws://192.168.3.20:8324'
  14. // let wsApi = 'wss://mer1.crmeb.net'
  15. let wsApi = 'wss://hongbaomi.com'
  16. module.exports = {
  17. // 请求域名 格式: https://您的域名
  18. // #ifdef MP || APP-PLUS
  19. // HTTP_REQUEST_URL: httpApi,
  20. HTTP_REQUEST_URL: httpApi,
  21. VUE_APP_WS_URL: `${wsApi}?type=user`,
  22. // #endif
  23. // #ifdef H5
  24. //H5接口是浏览器地址
  25. HTTP_REQUEST_URL: httpApi || window.location.protocol + "//" + window.location.host,
  26. // 聊天长连接地址
  27. VUE_APP_WS_URL: wsApi ? `${wsApi}?type=user` : VUE_APP_WS_URL,
  28. // #endif
  29. openPlantGrass: openPlantGrass,
  30. HEADER: {
  31. 'content-type': 'application/json',
  32. //#ifdef H5
  33. 'Form-type': navigator.userAgent.toLowerCase().indexOf("micromessenger") !== -1 ? 'wechat' : 'h5',
  34. //#endif
  35. //#ifdef MP
  36. 'Form-type': 'routine',
  37. //#endif
  38. //#ifdef APP-PLUS
  39. 'Form-type': 'app',
  40. //#endif
  41. },
  42. // 回话密钥名称 请勿修改此配置
  43. TOKENNAME: 'X-Token',
  44. // 缓存时间 0 永久
  45. EXPIRE: 0,
  46. };