@@ -53,48 +53,59 @@ export default class JPush {
5353 }
5454
5555 /**
56- * Android
56+ * Android Only
5757 */
5858 static stopPush ( ) {
5959 JPushModule . stopPush ( ) ;
6060 }
6161
6262 /**
63- * Android
63+ * Android Only
6464 */
6565 static resumePush ( ) {
6666 JPushModule . resumePush ( ) ;
6767 }
6868
69+ /**
70+ * Android Only
71+ *
72+ * @param {Function } cb
73+ */
6974 static notifyJSDidLoad ( cb ) {
7075 JPushModule . notifyJSDidLoad ( ( resultCode ) => {
7176 cb ( resultCode ) ;
7277 } ) ;
7378 }
7479
7580 /**
76- * Android
81+ * Android Only
7782 */
7883 static clearAllNotifications ( ) {
7984 JPushModule . clearAllNotifications ( ) ;
8085 }
8186
8287 /**
83- * Android
88+ * Android Only
8489 */
8590 static clearNotificationById ( id ) {
8691 JPushModule . clearNotificationById ( id ) ;
8792 }
8893
8994 /**
90- * Android
95+ * Android Only
9196 */
9297 static getInfo ( cb ) {
9398 JPushModule . getInfo ( ( map ) => {
9499 cb ( map ) ;
95100 } ) ;
96101 }
97102
103+ /**
104+ * 获取当前连接状态
105+ * @param {Fucntion } cb = (Boolean) => {}
106+ * 如果连接状态变更为已连接返回 true
107+ * 如果连接状态变更为断开连接连接返回 false
108+ */
98109 static getConnectionState ( cb ) {
99110 JPushModule . getConnectionState ( ( state ) => {
100111 cb ( state ) ;
@@ -230,7 +241,7 @@ export default class JPush {
230241 }
231242
232243 /**
233- * Android
244+ * Android Only
234245 */
235246 static setStyleBasic ( ) {
236247 JPushModule . setStyleBasic ( ) ;
@@ -258,7 +269,7 @@ export default class JPush {
258269 }
259270
260271 /**
261- * 监听自定义消息后事件
272+ * 监听:自定义消息后事件
262273 * @param {Function } cb = (Object) => { }
263274 */
264275 static addReceiveCustomMsgListener ( cb ) {
@@ -269,7 +280,7 @@ export default class JPush {
269280 }
270281
271282 /**
272- * 取消监听自定义消息后事件
283+ * 取消监听:自定义消息后事件
273284 * @param {Function } cb = (Object) => { }
274285 */
275286 static removeReceiveCustomMsgListener ( cb ) {
@@ -282,6 +293,7 @@ export default class JPush {
282293
283294 /**
284295 * iOS Only
296+ * 监听:应用没有启动的状态点击推送打开应用
285297 * @param {Function } cb = (notification) => {}
286298 */
287299 static addOpenNotificationLaunchAppListener ( cb ) {
@@ -293,6 +305,7 @@ export default class JPush {
293305
294306 /**
295307 * iOS Only
308+ * 取消监听:应用没有启动的状态点击推送打开应用
296309 * @param {Function } cb = () => {}
297310 */
298311 static removeOpenNotificationLaunchAppEventListener ( cb ) {
@@ -306,7 +319,7 @@ export default class JPush {
306319 /**
307320 * iOS Only
308321 *
309- * 监听应用连接已登录
322+ * 监听:应用连接已登录
310323 * @param {Function } cb = () => {}
311324 */
312325 static addnetworkDidLoginListener ( cb ) {
@@ -319,7 +332,7 @@ export default class JPush {
319332 /**
320333 * iOS Only
321334 *
322- * 取消监听应用连接已登录
335+ * 取消监听:应用连接已登录
323336 * @param {Function } cb = () => {}
324337 */
325338 static removenetworkDidLoginListener ( cb ) {
@@ -331,7 +344,7 @@ export default class JPush {
331344 }
332345
333346 /**
334- * 监听接收推送事件
347+ * 监听:接收推送事件
335348 * @param { } cb = (Object)=> {}
336349 */
337350 static addReceiveNotificationListener ( cb ) {
@@ -342,7 +355,7 @@ export default class JPush {
342355 }
343356
344357 /**
345- * 取消监听接收推送事件
358+ * 取消监听:接收推送事件
346359 * @param {Function } cb = (Object)=> {}
347360 */
348361 static removeReceiveNotificationListener ( cb ) {
@@ -354,7 +367,7 @@ export default class JPush {
354367 }
355368
356369 /**
357- * 监听点击推送事件
370+ * 监听:点击推送事件
358371 * @param {Function } cb = (Object)=> {}
359372 */
360373 static addReceiveOpenNotificationListener ( cb ) {
@@ -365,7 +378,7 @@ export default class JPush {
365378 }
366379
367380 /**
368- * 取消监听点击推送事件
381+ * 取消监听:点击推送事件
369382 * @param {Function } cb = (Object)=> {}
370383 */
371384 static removeReceiveOpenNotificationListener ( cb ) {
@@ -400,7 +413,7 @@ export default class JPush {
400413 }
401414
402415 /**
403- * 监听连接状态变更
416+ * 监听:连接状态变更
404417 * @param {Function } cb = (Boolean) => { }
405418 * 如果连接状态变更为已连接返回 true
406419 * 如果连接状态变更为断开连接连接返回 false
@@ -412,6 +425,12 @@ export default class JPush {
412425 } ) ;
413426 }
414427
428+ /**
429+ * 监听:连接状态变更
430+ * @param {Function } cb = (Boolean) => { }
431+ * 如果连接状态变更为已连接返回 true
432+ * 如果连接状态变更为断开连接连接返回 false
433+ */
415434 static removeConnectionChangeListener ( cb ) {
416435 if ( ! listeners [ cb ] ) {
417436 return ;
@@ -422,7 +441,7 @@ export default class JPush {
422441
423442
424443 /**
425- *
444+ * 获取 RegistrationId
426445 * @param {Function } cb = (String) => { }
427446 */
428447 static getRegistrationID ( cb ) {
@@ -450,7 +469,6 @@ export default class JPush {
450469 } ) ;
451470 }
452471
453-
454472 /**
455473 * iOS Only
456474 * 设置本地推送
0 commit comments