$(function(){
    //先获取团队信息显示
    getTeamInfo();
});

function getTeamInfo(){
    var docInfo1 ={"isFamous":1,"deptName":"心血管科","code":"zbqD201703150222","evaluateScore":93.9,"qrcode":"17500000012.png","consultAmount":76,"expertise":"我是全科医生中医内科疾病，糖尿病慢性并发症；肿瘤手术后及放、化疗后中医药调理；脾胃虚弱及睡眠障碍、多汗、亚健康调理等。医学博士，中医内科主任医师，教授，博士生导师，享受国务院政府特殊津贴，卫生部突出贡献专家，中国医师奖获得者。现任厦门市糖尿病研究所所长。长期从事中医、中西医结合内科临床、科研和教学工作。擅长糖尿病及其慢性并发症如糖尿病肾病、眼底病、周围神经性病变的诊治；肿瘤病人术后及放化疗后的中医调理；亚健康如睡眠障碍、便秘、自汗、盗汗等的中医调理等。","isPasswordPrompt":"1","cityName":"厦门市","adminTeamCode":644,"hospital":"3502050100","jobName":" 全科医师","level":2,"introduce":"我是全科医生中医内科疾病，糖尿病慢性并发症；肿瘤手术后及放、化疗后中医药调理；脾胃虚弱及睡眠障碍、多汗、亚健康调理等。医学博士，中医内科主任医师，教授，博士生导师，享受国务院政府特殊津贴，卫生部突出贡献专家，中国医师奖获得者。现任厦门市糖尿病研究所所长。长期从事中医、中西医结合内科临床、科研和教学工作。擅长糖尿病及其慢性并发症如糖尿病肾病、眼底病、周围神经性病变的诊治；肿瘤病人术后及放化疗后的中医调理；亚健康如睡眠障碍、便秘、自汗、盗汗等的中医调理等。中医内科疾病，糖尿病慢性并发症；肿瘤手术后及放、化疗后中医药调理；脾胃虚弱及睡眠障碍、多汗、亚健康调理等。医学博士，中医内科主任医师，教授，博士生导师，享受国务院政府特殊津贴，卫生部突出贡献专家，中国医师奖获得者。现任厦门市糖尿病研究所所长。长期从事中医、中西医结合内科临床、科研和教学工作。擅长糖尿病及其慢性并发症如糖尿病肾病、眼底病、周围神经性病变的诊治；肿瘤病人术后及放化疗后的中医调理；亚健康如睡眠障碍、便秘、自汗、盗汗等的中医调理等。","isCertified":0,"isLeader":"1","sex":2,"unsign_amount":0,"mobile":"17901010002","photo":"http://172.19.103.54:80/group1/M00/09/FC/rBFuWlkn1BGAHFX5AALsFLSqjko069.png","hospitalName":"海沧区嵩屿街道社区卫生服务中心","consultAmountToday":0,"signed_amount":2,"idcard":"","name":"伊全(全科)","provinceName":"福建省","userRole":[{"code":"350205","name":"海沧区","areas":"350205"}]};
    window.localStorage.setItem("docInfo", JSON.stringify(docInfo1));
    var params = {},
        docInfo = window.localStorage.getItem("docInfo"),
        docCode = JSON.parse(docInfo).code;
    APIService.getTeamInfo(docCode, params).then(function(res){
        console.log(res);
        if(res.status == 200){
            var manageTeams = '',
                orderTeams = '';
            for(var i=0; i<res.data.length; i++){
                var item = res.data[i];
                manageTeams += '<li><a class="J_menuItem" href="order-list.html?id='+item.id+'" data-index="0">'+item.name+'</a></li>';
                orderTeams += '<li><a class="J_menuItem" href="order-list.html?id='+item.id+'" data-index="0">'+item.name+'</a></li>';
            }
            $("#manageTeams").empty().append(manageTeams);
            $("#orderTeams").empty().append(orderTeams);
        }else{

        }
    });
}