Commit bfaf4bf3 authored by hbcui1984's avatar hbcui1984

解决侧滑菜单多次打开下拉刷新白屏的问题

parent b35e87bc
...@@ -102,17 +102,22 @@ ...@@ -102,17 +102,22 @@
}); });
}else{ }else{
var href = this.href; var href = this.href;
var title = this.innerText;
if(~href.indexOf('pullrefresh')){ if(~href.indexOf('pullrefresh')){
plus.webview.getWebviewById("pullrefresh-main").show('slide-in-right', 150); var template = plus.webview.getWebviewById("pullrefresh-main");
subWebview = template.children()[0];
mui.fire(template,'updateHeader',{title:title,showMenu:false});
subWebview.show();
template.show('slide-in-right', 150);
}else{ }else{
template = plus.webview.getWebviewById("default-main"); template = plus.webview.getWebviewById("default-main");
//获得共用子webview //获得共用子webview
subWebview = template.children()[0]; subWebview = template.children()[0];
var title = this.innerText;
//通知模板修改标题,并显示隐藏右上角图标; //通知模板修改标题,并显示隐藏右上角图标;
mui.fire(template,'updateHeader',{title:title,showMenu:false}); mui.fire(template,'updateHeader',{title:title,showMenu:false});
if (subWebview.getURL() != this.href) { if (subWebview.getURL() != href) {
subWebview.loadURL(this.href); subWebview.loadURL(href);
} else { } else {
subWebview.show(); subWebview.show();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment