function queryList3(page,pageSize) { //显示进度条 // plus.nativeUI.showWaiting(); //发送请求 queryListByType(3,page, pageSize, queryListSuccesss2,begindate,enddate); } /** * 健康指标图表查询成功处理方法 */ function queryListSuccesss2(res) { if (res.status == 200) { d.close(); if (res.list.length > 0) { //成功 showList2(res.list); if(res.list.length<10){ $("#view_more3").hide(); }else{ $("#view_more3").show(); } }else{ //无更多数据 $("#view_more3").hide(); } } else { //非200则为失败 queryListFailed(res); } // plus.nativeUI.closeWaiting(); } /** * 显示查询结果 * @param {Object} list */ function showList2(list) { page = page+1; for (var i = 0; i < list.length; i++) { var data = list[i]; if (!data) { continue; } addRow2(data.date.substr(5, 5), toIntValue(data.value1)); } setTimeout(function () { scroller1.myScroll.refresh(); }, 1000); } /** * 体重 * tbody添加一行tr * @param {Object} dateStr * @param {Object} value1 * @param {Object} value2 */ function addRow2(dateStr, value1) { if (dateStr.length > 5) { dateStr = dateStr.substr(5, 5); } if(dateStr){ dateStr = dateStr.replace("-","."); } var tb = document.querySelector("#item2"); var tr = document.createElement("tr"); var html = '' + dateStr + ''; html += '' + value1 + ''; tr.innerHTML = html; tb.appendChild(tr); }