mui.plusReady(function() { var self = plus.webview.currentWebview(); var userLevel = self.level // mui.alert(userLevel) var page = 1; var pagesize = 10; var isjiazai = 1; getRecommend(page, pagesize) function getRecommend(page, pagesize) { var recommenddata = { page: page ? page : 1, pagesize: pagesize ? pagesize : 10 } recommenddata.userLevel = userLevel; if (-1 == userLevel) { recommenddata.isLock = 1; } else { recommenddata.isLock = 0; } if (isjiazai == 0) { return; } else { isjiazai = 0; } JZL.ajax(qlgUrl('app/users/myFriendList'), recommenddata, function(data) { //console.log(data); if (1 == data.status) { var data = data.data; var html = ''; if (data.Rows == '') { $('.fri-con').append( '

没有更多朋友

'); isjiazai = 0; return; } mui.each(data.Rows, function() { if (!this.lockReason || '' == this.lockReason) { html += '
' + this.trueName + '' + this.userPhone + '
' } else { html += '
' + this.trueName + '' + this.userPhone + '' + this.lockReason + '8' + this.lockTime + '小时' + this.createTime + '
' } }) if (page == 1) { $('.fri-con').html(html); } else { $('.fri-con').append(html); } isjiazai = 1; } else { mui.alert(data.msg) } }) } document.querySelector('.mui-scroll-wrapper').addEventListener('scroll', function(e) { // 判断默认行为是否可以被禁用 if (e.cancelable) { // 判断默认行为是否已经被禁用 if (!e.defaultPrevented) { e.preventDefault(); } } if (scroll.y == scroll.maxScrollY) { if (isjiazai == 1) { page++; getRecommend(page, pagesize); } } if (scroll.y > 80 && issx == 0) { issx = 1; setTimeout(function() { location.reload() }, 1000) } }, false) })