提交 1f537e73 编写于 作者: fxy060608's avatar fxy060608

fix(h5): onWebInvokeAppService

上级 5c366bc4
......@@ -6,6 +6,8 @@ import {
import {
setPullDownRefreshPageId
} from 'uni-platform/service/api/ui/pull-down-refresh'
import onWebInvokeAppService from 'uni-platform/service/on-web-invoke-app-service'
export default function initOn (on, {
getApp,
......@@ -89,5 +91,7 @@ export default function initOn (on, {
on('onNavigationBarSearchInputChanged', createCallCurrentPageHook('onNavigationBarSearchInputChanged'))
on('onNavigationBarSearchInputConfirmed', createCallCurrentPageHook('onNavigationBarSearchInputConfirmed'))
on('onNavigationBarSearchInputClicked', createCallCurrentPageHook('onNavigationBarSearchInputClicked'))
on('onNavigationBarSearchInputClicked', createCallCurrentPageHook('onNavigationBarSearchInputClicked'))
on('onWebInvokeAppService', onWebInvokeAppService)
}
......@@ -20,7 +20,6 @@ import onVdSync from './on-vd-sync'
import onVdSyncCallback from './on-vd-sync-callback'
import onInvokeApi from './on-invoke-api'
import onWebInvokeAppService from './on-web-invoke-app-service'
import onWxsInvokeCallMethod from './on-wxs-invoke-call-method'
import {
......@@ -59,8 +58,6 @@ export function initSubscribeHandlers () {
emit('onWebInvokeAppService', data, webviewIds)
})
on('onWebInvokeAppService', onWebInvokeAppService)
subscribe('onWxsInvokeCallMethod', onWxsInvokeCallMethod)
subscribe(VD_SYNC, onVdSync)
......
export default function onWebInvokeAppService ({
name,
arg
}, pageId) {
if (name === 'postMessage') {
// TODO 小程序后退、组件销毁、分享时通知
} else {
uni[name](arg)
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册