function queryList4(page,pageSize) { //显示进度条 // plus.nativeUI.showWaiting(); //发送请求 queryListByType(4,page, pageSize, queryListSuccesss3,begindate,enddate); } /** * 腰围 * 健康指标图表查询成功处理方法 */ function queryListSuccesss3(res) { if (res.status == 200) { d.close(); if (res.list.length > 0) { //成功 showList3(res.list); if(res.list.length<10){ $("#view_more4").hide(); }else{ $("#view_more4").show(); } }else{ //无更多数据 $("#view_more4").hide(); } }else { //非200则为失败 queryListFailed(res); } // plus.nativeUI.closeWaiting(); } /** * 显示查询结果 * @param {Object} list */ function showList3(list) { page =page+1; // clearHTML(); for (var i = 0; i < list.length; i++) { var data = list[i]; if (!data) { continue; } addRow3(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 addRow3(dateStr, value1) { if (dateStr.length > 5) { dateStr = dateStr.substr(5, 5); } if(dateStr){ dateStr = dateStr.replace("-","."); } var tb = document.querySelector("#item3"); var tr = document.createElement("tr"); var html = '' + dateStr + ''; html += '' + value1 + ''; tr.innerHTML = html; tb.appendChild(tr); }