mui.init({
preloadPages:[{
id:"detail.html",
url:"detail.html"
}
]
});
var detailPage = null;
//添加列表项的点击事件
mui('.mui-table-view').on('tap', '.mui-table-view-cell', function(e) {
// var id = this.getAttribute('id');
// alert(id);
//获得详情页面
if(!detailPage){
detailPage = plus.webview.getWebviewById("detail.html");
}
alert(detailPage);
//触发详情页面的newsId事件
mui.fire(detailPage,'newsId',{
//id:id
});
//打开详情页面
mui.openWindow({
id:"detail.html"
});
});
获取的detailPage一直为空,偶先一次成功了,什么原因?
0 个回复