Skip to content

Commit e2dde25

Browse files
committed
update index init function
1 parent e6fbbe3 commit e2dde25

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

index.js

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,24 @@ const contactNotify = "JMessage.ContactNotify" // 收到好友请求消息事件
1919
export default class JMessage {
2020

2121
/**
22-
* 设置是否开启 debug 模式,开启后 SDK 将会输出更多日志信息。应用对外发布时应关闭。
22+
* @param {object} params = {
23+
* 'appkey': String, // 极光官网注册的应用 AppKey
24+
* 'isOpenMessageRoaming': boolean, // 是否开启消息漫游,不传默认关闭。
25+
* 'isProduction': Boolean, // 是否为生产模式
26+
* 'channel': String // (选填)应用的渠道名称
27+
* }
2328
*
24-
* @param {object} params = {'enable': Boolean}
29+
* 打开消息漫游之后,用户多个设备之间登录时,SDK 会自动将当前登录用户的历史消息同步到本地。
2530
*/
31+
static init(params) {
32+
JMessageModule.setup(params)
33+
}
34+
35+
/**
36+
* 设置是否开启 debug 模式,开启后 SDK 将会输出更多日志信息。应用对外发布时应关闭。
37+
*
38+
* @param {object} params = {'enable': Boolean}
39+
*/
2640
static setDebugMode(params) {
2741
// exec(null, null, PLUGIN_NAME, 'setDebugMode', [params])
2842
JMessageModule.setDebugMode(params)

0 commit comments

Comments
 (0)