提交 f0dd5558 编写于 作者: Y yurj26

feat(app): add uni.getChannelManager()

上级 53af7e7b
...@@ -286,7 +286,8 @@ const plugin = [ ...@@ -286,7 +286,8 @@ const plugin = [
'getPushClientId', 'getPushClientId',
'onPushMessage', 'onPushMessage',
'offPushMessage', 'offPushMessage',
'createPushMessage' 'createPushMessage',
'getChannelManager'
] ]
const apis = [ const apis = [
...@@ -307,4 +308,4 @@ const apis = [ ...@@ -307,4 +308,4 @@ const apis = [
...plugin ...plugin
] ]
module.exports = apis module.exports = apis
import { import {
invoke, invoke,
publish publish
} from '../../bridge' } from '../../bridge'
...@@ -81,4 +81,10 @@ export function createPushMessage (params, callbackId) { ...@@ -81,4 +81,10 @@ export function createPushMessage (params, callbackId) {
invoke(callbackId, { invoke(callbackId, {
errMsg: 'createPushMessage:ok' errMsg: 'createPushMessage:ok'
}) })
} }
let channelManager
export function getChannelManager () {
return channelManager || (channelManager = plus.push.getChannelManager())
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册