app.js 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. // +----------------------------------------------------------------------
  2. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  3. // +----------------------------------------------------------------------
  4. // | Copyright (c) 2016~2024 https://www.crmeb.com All rights reserved.
  5. // +----------------------------------------------------------------------
  6. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  7. // +----------------------------------------------------------------------
  8. // | Author: CRMEB Team <admin@crmeb.com>
  9. // +----------------------------------------------------------------------
  10. // #ifdef H5
  11. let VUE_APP_WS_URL = `ws://${location.hostname}?type=user`
  12. // #endif
  13. let openPlantGrass = '-openPlantGrass-'
  14. // 网络接口修改此字符 小程序域名要求https
  15. // let httpApi = 'http://192.168.31.106:8324' //测试
  16. // let httpApi = 'https://merchant.wssms.com' //生产
  17. let httpApi = 'https://shushijia.qiniu1314.com' //生产
  18. // 聊天接口修改此字符 小程序聊天要求wss 例如:wss://mer.crmeb.net
  19. // let wsApi = 'ws://192.168.3.20:8324'
  20. let wsApi = 'wss://shushijia.qiniu1314.com'
  21. module.exports = {
  22. // 请求域名 格式: https://您的域名
  23. // #ifdef MP || APP-PLUS
  24. // HTTP_REQUEST_URL: httpApi,
  25. HTTP_REQUEST_URL: httpApi,
  26. VUE_APP_WS_URL: `${wsApi}?type=user`,
  27. // #endif
  28. // #ifdef H5
  29. //H5接口是浏览器地址
  30. HTTP_REQUEST_URL: httpApi || window.location.protocol + "//" + window.location.host,
  31. // 聊天长连接地址
  32. VUE_APP_WS_URL: wsApi ? `${wsApi}?type=user` : VUE_APP_WS_URL,
  33. // #endif
  34. openPlantGrass: openPlantGrass,
  35. HEADER: {
  36. 'content-type': 'application/json',
  37. //#ifdef H5
  38. 'Form-type': navigator.userAgent.toLowerCase().indexOf("micromessenger") !== -1 ? 'wechat' : 'h5',
  39. //#endif
  40. //#ifdef MP
  41. 'Form-type': 'routine',
  42. //#endif
  43. //#ifdef APP-PLUS
  44. 'Form-type': 'app',
  45. //#endif
  46. },
  47. // 回话密钥名称 请勿修改此配置
  48. TOKENNAME: 'X-Token',
  49. // 缓存时间 0 永久
  50. EXPIRE: 0,
  51. };