app.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // +----------------------------------------------------------------------
  2. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  3. // +----------------------------------------------------------------------
  4. // | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
  5. // +----------------------------------------------------------------------
  6. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  7. // +----------------------------------------------------------------------
  8. // | Author: CRMEB Team <admin@crmeb.com>
  9. // +----------------------------------------------------------------------
  10. module.exports = {
  11. // 小程序配置
  12. // #ifdef MP
  13. // 请求域名 格式: https://您的域名
  14. HTTP_REQUEST_URL: `https://您的域名`,
  15. // 长连接 格式:wss://您的域名:20003
  16. // 需要在后台设置->基础配置->WSS配置 开启WSS配置,并上传证书,重启workerman后生效
  17. // 请在PHP项目根目录下启动,长连接命令:sudo -u www php think workerman start --d
  18. // 系统默认客服端口20003,如果需要修改端口,请修改【20003】
  19. VUE_APP_WS_URL: `wss://您的域名:20003`,
  20. // #endif
  21. // H5配置
  22. // #ifdef H5
  23. //H5接口是浏览器地址,非单独部署不用修改
  24. HTTP_REQUEST_URL: window.location.protocol + "//" + window.location.host,
  25. // 长连接地址,非单独部署不用修改
  26. // 系统默认客服端口20003,如果需要修改端口,请修改【20003】
  27. VUE_APP_WS_URL: `ws://${window.location.host}:20003`,
  28. // #endif
  29. // 以下配置在不做二开的前提下,不需要做任何的修改
  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-VUE
  39. 'Form-type': 'app',
  40. //#endif
  41. },
  42. // 回话密钥名称 请勿修改此配置
  43. TOKENNAME: 'Authori-zation',
  44. // 缓存时间 0 永久
  45. EXPIRE: 0,
  46. //分页最多显示条数
  47. LIMIT: 10
  48. }