Browse Source

消息、健康咨询按前端需求整改,未对接接口

linehang 7 years ago
parent
commit
87de9dd1ee

+ 3 - 3
html/home/html/jumingim.html

@ -82,11 +82,11 @@
					<div class="c-list-info" style="padding-right:0px;">
						<p class="pb5" style="color: #333;">
							<span class="c-name text-ellipsis">{{it.name}}</span>
							{{if it.type == 8}}
							<!--{{if it.type == 8}}
                            <span class="span-invite">续方咨询</span>
							{{else if it.is_invite && it.type!=2}} <!--健康咨询-->
								<span class="span-invite">已邀请全科</span>
							{{/if}}
								<!--<span class="span-invite">已邀请全科</span>
							{{/if}}-->
							
                        </p>
						<p class="c-909090 last-content text-ellipsis" style="font-size: 14px;">

+ 3 - 3
html/home/html/sousuojuming.html

@ -94,11 +94,11 @@
							{{else}}
								<span>(男 {{it.idcard | setAge}}岁)</span>
							{{/if}}
							{{if it.session_type==8}} 
							<!--{{if it.session_type==8}} 
								<div class="span-invite">续方咨询</div>
							{{else if it.session_type!=2}} <!--健康咨询-->
								<div class="span-invite">已邀请全科</div>
							{{/if}}
								<!--<div class="span-invite">已邀请全科</div>
							{{/if}}-->
						</h4>
						<h4 class="c-333 c-f16 c-fwb c-content-warp mt10">
							<span class="j-text-ellipsis" data-text="{{it.idcard}}" style="color: #333;">{{it.idcard}}</span>

+ 3 - 3
html/home/html/xiaoxi.html

