var postUrl = "doctor/sign/sign_info"; var docType; var curType; var pageTotal = 999999999999; //分页最大次数 var pageSize = 15; //一次加载几条数据 var date = new Date(), dateStr = date.format("yyyy-MM-dd"); mui.plusReady(function() { var self = plus.webview.currentWebview(); // 初始化关注数,总关注数 getSignCount(handleSucc99); //初始化续签管理页面的iscroll mui.init({ pullRefresh: { container: '#pullrefresh', down: { style:'circle', callback: pulldownRefresh }, up: { auto:true, contentrefresh: '正在加载...', callback: pullupRefresh } } }); var count = 0; function pullupRefresh() { mui('#pullrefresh').pullRefresh().endPullupToRefresh((++count > pageTotal)); //参数为true代表没有更多数据了。 var table = document.body.querySelector('.mui-table-view'); var cells = document.body.querySelectorAll('.mui-table-view-cell'); var newCount = $(".mui-table-view").children()&&$(".mui-table-view").children().length; var page=newCount/pageSize | 0; loadMore(".mui-table-view", 99, page); } /** * 下拉刷新具体业务实现 */ function pulldownRefresh() { var table = document.body.querySelector('.mui-table-view'); var cells = document.body.querySelectorAll('.mui-table-view-cell'); loadMore(".mui-table-view", 99, 0); mui('#pullrefresh').pullRefresh().endPulldownToRefresh(); mui.toast("刷新成功"); } mui('.gzgl-list').on('tap','.c-gzgl-action',function(){ var concernCode = $(this).parent().attr("data-concernCode"); var code = $(this).parent().attr("data-code"); mui.openWindow('../html/guanzhuxinxi.html', { extras: { concernCode:concernCode, code:code, } }) }) }); function getXqDataNew(handelSucc, page) { var url = "/doctor/concern/getConcernPatients"; sendGet(url, { page: page || 0, pageSize: 15 }, null, handelSucc); }; //签约管理增加签约统计功能,分别统计待审核、待缴费、已签约数量。在三个页切按钮下方增加统计数字 function getSignCount(handelSucc) { var url = "/doctor/concern/getConcernCounts"; sendGet(url, {}, null, handelSucc); }; //签约管理增加签约统计功能,分别统计待审核、待缴费、已签约数量。在三个页切按钮下方增加统计数字 (处理函数)) function handleSucc99(res){ plus.nativeUI.closeWaiting(); $('#already_paid').html(res.data&&res.data.countPatientStatus1||0); $('#general_concern').html(res.data&&res.data.countPatientAll||0); $('.qy-barner').removeClass('c-hide'); } //判断要不要显示加载更多 function isShowMore(res,page){//res 数据moreObj 要显示或隐藏的加载更多按钮 // var pageNow=res.data.page;//当前第几页 // var pageAll=res.data.totalPage; //总共几页 if(res&&res.data.length 2){ curTypeGroup2 = index; xq_dclObj = null; xq_djfObj = null; }else{ curType = index; } if(curType == 0 && dqyObj) { //需要重新刷新页面 dqyObj = ""; }else if(curType == 1 && djfObj){ djfObj = ""; }else if(curType == 2 && yqyObj){ yqyObj = ""; } $(".sign-comonhd").find(".sanp-flex:eq("+index+")").trigger("click") }); template.helper("formatShowTime",function(str){ if(str){ return str.substr(0,16); }else{ return ""; } }); template.helper("setPhoto", function(p) { return getImgUrl(p); });