提交 0ae35ac7 编写于 作者: fxy060608's avatar fxy060608

add setTimeout,setInterval

上级 5eb082c7
......@@ -23,10 +23,12 @@ if (process.env.UNI_SERVICE === 'legacy') {
output.format = 'iife'
output.name = 'serviceContext'
output.banner =
`export function createServiceContext(Vue, weex, plus, __uniConfig, __uniRoutes, UniServiceJSBridge){
`export function createServiceContext(Vue, weex, plus, __uniConfig, __uniRoutes, UniServiceJSBridge,instanceContext){
var localStorage = plus.storage
var setTimeout = global.setTimeout
var clearTimeout = global.clearTimeout
var setTimeout = instanceContext.setTimeout
var clearTimeout = instanceContext.clearTimeout
var setInterval = instanceContext.setInterval
var clearInterval = instanceContext.clearInterval
`
output.footer =
`
......
......@@ -52,7 +52,6 @@ const media = [
'getImageInfo',
'saveImageToPhotosAlbum',
'compressImage',
'chooseMessageFile',
'getRecorderManager',
'getBackgroundAudioManager',
'createInnerAudioContext',
......
......@@ -37,8 +37,6 @@ export function switchTab ({
currentPage.$getAppWebview().close('auto')
}
} else {
// TODO 客户端 Bug
currentPage.$getAppWebview().hide('none')
// 前一个 tabBar 触发 onHide
currentPage.$vm.__call_hook('onHide')
}
......
......@@ -29,7 +29,7 @@ export function consumePlusMessage (type, args) {
*/
export function registerPlusMessage (type, callback, keepAlive = true) {
if (callbacks[type]) {
throw new Error(`${type} 已注册:` + (callbacks[type].toString()))
return console.warn(`${type} 已注册:` + (callbacks[type].toString()))
}
callback.keepAlive = !!keepAlive
callbacks[type] = callback
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册