@ -21,7 +21,7 @@
				font-size: 16px!important;
			}
			.f-dn{display: none;}
			.div-group-btn{position: absolute;top: 50%;left: 50%;margin-top: -15px;margin-left: -127px;width: 255px;height: 30px;line-height: 30px;border-radius: 10px;background: #039BDC;}
			.div-group-btn{position: absolute;top: 50%;left: 50%;margin-top: -15px;margin-left: -85px;width: 170px;height: 30px;line-height: 30px;border-radius: 10px;background: #039BDC;}
			.div-group-btn .div-item{width: 85px;float: left;position: relative;height: 30px;}
			.div-group-btn .div-item.active{background: #fff;border-radius: 10px;}
			.div-group-btn .div-item .div-image{width:15px;height: 15px;background-size: 15px;margin-top: 8px;margin-right: 5px;position: absolute;left: 20px;}
@ -55,11 +55,11 @@
							<span class="div-red-dian f-dn"></span>
						</div>
						
						<div class="div-item" data-type="3">
						<!--<div class="div-item" data-type="3">
							<div class="div-image yisheng-img"></div>
							<span class="div-title">医生</span> 
							<span class="div-red-dian f-dn"></span>
						</div>
						</div>-->
					</div>
					
				</div>

+ 5 - 5
html/home/html/xiaoxipage.html

@ -37,7 +37,7 @@
								<i class="iconfont c-icon c-icon-qianyuexiaoxi"></i>
							</div>
							<div class="c-list-info">
								<p class="c-name">签约消息</p>
								<p class="c-name">关注消息</p>
								<p id="sign_lastMsg" class="c-909090 text-ellipsis c-hide"></p>
							</div>
							<div class="c-909090 l-list-times">
@ -89,7 +89,7 @@
						</div>
					</li>
					<!-- 协同消息 -->
					<li data-code="xtfw" data-html="../../xtfw/html/xietongfuwu-message.html" data-type="" style="padding: 0; margin: 0; position: relative;display: none;">
					<!--<li data-code="xtfw" data-html="../../xtfw/html/xietongfuwu-message.html" data-type="" style="padding: 0; margin: 0; position: relative;display: none;">
                        <div class="l-info" >
                            <div class="icon-area circle-40">  
                                <i class="iconfont c-icon c-icon-xietongfuwu"></i>  
@ -103,9 +103,9 @@
                                <div class="red-dot c-hide" style="margin-top: 0px; background: #95d6ef;" id="xietongNum"></div>
                            </div>
                        </div>
                    </li> 
                    </li> -->
					<!--续方消息--> 
					<li data-code="xfxx" class="xfxx"  data-html="../../prescription/html/xufangxiaoxi.html" data-type="" style="padding: 0; margin: 0; position: relative; display: none;">
					<!--<li data-code="xfxx" class="xfxx"  data-html="../../prescription/html/xufangxiaoxi.html" data-type="" style="padding: 0; margin: 0; position: relative; display: none;">
						<div class="l-info" >
							<div class="icon-area circle-40">  
								<i class="iconfont c-icon c-icon-xufangxiaoxi"></i>  
@ -119,7 +119,7 @@
								<div class="red-dot c-hide" style="margin-top: 0px; background: #95d6ef;" id="renewIdex"></div>
							</div>
						</div>
					</li>
					</li>-->
				</ul>
			</div>
		</div>

+ 31 - 31
html/home/js/xiaoxi.js

@ -1,6 +1,6 @@
var first = true, docInfo, teamInfo,thisTeamsId , leader;
var $xfxx=$("[data-code='xfxx']");//续方
var $xtfw=$("[data-code='xtfw']");//协同
//var $xtfw=$("[data-code='xtfw']");//协同
var type;
mui.plusReady(function() {
@ -11,15 +11,15 @@ mui.plusReady(function() {
	page.init();
	teams = JSON.parse(plus.storage.getItem("teamInfo"));
	//控制协同
	if(docInfo.hospital){
		if(docInfo.hospital.substr(0,6) == '350211' && docInfo.level == 1){
			$xtfw.show()
		}else{
			$xtfw.hide()
		}
	}else{
		$xtfw.hide()
	}
//	if(docInfo.hospital){
//		if(docInfo.hospital.substr(0,6) == '350211' && docInfo.level == 1){
//			$xtfw.show()
//		}else{
//			$xtfw.hide()
//		}
//	}else{
//		$xtfw.hide()
//	}
})
var page={
@ -109,28 +109,28 @@ var page={
				}
				
				//处理 续方消息 
				if (res.data.prescription && res.data.prescription.amount>0) { 
					$(".xfxx").attr('data-type', res.data.prescription.lastMessage.type);
					lastMessage = res.data.prescription.lastMessage || p;
					var time = formatShowTime(lastMessage.msgTime);    
					m.$renewIdex.html(assesCount(res.data.prescription.amount)).removeClass('c-hide')
						.prev().html(time).removeClass('c-hide'); 
					$('#xfxx_lastMsg').html(lastMessage.title).removeClass('c-hide'); 
				}else{
					m.$renewIdex.addClass('c-hide').prev().addClass('c-hide');  
					$('#xfxx_lastMsg').addClass('c-hide'); 
				}
//				if (res.data.prescription && res.data.prescription.amount>0) { 
//					$(".xfxx").attr('data-type', res.data.prescription.lastMessage.type);
//					lastMessage = res.data.prescription.lastMessage || p;
//					var time = formatShowTime(lastMessage.msgTime);    
//					m.$renewIdex.html(assesCount(res.data.prescription.amount)).removeClass('c-hide')
//						.prev().html(time).removeClass('c-hide'); 
//					$('#xfxx_lastMsg').html(lastMessage.title).removeClass('c-hide'); 
//				}else{
//					m.$renewIdex.addClass('c-hide').prev().addClass('c-hide');  
//					$('#xfxx_lastMsg').addClass('c-hide'); 
//				}
				//处理 协同消息 
				if (res.data.callService && res.data.callService.amount>0) { 
					lastMessage = res.data.callService.lastMessage || p;
					var time = formatShowTime(lastMessage.msgTime);    
					m.$xietong.html(assesCount(res.data.callService.amount)).removeClass('c-hide')
						.prev().html(time).removeClass('c-hide'); 
					$('#xt-last').html(lastMessage.msg).removeClass('c-hide'); 
				}else{
					m.$xietong.addClass('c-hide').prev().addClass('c-hide');  
					$('#xt-last').addClass('c-hide'); 
				}
//				if (res.data.callService && res.data.callService.amount>0) { 
//					lastMessage = res.data.callService.lastMessage || p;
//					var time = formatShowTime(lastMessage.msgTime);    
//					m.$xietong.html(assesCount(res.data.callService.amount)).removeClass('c-hide')
//						.prev().html(time).removeClass('c-hide'); 
//					$('#xt-last').html(lastMessage.msg).removeClass('c-hide'); 
//				}else{
//					m.$xietong.addClass('c-hide').prev().addClass('c-hide');  
//					$('#xt-last').addClass('c-hide'); 
//				}
				
				if(res.data.famousConsult && res.data.famousConsult.amount>0){  
					lastMessage = res.data.famousConsult.lastMessage || p;

+ 8 - 5
html/message/html/p2dzixun.html

@ -123,11 +123,14 @@
							<li><img src="../images/kuaijiehuifu_icon.png" width="43" onclick="kjhf()">
								<p class="c-f15">快捷回复</p>
							</li>
							<li class="notmy"><img src="../images/daiyuyue_icon.png" width="43" onclick="dyyjl()">
							<!--<li class="notmy"><img src="../images/daiyuyue_icon.png" width="43" onclick="dyyjl()">
								<p class="c-f15">代预约</p>
							</li>
							<li class="notmy" id="qiuzhuico"><img src="../images/qiuzhuyisheng_icon.png" width="43" onclick="qiuzhu()">
								<p class="c-f15"></p>
							</li>-->
							<li class="notmy"><img src="../images/jiankangjiaoyu_icon.png" width="43" onclick="jkjy()">
								<p class="c-f15">健康教育</p>
							</li>
							<li class="notmy"><img src="../images/linshisuifang_icon.png" width="43" onclick="lssf()">
								<p class="c-f15">随访</p>
@ -137,18 +140,18 @@
							</li>
						</ul>
					</div>
					<div class="mui-slider-item">
					<!--<div class="mui-slider-item">
						<ul>
							<li class="notmy"><img src="../images/jiankangjiaoyu_icon.png" width="43" onclick="jkjy()">
								<p class="c-f15">健康教育</p>
							</li>
						</ul>
					</div>
					</div>-->
				</div>
				<div id="muiSliderIndicator" class="mui-slider-indicator">
				<!--<div id="muiSliderIndicator" class="mui-slider-indicator">
					<div class="mui-indicator mui-active"></div>
					<div class="mui-indicator"></div>
				</div>
				</div>-->
			</div>
			
		</div>

+ 3 - 3
html/qygl/html/qianyuexiaoxi.html

@ -3,7 +3,7 @@
	<head>
		<meta charset="utf-8">
		<title>签约消息</title>
		<title>关注消息</title>
		<meta name="author" content="yihu.com" />
		<meta name="format-detection" content="telephone=no" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0" />
@ -19,7 +19,7 @@
		<div class="h45">
			<div class="demo-comtop">
				<a class="mui-action-back"></a>
				<h1>签约消息</h1>
				<h1>关注消息</h1>
			</div>
		</div>
		<div class="c-main">
@ -98,7 +98,7 @@
						if (!$("#wushuju").hasClass("c-hide")) {
							!$("#wushuju").addClass("c-hide");
						}
						
						console.log(res)
						var cont = template("sign_tmpl", res);
						$("#sign_list").html(cont);
						$("#load_more").removeClass("c-hide");

+ 17 - 0
html/xiaoxi/css/td-style.css

@ -0,0 +1,17 @@
.td-tit{display: flex;margin: 10px;border:1px solid #e1e1e1;-webkit-border-raius:5px;border-radius:5px;background: #fff;}
.td-tit li{position:relative;flex: 1;text-align: center;-webkit-border-raius:5px;border-radius:5px;}
.td-tit li div:first-child{padding: 10px 0;font-size: 20px;font-weight: 600;}
.td-tit li div:last-child{padding-bottom: 8px;font-size: 14px;}
.td-tit li:after{content: ' ';width: 1px;position: absolute;top: 15px; right: 0;bottom: 15px;background: #E1E1E1;}
.td-tit li:last-child:after{content: ' ';width: 0;}
.wait-num{color: #ff4c4c;}
.ok-num{color: #06bf04;}
.con-num{color: #17b3ec;}
.td-item{position:relative;display:block;background: #fff;border-top:1px solid #e1e1e1;border-bottom:1px solid #e1e1e1;margin-bottom: 10px;padding-left: 60px;padding-right: 45px;}
.td-head{width: 40px;height: 40px;-webkit-border-radius: 50%;border-radius: 50%;position: absolute;top: 50%;-webkit-transform: translateY(-50%);left: 10px;overflow: hidden;}
.td-head img{width: 100%;height: 100%;}
.remind-link{position: absolute;width:45px;top: 0;bottom: 0;right: 0;background: #19d5c5;color: #fff;font-size: 14px;text-align: center;padding-top: 20px;}
.td-i-con h3{padding: 10px 0 12px 0;font-size: 18px;color: #333;}
.td-i-con div{display: inline-block;font-size: 14px;color: #999;padding: 0 10px 10px 0;}
.rl-none{background: #ccc;}
.td-con{display: block;}

+ 135 - 101
html/xiaoxi/html/jiankangzixun.html

@ -12,6 +12,8 @@
		<link rel="stylesheet" href="../../../common/cross/css/cross.css" type="text/css" />
		<link rel="stylesheet" href="../../../common/cross/css/cross.ui.css" type="text/css" />
		<link rel="stylesheet" type="text/css" href="../../../common/css/jy-style.css">
		<link rel="stylesheet" type="text/css" href="../iconfont/iconfont.css">
		<link rel="stylesheet" href="../css/td-style.css" />
		<style type="text/css">
			.jkzx-td{
				position: absolute;
@ -171,12 +173,12 @@
			<li class="checked" data-name="健康咨询">
				<img src="../images/checked_blue.png"><label>健康咨询</label>
			</li>
			<li class="" data-name="公共咨询">
			<!--<li class="" data-name="公共咨询">
				<img src="../images/checked_blue.png"><label>公共咨询</label>
			</li>
			<li class="" data-name="续方咨询" id="xfzx" style="display: none;">
				<img src="../images/checked_blue.png"><label>续方咨询</label>
			</li>
			</li>-->
		</ul>
		<!--下拉选择-->
		
@ -184,22 +186,33 @@
			<div class="h45">
				<div class="demo-comtop">
					<a class="mui-action-back" href="../../home/html/xiaoxi.html"></a>
					<h1><span class="jkzx-title">健康咨询</span><label class="lin-down-arrow"></label></h1>
					<a data-href="../../zdzx/html/tuanduitongji.html" class="jkzx-td" style="display: none;font-size: 16px;">团队统计</a>
					<h1><span class="jkzx-title">健康咨询</span><!--<label class="lin-down-arrow"></label>--></h1>
					<!--<a data-href="../../zdzx/html/tuanduitongji.html" class="jkzx-td" style="display: none;font-size: 16px;">团队统计</a>-->
				</div>
			</div>
			<div style="position: fixed;top: 45px;left: 0;right: 0;bottom:0" id='con1'></div>
			<div style="display:none;position: fixed;top: 45px;left: 0;right: 0;bottom:0" id='con2'></div>
			<ul class="td-tit">
				<!--总的回复情况-->
			</ul>
			<div style="position: fixed;top: 145px;left: 0;right: 0;bottom:0" id='con1'></div>
			<div style="display:none;position: fixed;top: 145px;left: 0;right: 0;bottom:0" id='con2'></div>
		</div>
	</body>
	<script type="text/javascript" src="../../../js/jquery/2.1.3/jquery.js"></script>
	<script src="../../../js/mui.min.js"></script>
	<script src="../../js/common.js"></script>
	<script src="../../../js/template.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../../js/common_http.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/html" id="totalReply">
		<li><div class="wait-num">{{data.totalUnReply}}</div><div>未回复</span></li>
		<li><div class="ok-num">{{data.totalReply}}</div><div>已回复</span></li>
		<li><div class="con-num">{{data.totalConsult}}</div><div>咨询量</span></li>
	</script>
	<script type="text/javascript">
		var self;
		var zdwv, ggwv,xfwv;
		var $linMask = $('.lin-mask'),
		var $tdTit = $('.td-tit'),
			$linMask = $('.lin-mask'),
			$linSelGroup = $('.lin-sel-group'),
			$linSelGroupChilds = $linSelGroup.children(),
			$jkzxTitle = $('.jkzx-title');
@ -208,22 +221,26 @@
		mui.plusReady(function() {
			docInfo = JSON.parse(plus.storage.getItem("docInfo"));
			teamInfo = JSON.parse(plus.storage.getItem("teamInfo"));
			
			getTotalData()
			
			
			var wvStyle = {
				top: "45px",
				top: "145px",
				bottom: "0px"
			};
			self = plus.webview.currentWebview();
			zdwv = plus.webview.create("../../zdzx/html/zhidingzixun.html",
				"zhidingzixun", wvStyle);
			ggwv = plus.webview.create("../../ggzx/html/gonggongzixun.html",
				"gonggongzixun", wvStyle);
			xfwv = plus.webview.create("../../prescription/html/xufangzixun.html",
				"xufangzixun", wvStyle); 
//			ggwv = plus.webview.create("../../ggzx/html/gonggongzixun.html",
//				"gonggongzixun", wvStyle);
//			xfwv = plus.webview.create("../../prescription/html/xufangzixun.html",
//				"xufangzixun", wvStyle); 
			ggwv.hide();
			xfwv.hide();
			self.append(xfwv);
			self.append(ggwv);  
//			ggwv.hide();
//			xfwv.hide();
//			self.append(xfwv);
//			self.append(ggwv);  
			self.append(zdwv);  
			plus.nativeUI.closeWaiting();
			
@ -245,94 +262,111 @@
			}	
		})
		
		$('.jkzx-td').on( 'click', function () {
			mui.openWindow({
				id: 'jkzx-td',
				url: $(this).attr('data-href'),
				waiting:{
					autoShow:false
				},
				extras:{}
			})
		});
		
		mui("#menulab").on("tap", "li", function() {
			$("#menulab li").removeClass("hit");
			$(this).addClass("hit");
			var dval = this.getAttribute("data-val");
			if(dval == "1")  {
				mui.fire(zdwv, 'refresh');
				plus.webview.show(zdwv);
				plus.webview.hide(ggwv);
			} else if(dval == "0") {
				mui.fire(ggwv, "refresh");
				plus.webview.show(ggwv);
				plus.webview.hide(zdwv);
		//获取团队回复情况总量
		function getTotalData () {
//			var lastTeamId = docInfo.adminTeamCode;
//			sendGet('im_new/consult/getTeamData',{adminTeamCode:lastTeamId},null,getDocInfoListSucc);
			sendGet('im_new/consult/getDoctorData',{},null,getDocInfoListSucc);
		}
		function getDocInfoListSucc (data) {
			if (data.status === 200) {
				if (data.data.doctors.length > 0) {
					var totalReplyHtml = template('totalReply', {data: data.data});
					$tdTit.html(totalReplyHtml);
				}
			} else {
				mui.toast(data.msg);
			}
		});
		}
		
//		$('.jkzx-td').on( 'click', function () {
//			mui.openWindow({
//				id: 'jkzx-td',
//				url: $(this).attr('data-href'),
//				waiting:{
//					autoShow:false
//				},
//				extras:{}
//			})
//		});
		
//		mui("#menulab").on("tap", "li", function() {
//			$("#menulab li").removeClass("hit");
//			$(this).addClass("hit");
//			var dval = this.getAttribute("data-val");
//
//			if(dval == "1")  {
//				mui.fire(zdwv, 'refresh');
//				plus.webview.show(zdwv);
//				plus.webview.hide(ggwv);
//			} else if(dval == "0") {
//				mui.fire(ggwv, "refresh");
//				plus.webview.show(ggwv);
//				plus.webview.hide(zdwv);
//			}
//
//		});
		//显示下拉框
		$('.demo-comtop h1').on('click', function () {
			ggwv.hide();
			zdwv.hide();
			xfwv.hide();
			$linMask.show();
			$linSelGroup.show();
		});
//		$('.demo-comtop h1').on('click', function () {
//			ggwv.hide();
//			zdwv.hide();
//			xfwv.hide();
//			$linMask.show();
//			$linSelGroup.show();
//		});
		//选择选下拉选项
		$linSelGroupChilds.on( 'click', function () {
			var index = $(this).index(),
			    dataName = $linSelGroupChilds.eq(index).attr('data-name');
		    $jkzxTitle.html(dataName);
		    $(this).addClass('checked').siblings().removeClass('checked');
		    switch (index) {
		    	case 0:
//					mui.fire(zdwv, 'refresh');
					plus.webview.show(zdwv);
					plus.webview.hide(ggwv);
					plus.webview.hide(xfwv);
					
		    		break;
	    		case 1:
					mui.fire(ggwv, "refresh");
					plus.webview.show(ggwv);
					plus.webview.hide(zdwv);
					plus.webview.hide(xfwv);
					
		    		break;
	    		case 2:
//					mui.fire(xfwv, "refresh");
					plus.webview.show(xfwv);
					plus.webview.hide(zdwv);
					plus.webview.hide(ggwv);
					
	    		break;
		    }
			$linMask.hide();
			$linSelGroup.hide();
		});
		$linMask.on( 'click', function () {
			var isFirst = $linSelGroupChilds.eq(0).hasClass('checked');
			var isSec   = $linSelGroupChilds.eq(1).hasClass('checked');
			var isThr   = $linSelGroupChilds.eq(2).hasClass('checked');
			if (isFirst) {
				plus.webview.show(zdwv);
				plus.webview.hide(ggwv);
				plus.webview.hide(xfwv);
				
			}else if(isSec){
				plus.webview.show(ggwv);
				plus.webview.hide(zdwv);
				plus.webview.hide(xfwv);
				
			}else if(isThr){
				plus.webview.show(xfwv);
				plus.webview.hide(ggwv);
				plus.webview.hide(zdwv);
				
			}
		});
//		$linSelGroupChilds.on( 'click', function () {
//			var index = $(this).index(),
//			    dataName = $linSelGroupChilds.eq(index).attr('data-name');
//		    $jkzxTitle.html(dataName);
//		    $(this).addClass('checked').siblings().removeClass('checked');
//		    switch (index) {
//		    	case 0:
////					mui.fire(zdwv, 'refresh');
//					plus.webview.show(zdwv);
//					plus.webview.hide(ggwv);
//					plus.webview.hide(xfwv);
//					
//		    		break;
//	    		case 1:
//					mui.fire(ggwv, "refresh");
//					plus.webview.show(ggwv);
//					plus.webview.hide(zdwv);
//					plus.webview.hide(xfwv);
//					
//		    		break;
//	    		case 2:
////					mui.fire(xfwv, "refresh");
//					plus.webview.show(xfwv);
//					plus.webview.hide(zdwv);
//					plus.webview.hide(ggwv);
//					
//	    		break;
//		    }
//			$linMask.hide();
//			$linSelGroup.hide();
//		});
//		$linMask.on( 'click', function () {
//			var isFirst = $linSelGroupChilds.eq(0).hasClass('checked');
//			var isSec   = $linSelGroupChilds.eq(1).hasClass('checked');
//			var isThr   = $linSelGroupChilds.eq(2).hasClass('checked');
//			if (isFirst) {
//				plus.webview.show(zdwv);
//				plus.webview.hide(ggwv);
//				plus.webview.hide(xfwv);
//				
//			}else if(isSec){
//				plus.webview.show(ggwv);
//				plus.webview.hide(zdwv);
//				plus.webview.hide(xfwv);
//				
//			}else if(isThr){
//				plus.webview.show(xfwv);
//				plus.webview.hide(ggwv);
//				plus.webview.hide(zdwv);
//				
//			}
//		});
	</script>
</html>