Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

mc.onAppShow(Function callback)

监听应用切前台事件。

参数

参数类型默认值必填说明
callbackFunction是应用切前台事件的回调函数

callback(Object object) 回调参数

属性类型说明最低版本
pathString启动应用的路径 (代码包路径)
sceneNumber启动应用的场景值
queryObject启动应用的 query 参数 

示例代码:

mc.onAppShow(function(res){
    console.log(res);
});