橙子的橙汁
橙子的橙汁
  • 发布:2015-12-04 11:26
  • 更新:2018-11-23 16:12
  • 阅读:2712

我做底部菜单选项后,且对每个子页面都设置下拉刷新,当页面切换后,下拉不了

分类:MUI

这是菜单代码:
<nav class="mui-bar mui-bar-tab" >
<a class="mui-tab-item mui-active" href="#tabbar" id="tabbar">
<span class="mui-icon mui-icon-phone"></span>
<span class="mui-tab-label">电话咨询</span>
</a>
<a class="mui-tab-item" href="#newChat" id="newChat">
<span class="mui-icon mui-icon-chat"></span>
<span class="mui-tab-label">在线咨询</span>
</a>
<a class="mui-tab-item" href="#tabbar-with-sms" id="tabbar-with-sms">
<span class="mui-icon mui-icon-email"></span>
<span class="mui-tab-label">短信咨询</span>
</a>

</nav>

这是给它的点击事件:
var newChat = null ;
document.getElementById("newChat").addEventListener('tap',function(){
if (!newChat) {
//newChat = plus.webview.getWebviewById('newChat');
newChat = plus.webview.currentWebview().append(plus.webview.create('newChat.html', 'newChat', {
top: "45px",
bottom: "45px"

            }));  
            }   
            //newChat.show("auto",200);  
        });  

        var tabbar = null;  
        document.getElementById("tabbar").addEventListener('tap',function(){  
            if (!tabbar) {  
                //tabbar = plus.webview.getWebviewById('list');  
                tabbar = plus.webview.currentWebview().append(plus.webview.create('list.html', 'list', {  
                top: "45px",  
                bottom: "45px"  
            }));  
            }  
            //tabbar.show("auto",200);  
        });  

        var sms = null;  
        document.getElementById("tabbar-with-sms").addEventListener('tap',function(){  
            if (!sms) {  
                sms  = plus.webview.currentWebview().append(plus.webview.create('tabbar_with_sms.html', 'sms', {  
                top: "44px",  
                bottom: "44px",  
            }));  
            }  

            //sms.show("auto",200);  
        });  

这是一个页面中的下拉:

        mui.init({  
            pullRefresh: {  
                container: '#pullrefresh',  
                down: {  
                    callback: pulldownRefresh  
                },  
                up: {  
                    contentrefresh: '正在加载...',  
                    callback: pullupRefresh  
                }  
            }  
        });  
2015-12-04 11:26 负责人:无 分享
已邀请:
橙子的橙汁

橙子的橙汁 (作者)

为什么新的页面下拉刷新时,下拉下来时看到前面的页面

qq464965856

qq464965856

我也要做和你们一样的效果,页面切换后下拉刷新没有消除之前的子页面,所以下拉看到后面不是白色的,而是你之前的页面内容,查了好多都没有解决,你们弄好了么,只能看源码了么

  • 橙子的橙汁 (作者)

    我按照hello mui里面的demo写好了。就是这个tab-webview-main.html。你可以看看

    2015-12-20 15:46

水逸

水逸 -

是不是你们的下拉方法加错了?这样的低级错误,应该不会出现的

qq464965856

qq464965856

我是按hello mui的demo里面写的,不过我们有本页去跳转的链接

qq464965856

qq464965856

我刚进入首页的时候,下拉刷新和上拉加载是可以没问题的,当我点击其他链接以后,再点击首页,下拉刷新是失效的

我勒个去

我勒个去

你这个问题解决没?我也是如此,

  • 橙子的橙汁 (作者)

    恩,我按照hello mui里面的demo写好了。就是这个tab-webview-main.html。你可以看看

    2015-12-20 15:46

  • 我勒个去

    哦,你这个不是双view做下拉了呀,我是双VIEW做下拉,老是拉不下来

    2015-12-20 19:51

颜培红

颜培红 -

楼主解决了没有啊,我也遇到这样的问题了,我的只能在首页下拉,切换到其他页面就不能执行下拉刷新了

该问题目前已经被锁定, 无法添加新回复