## @sdp.nd/web-im-push
`im push` 功能实现

注意！！！ 只能在 web 环境中使用

使用方法清参考 `/public/test.html`

有问题可咨询 `阙乃祯(227114)`
## 接入
```
  npm i --save @sdp.nd/web-im-push
```

### 使用
```js
  import '@sdp.nd/web-im-push'

  console.log(window['xx_push'])
  
  //如果集成使用先判断是否已经存在连接
  const xxpush = window.xx_push ;
  if(!xxpush.s_deviceToken){
  xxpush.init....
  }
  
  
```

## 备注
### ws.js
简单修改了 `ws.js` 以适应 `rollup` 打包。修改如下

``` js
(function() {
  var $ = {}; // 此处声明 $
  $.reqSeq = 1;
  ...
  ...
  ···
  window.xx_push = $ // 此处挂载到全局
})(); // 此处去除原参数
```

### encoding.js
```js
  // If we're in node require encoding-indexes and attach it to the global.
  // if (typeof module !== "undefined" && module.exports &&
  //   !global["encoding-indexes"]) {
  //   global["encoding-indexes"] =
  //     require("./encoding-indexes.js")["encoding-indexes"];
  // }
  // 此处注释掉，不然打包时无法查找到 encoding.indexes.js
```

## 本地开发
```
  yarn

  yarn build // 构建
```

## 本地测试
利用打包后的 umd 文件测试，每次修改后进行打包，在 publick 目录下将 umd 文件引入进行测试。



