这是首页,这时不点任何链接,在选项卡上的切换页面事件都生效。
但点击蛋糕图标时,我是用mui.openWindow打开cake.html页面,在cake.html页面也有跟首页一样的底部选项卡代码,如下:
<nav class="mui-bar mui-bar-tab">
<a id="defaultTab" class="mui-tab-item mui-action-back">
<span class="mui-icon iconfont icon-fanhui"></span>
<span class="mui-tab-label">返回</span>
</a>
<a id="homeTab" class="mui-tab-item m-foot-link" href="home.html">
<span class="mui-icon iconfont icon-shouye"></span>
<span class="mui-tab-label">首页</span>
</a>
<a id="categoryTab" class="mui-tab-item m-foot-link" href="category.html">
<span class="mui-icon iconfont icon-tubiao3"></span>
<span class="mui-tab-label">分类</span>
</a>
<a id="cartTab" class="mui-tab-item m-foot-link" href="cart.html">
<span class="mui-icon iconfont icon-shoppingcart"></span>
<span class="mui-tab-label">购物车</span>
</a>
<a id="addmoneyTab" class="mui-tab-item m-foot-link" href="addmoney.html">
<span class="mui-icon iconfont icon-bukuan"></span>
<span class="mui-tab-label">在线补款</span>
</a>
<a id="accountTab" class="mui-tab-item m-foot-link" href="account.html">
<span class="mui-icon iconfont icon-zhanghu"></span>
<span class="mui-tab-label">我的帐户</span>
</a>
<a class="mui-tab-item more_mask">
<span class="mui-icon iconfont icon-ttpodicon"></span>
<span class="mui-tab-label">更多</span>
</a>
</nav>
比如我现在想在cake.html点击首页、分类、购物车时显示之前已经有的webview,我用以下的代码来实现
mui('.mui-bar-tab').on('tap', '.m-foot-link', function(e) {
mui.plusReady(function(){
var pageid=plus.webview.getWebviewById('category.html');
plus.webview.show(pageid);
});
发现这样无法显示分类(category.html)页面,应该是被当前页的zindex挡住了
想请教:
1、有其他更好的实现方法吗?