$(function() { $(".c-lab-mor li").click(function() { $(".c-lab-mor li").removeClass("hit"); $(this).addClass("hit"); }); }); mui.plusReady(function() { queryList(); }); function queryList() { plus.nativeUI.showWaiting(); var params = {}; params.page = 1; params.pageSize = 10; sendPost("patient/followup/record", params, "json", "post", queryListFailed, queryListSuccess) } function queryListFailed(res) { if (res && res.msg) { plus.nativeUI.toast(res.msg); } else { plus.nativeUI.toast("随访数据加载失败"); } } function queryListSuccess(res) { if (res.status == 200) { //成功 showList(res.list); } else { //非200则为失败 queryListFailed(res); } plus.nativeUI.closeWaiting(); } /** * 显示查询结果 * @param {Object} list */ function showList(list) { for (var i = 0; i < list.length; i++) { var data = list[i]; if (!data) { continue; } addRow(data.doctor, data.hospital, data.dept, data.type, data.name, data.czrq, data.status); } } function addRow(doctor, hospital, dept, type, name, czrq, status) { var ul = document.querySelector("#item"); var li = document.createElement("li"); li.onclick = function(){ openWebview('image-followup.html'); }; var html = '