提交 be89a303 编写于 作者: Q qiang

fix: platform.js

上级 ac3719f7
import {
APP_SERVICE_ID
} from '../constants'
function plusReady (callback) {
if (!callback) {
return
}
if (window.plus) {
return callback()
}
document.addEventListener('plusready', callback)
}
import {
plusReady
} from 'uni-shared'
export function publishHandler (event, args = {}) {
plusReady(function () {
......@@ -27,4 +20,4 @@ export function publishHandler (event, args = {}) {
}
}, APP_SERVICE_ID)
})
}
}
export function plusReady (callback) {
if (typeof callback !== 'function') {
return
}
if (window.plus) {
return callback()
}
document.addEventListener('plusready', callback)
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册