mui的页面有两个返回功能调用怎么办

2025-02-20 00:25:49
推荐回答(1个)
回答1:

在要接受的页面用
window.addEventListener('方法名称',function(event){
//通过event.detail可获得传递过来的参数内容
});
启动事件监听。在需要触发事件的页面调用
mui.fire(pageId,'方法名称',{});
第一个参数是需要接受页面的对象可以通过plus.webview.getWebviewById('页面id')获得,
第二个是监听事件的方法名称,