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

add setTimeout,setInterval

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