WebIMConfig.js 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /**
  2. * git do not control webim.config.js
  3. * everyone should copy webim.config.js to webim.config.js
  4. * and have their own configs.
  5. * In this way , others won't be influenced by this config while git pull.
  6. *
  7. */
  8. // for react native
  9. let location = {
  10. protocol: "https"
  11. };
  12. let config = {
  13. /*
  14. * XMPP server
  15. */
  16. // xmppURL: "wss://im-api-new-hsb.easemob.com/websocket",// websdk 3.0 server 沙箱(测试用)
  17. // xmppURL: "wss://im-api.easemob.com/ws", //小程序sdk 2.0 server
  18. xmppURL: 'wss://im-api-wechat.easemob.com/websocket', //小程序3.0 server 线上 小程序和原生客户端使用这个
  19. // xmppURL: 'wss://im-api-v2-hsb-alipay.easemob.com/websocket', // 支付宝沙箱 (测试用)
  20. // xmppURL: 'wss://im-api-alipay.easemob.com/websocket', // 支付宝线上 支付宝小程序请使用这个地址
  21. /*
  22. * Backend REST API URL
  23. */
  24. // apiURL: (location.protocol === 'https:' ? 'https:' : 'http:') + '//a1.easemob.com',
  25. // ios must be https!!! by lwz
  26. apiURL: "https://a1.easemob.com",
  27. // apiURL: 'https://192.168.43.137:8080', // 支付宝测试
  28. // apiURL: (location.protocol === 'https:' ? 'https:' : 'http:') + '//172.17.3.155:8080',
  29. /*
  30. * Application AppKey
  31. */
  32. // appkey: "1124230724161884#lly",//测试
  33. appkey: "1155230824175767#llyzt",//正式
  34. /*
  35. * Whether to use HTTPS '1177161227178308#xcx'
  36. * @parameter {Boolean} true or false
  37. */
  38. https: false,
  39. /*
  40. * isMultiLoginSessions
  41. * true: A visitor can sign in to multiple webpages and receive messages at all the webpages.
  42. * false: A visitor can sign in to only one webpage and receive messages at the webpage.
  43. */
  44. isMultiLoginSessions: false,
  45. /**
  46. * Whether to use window.doQuery()
  47. * @parameter {Boolean} true or false
  48. */
  49. isWindowSDK: false,
  50. /**
  51. * isSandBox=true: xmppURL: 'im-api.sandbox.easemob.com', apiURL: '//a1.sdb.easemob.com',
  52. * isSandBox=false: xmppURL: 'im-api.easemob.com', apiURL: '//a1.easemob.com',
  53. * @parameter {Boolean} true or false
  54. */
  55. isSandBox: false,
  56. /**
  57. * Whether to console.log in strophe.log()
  58. * @parameter {Boolean} true or false
  59. */
  60. isDebug: false,
  61. /**
  62. * will auto connect the xmpp server autoReconnectNumMax times in background when client is offline.
  63. * won't auto connect if autoReconnectNumMax=0.
  64. */
  65. autoReconnectNumMax: 15,
  66. /**
  67. * the interval secons between each atuo reconnectting.
  68. * works only if autoReconnectMaxNum >= 2.
  69. */
  70. autoReconnectInterval: 2,
  71. /**
  72. * webrtc supports WebKit and https only
  73. */
  74. isWebRTC: false,
  75. /*
  76. * Set to auto sign-in
  77. */
  78. isAutoLogin: true
  79. };
  80. export default config;