mui.plusReady(function() { // mui(".c-list").on("tap", "li", function() { // openWebview("my-doctor-advice-detail.html"); // }); //查询列表 // clearHTML(); queryList(); }); function queryList() { plus.nativeUI.showWaiting(); //拼请求内容 var params = {}; //发送ajax请求 sendPost("doctor/team/list", params,queryListFailed, queryListSuccesss); } function queryListFailed(res) { if (res && res.msg) { plus.nativeUI.toast(res.msg); } else { plus.nativeUI.toast("数据加载失败"); } plus.nativeUI.closeWaiting(); } function queryListSuccesss(res) { if (res.status == 200) { //成功 showList(res.list); } else { //非200则为失败 queryListFailed(res); } plus.nativeUI.closeWaiting(); } /** * 清空tbody */ function clearHTML() { $("#my_work_team").html(""); } /** * 显示查询结果 * @param {Object} list */ function showList(list) { // clearHTML(); var _html = ""; var arry1=[]; for (var i = 0; i < list.length; i++) { var data = list[i]; _html+="
" _html+= "
" _html+= "
" _html+= "

"+data.name+"

" _html+= "
" _html+= "" _html+="
" arry1.push(_html); } $("#my_work_team").html(_html); for (var i=0;idiv:eq("+i+")>ul:eq(0)"); for(var j=0;j" _html2+= "
" _html2+= "
" _html2+= "

"+data_doc.name+"

" _html2+= "

"+data_doc_type+"

" _html2+= "
" _html2+= "
" _html2+="" } my_work_team_ul.html(_html2); } /* 展开居民列表 */ $(".patient-type").on('click', function() { var $this = $(this); if ($this.parent('.patient-list').hasClass("current")) { $this.find('.arrow').removeClass('open'); $this.next(".n-list").hide().parent('.patient-list').removeClass("current"); $this.siblings().find('.n-list').hide(); $this.siblings().find('.patient-list').removeClass('current'); $this.siblings().find('.arrow').removeClass('open'); } else { $this.find('.arrow').addClass('open'); $this.next(".n-list").show().parent('.patient-list').addClass("current"); }; }) mui("body").on("tap",".n-list-link",function () { var doc_code=$(this).attr("attr_code"); mui.openWindow({ url: "zuyuanziliao.html", id:"zuyuanziliao", extras: { code:doc_code, }, }); }) } // $("#Id_work_team").html(_html); // // $("#Id_work_team").on("click","li",function(){ // var attr_code = $(this).attr('attr_code'); // var attr_first_doc = $(this).attr('attr_first_doc'); // var attr_icon = $(this).attr('attr_icon'); // var attr_name = $(this).attr('attr_name'); // // mui.openWindow({ // url: "../../message/html/qunzu_duihua.html", // id:"qunzu_duihua", // extras: { // code:attr_code, // first_doc:attr_first_doc, // icon:attr_icon, // name:attr_name, // } // }); // // }); // //添加数据添加监听 window.addEventListener("update_info", function(e) { clearHTML(); //刷新列表 queryList(); });