<!doctype html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>ç›´æ’­</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		
		<!-- js引用 -->
		<script src="../../js/config.js"></script>
		<script src="../../js/h5toapp.js"></script>
		<script src="../../js/h5to.js"></script>
		
		<!-- 组件js引用 -->
		<script src="../../js/mui.min.js"></script>
		<!-- 组件标准css引用 -->
		<link rel="stylesheet" href="../../css/mui.min.css">
		<!-- css引用 -->
		<link href="../../css/currency.css" rel="stylesheet">
		<link href="../../css/spinkit.css" rel="stylesheet">
		<link href="../../css/icon/iconfont.css" rel="stylesheet">
		<!-- 界面本身css引用 -->
		<link href="./live.css" rel="stylesheet">
		
		<style type="text/css">
		    .mui-input-row .mui-input-clear~.mui-icon-clear {
				line-height: 27px;
				width: 30px;
				height: 17px;
				top: 16px;
				background: url(../../img/Delete%20Keyword.png) no-repeat;
			}
			.mui-icon-clear:before {
				content: '';
				/* background: url(../../img/Delete%20Keyword.png) no-repeat; */
			}
			
			input::-webkit-input-placeholder {
				color: #9393AA;
				-webkit-text-fill-color: #9393AA;
			}
		</style>
	</head>

	<body class="app_page">
		<div style="background-color:  #F9FAFC; height: 100vh; width: 100%; margin: 0; overflow: auto;">
			<div id="loading" class="example">
			  <div class="sk-plane loading_location"></div>
			</div>
			
			<div class="mui-content">
					
				<div style="margin: 16px; box-sizing: border-box;">
					<div class="mui-card" style="border-radius: 24px;">
						<div class="z_menu_btn_row mui-input-row" style="height: 48px;line-height: 48px;padding: 0;padding-left: 16px;" >
								<img src="../../img/Icon_search.png" class="search_icon" />
								<input type="text" class="mui-input-clear search_frame" placeholder="牙科" />
						</div>
					</div>
				</div>
						
				<div style=" box-sizing: border-box;">
					<!-- <div class="mui-card" style="width: 157px;height: 262px;">
						<div class="z_menu_btn_row" style="height: 209px;line-height: normal;padding: 0;border: 0;background: url(../../img/head.png) no-repeat;background-size: 157px 209px;">
						<div class="live_head">
							<div class="left_area" style="margin-left: 6px;">
								<img src="../../img/组%201.png" style="margin: -5px 0;" />
								<span class="status_txt">直播中</span>
							</div>
							<div class="right_area" style="margin-right: 6px;">
								<img src="../../img/ic_account_active.png" style="margin: -2px 0;" />
								<span class="watched_num">1234</span>
							</div>
						</div>
						<div class="bt_txt">
							<span>#心脑血管疾病#</span>
						</div>
						</div>
						<div class="z_menu_btn_row" style="width: 157px;height: 53px;line-height: normal;padding: 0 8px;">
							<div style="margin-top: 8px;">
								<span class="doctor_name">陈维</span>
								<span class="doctor_introduction">主任医师</span>
							</div>
							<div>
								<span class="doctor_introduction">上海第十人民医院</span>
								<span class="doctor_introduction">心内科</span>
							</div>
						</div>
					</div> -->
					<div id="live_room"></div>
				</div>
						
				</div>
			</div>
		
		
		<script type="text/javascript">
			mui.init({
				swipeBack: true //启用右滑关闭功能
			});
			
			var liveRoomInfo = [
				{id: "1", doctorName: "陈维", profession: "主任医师", hospital: "上海第十人民医院", department: "心内科", img: "../../img/head.png", roomName: "心脑血管疾病"},
				{id: "2", doctorName: "陈维", profession: "主任医师", hospital: "上海第十人民医院", department: "心内科", img: "../../img/head.png", roomName: "心脑血管疾病"},
				{id: "3", doctorName: "陈维", profession: "主任医师", hospital: "上海第十人民医院", department: "心内科", img: "../../img/head.png", roomName: "心脑血管疾病"},
				{id: "4", doctorName: "陈维", profession: "主任医师", hospital: "上海第十人民医院", department: "心内科", img: "../../img/head.png", roomName: "心脑血管疾病"},
				{id: "5", doctorName: "陈维", profession: "主任医师", hospital: "上海第十人民医院", department: "心内科", img: "../../img/head.png", roomName: "心脑血管疾病"}
			];
			
			var liveRoomInfoOBJ = {};
			
			var menurows = [
				{id: "1", name: "选择疾病类型", path: "./myzs",_id: 10},
				{id: "2", name: "详细信息", path: "./ysxx"},
				{id: "3", name: "门诊排班", path: "./mzpb"},
				{id: "4", name: "共享的随访量表", path: "./sflb"},
			];
			
			setRouteParams({userId: "1352141846545367042",params: {}});

			function initPage() {
				
				liveRoomInfoOBJ = {};
				liveRoomInfo.map(e=> {
					liveRoomInfoOBJ[e.id] = e;
				})
				
				var live_room_list = document.getElementById('live_room');
				var live_room_data = "";
				for (var i = 0; i < liveRoomInfo.length; i++) {
					var live_room_data1 = 
				
					
					'<div class="mui-card" onclick="click_row('+"'" + liveRoomInfo[i].id + "'"+')" style="width: 43%;height: 262px;float: left;margin: 16px 3.5% 0;">'+
						'<div class="z_menu_btn_row" style="height: 209px;line-height: normal;padding: 0;border: 0;background: url('+liveRoomInfo[i].img+') no-repeat;background-size: 100% 209px;">'+
						'<div class="live_head">'+
							'<div class="left_area" style="margin-left: 6px;">'+
								'<img src="../../img/组%201.png" style="margin: -5px 0;margin-right: 3px;" />'+
								'<span class="status_txt">直播中</span>'+
							'</div>'+
							'<div class="right_area" style="margin-right: 6px;">'+
								'<img src="../../img/ic_account_active.png" style="margin: -2px 0;" />'+
								'<span class="watched_num">1234</span>'+
							'</div>'+
						'</div>'+
						'<div class="bt_txt">'+
							'<span>#'+liveRoomInfo[i].roomName+'#</span>'+
						'</div>'+
						'</div>'+
						'<div class="z_menu_btn_row" style="width: 157px;height: 53px;line-height: normal;padding: 0 8px;">'+
							'<div style="margin-top: 8px;">'+
								'<span class="doctor_name">'+liveRoomInfo[i].doctorName+'</span>'+
								'<span class="doctor_introduction">'+liveRoomInfo[i].profession+'</span>'+
							'</div>'+
							'<div>'+
								'<span class="doctor_introduction" style="padding-right:5px;">'+liveRoomInfo[i].hospital+'</span>'+
								'<span class="doctor_introduction">'+liveRoomInfo[i].department+'</span>'+
							'</div>'+
						'</div>'+
					'</div>'
					
					live_room_data += live_room_data1;
				}
					live_room_list.innerHTML = live_room_data;
			}
			
			function click_row(idStr) {
				var row = liveRoomInfoOBJ[idStr];
					var pam = {
						_id: 2001,
					    params:{
							userId: login_data.userId
						 }
					   };
				app_click("route", pam, callback);
			}
			
			function loadData() {
				ajaxGet('doctor/api/query/' + login_data.params.doctorId, function(result) {
					if (result) {
						console.info(result);
						doctor = result.data
					}
					doLoadData();
					hideloading("loading");
				});
			}
			function doLoadData(){
				
			}
			
			//3. run
			mui.ready(function() {
				onInitReady(function() {
					// setRightBtn("rightBtn", {_id: 3000}, callback);
					initPage();
					loadData();
				});
			})
		</script>
	</body>

</html>