3.0.1 • Published 2 years ago

imwechats v3.0.1

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

本文主要介绍如何快速的接入小程序IM聊天组件,只要按照如下步骤进行配置,就可以完成 SDK 的集成工作。

小程序NPM 集成

// 安装聊天小程序组件库 npm install imwechats --save // 将安装的node-module集成到小程序miniprogram_npm 操作步骤集成小程序node-module步骤:小程序工具栏 => 工具 => 构建npm

页面集成组件

// 页面中引入组件 "usingComponents": { "imWechat": "../../miniprogram_npm/imwechats/index" } // 在page wxml中引入组件

// 初始化接收参数 properties imInfo: 当前IM登录所需的账号签名 imInfo: {

}

// 添加全局的配置文件 app.json(需将顶部导航栏设置为自定义,否则对聊天顶部导航栏布局有影响) "window": { "navigationStyle": "custom" }, app.js(添加全局配置变量) globalData: { chat: null, // 默认null,必须,全局的im引用变量 chatConfig: { // 默认需配置{}必须, im 配置参数 isAllowAuth: true, // 是否允许IM授权相关操作 authBackHost: 'https://im.loushi.com', // IM授权聊天框背景图片前缀 authApiHost: 'https://www.testing.loushi.com/gateway/v1', // IM授权接口api timeDiff: 5 * 60, // 消息列表消息展示间隔 } }

3.0.1

2 years ago

2.0.1

2 years ago

1.0.12

2 years ago

3.0.0

3 years ago

4.0.0

3 years ago

2.0.0

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago