mui.init({
preloadPages:[{
id:'article-index',
url:'../article/index.html'
}]
});
var page = null;
事件触发:
if(!page){
page = plus.webview.getWebviewById('article-index');
}
//触发详情页面的findarticle事件
mui.fire(page,'findarticle',{
//id:'id',
Title:articleTitle,
Author:articleAuthor,
ConcentID:articleConcentID
});
//打开详情页面
mui.openWindow({
//url:'../article/index.html'//,
id:'article-index'
});
每当打开预加载的页面是就会打不开,还报错。
Uncaught Error: webview[article-index] does not exist at html/js/mui.min.js:6
1***@qq.com (作者)
用mui.preload 放到 plusready里面就行了
2017-04-18 09:11