Przeglądaj źródła

咨询相关页面内容修改

raolu 7 lat temu
rodzic
commit
d2b130ce1a

+ 1 - 1
html/qygl/js/fuwujilu.js

@ -1,7 +1,7 @@
var fuwujilu = {
    getInfo: function(){
        var url = "/patient/sign/sign_service_info",
            params = {signCode: request.code};
            params = {doctor: request.doctor};
        d.show();
        getReqPromise(url, params, "json", "post").then(function(res){
            if(res.status == 200){

+ 1 - 1
html/yszx/html/consulting-doctor.html

@ -30,7 +30,7 @@
			<div class="r-sigh">!</div>
			<div id="audio_tips" class="rsalert">手指上滑,取消发送</div>
		</div>
		<audio src="" id="audio" onended="playSoundEnd()" onerror="playError()"></audio>
		<audio src="" id="audio" onended="playSoundEnd()"></audio>
		<div class="c-main">
			
			<div class="labcon">

+ 4 - 4
html/yszx/html/doctor-work-hours.html

@ -69,12 +69,12 @@
		    <div class="mui-scroll">
				<div class="mb-head">
					<ul id="jc-Type" class="mb-tag">
						<li class="active" data-type='1'>
							<div>全科医生工作时间</div>
						<li class="active" data-type='1' style="-webkit-box-flex: 1;">
							<div>医生工作时间</div>
						</li>
						<li data-type='2'>
						<!--<li data-type='2'>
							<div>健管师工作时间</div>
						</li>
						</li>-->
					</ul>
				</div>
				<ul id="xt-ul" class="fa-contain">

+ 7 - 8
html/yszx/js/add-consult.js

@ -178,7 +178,7 @@ function submitSuccess(res) {
        $("#commit").css("pointer-events","");
        d.close();
        //页面跳转到消息页面
        localStorage.setItem("signInfo_tab", 1);
        localStorage.setItem("signInfo_tab", 0);
        var direct_url = "../../qygl/html/sign_info.html?doctor="+doctorCode+"&consult="+res.data.consult;
        
        window.location.href = direct_url;
@ -223,13 +223,12 @@ function getWxSign(){
                });
            } 
            else{
                dialog({
                    title:'提示',
                    skin:"ui-dialog ax-popup pror", 
                    content:"获取微信签名失败", 
                    ok: function (){}
                }).showModal();
                window.location.href = "doctor-consultation.html";
//              dialog({
//                  title:'提示',
//                  skin:"ui-dialog ax-popup pror", 
//                  content:"获取微信签名失败", 
//                  ok: function (){}
//              }).showModal();
            }
        }
    });

+ 4 - 29
html/yszx/js/consulting-doctor.js

@ -325,33 +325,8 @@ function queryFailed(res) {
function querySuccess(res) {
	if (res.status == 200) {
		if(res.data == 0){
	        if(Request.type == "6" || Request.type == "1"){ //名医咨询和三师咨询均使用旧的页面
                $("#divBottom").show();
                $("#finish_list").show();
                $("#input_div").show();
                winSize(102);
            }else{
                //进行中的咨询跳转去签约管理页面的咨询tab显示
                //获取teamcode
                var url = "patient/sign_status",
                    params = {};
                sendPost(url, params, "json", "post", queryFailed, function(res1){
                    var teamCode = res1["teamCode_2"];
                    var signCode = res1["signCode_2"];
                    localStorage.setItem("signInfo_tab", "1");
                    if(doctor){
                        window.location.href = "../../qygl/html/sign_info.html?code="+signCode+"&teamCode="+teamCode+"&type=2&doctor="+doctor+"&consult="+consult;
                    }else{
                        var url2 = "/patient/consult/getConsult";
                        sendPost(url2, {consult: consult}, "json", "post", queryFailed, function(res2){
                            if(res2.status == 200){
                                var doctor = res2.data.doctor;
                                window.location.href = "../../qygl/html/sign_info.html?code="+signCode+"&teamCode="+teamCode+"&type=2&doctor="+doctor+"&consult="+consult;
                            }
                        })
                    }
                });
            }
		    //未结束的咨询跳转去咨询页面
            window.location.href = "../../qygl/html/sign_info.html?doctor="+doctor+"&consult="+consult;
		}else{
			$("#divBottom").hide();
			$("#finish_list").hide();	
@ -364,11 +339,11 @@ function querySuccess(res) {
				if (res.status == 200) {
					evaluate = res.data;
					//显示评价按钮
		            if(evaluate == 0 && doctorType==2 ){
		            if(evaluate == 0){
					    	$('#valFoot').show();
					    	$('#noval').show();
					    	$('#hasval').hide();
				    }else if(evaluate == 1 && doctorType==2){
				    }else if(evaluate == 1){
					    	$('#valFoot').show();
					    	$('#noval').hide();
					    	$('#hasval').show();

+ 4 - 13
html/yszx/js/doctor-consultation_new.js

@ -147,8 +147,8 @@ function getHealthConsulationList(isInit){
                        o.symptoms = o.symptoms.replace(reg, '<em>'+searchText+"</em>");
                    }
                    var divStatus = "";
                    if(o.type==2){
                    	if(o.status==0){
//                  if(o.type==2){
                        if(o.status==0){
	                        //咨询中
	                        divStatus = "div-beginning";
	                    }else if(o.evaluate ==1){
@ -156,7 +156,7 @@ function getHealthConsulationList(isInit){
	                    }else{
	                        divStatus = "div-novalue";
	                    }
                    }
//                  }
                    o.statusClass = divStatus;
                    return o;
                });
@ -357,16 +357,7 @@ function bindEvents(){
        var userInfo = JSON.parse(userAgent);
        var jsonData = JSON.parse(this.getAttribute("data-json"));
        if(jsonData.status == 0){
            var url = "patient/sign_status",
                params = {};
            d.show();
            sendPost(url, params, "json", "post", queryFailed, function(res){
                d.close();
                var teamCode = res["teamCode_2"];
                var signCode = res["signCode_2"];
                localStorage.setItem("signInfo_tab", "1");
                window.location.href = "../../qygl/html/sign_info.html?code="+jsonData.signCode+"&consult="+jsonData.code+"&teamCode="+jsonData.teamCode+"&type="+jsonData.type+"&doctor="+jsonData.doctorCode;
            });
            window.location.href = "../../qygl/html/sign_info.html?consult="+jsonData.code+"&doctor="+jsonData.doctorCode;
        }else{
            localStorage.setItem("evaluate",jsonData.evaluate);
            window.location.href = "consulting-doctor.html?consult=" + jsonData.code+"&type="+jsonData.type+"&toUser="+userInfo.uid+"&doctor="+jsonData.doctorCode;

+ 63 - 13
html/yszx/js/doctor-homepage.js

@ -1,7 +1,13 @@
var Request = GetRequest(); 
var request = GetRequest(); 
var d = dialog({contentType:'load', skin:'bk-popup'});
var doctorCode = Request["doctorCode"],
    type = Request["type"]; //如果是扫二维码的页面,则这个type值为1
var doctorCode = request["doctorCode"], //医生二维码扫描连接的参数,doctorCode_type
    doctor = request["doctor"],
    type = ''; //如果是扫二维码的页面,则这个type值为1
if(doctorCode){
    doctor = doctorCode.split("_")[0];
    type = 1;
}
var userAgent = window.localStorage.getItem(agentName);
var pagetype = 0;
var docInfo;
@ -21,7 +27,7 @@ function pageInitData(){
    d.show();
    var url = "family_contract/homepage/homepage",
        params = {
            doctor:doctorCode
            doctor:doctor
        }
    sendPost(url, params, 'json', 'post', queryFailed, function(res){
        if(res.status==200){
@ -79,7 +85,9 @@ function bindEvents(){
        if($this.hasClass("grey")){
            concernDoctor();
        }else{
            cancelConcern();
            //先判断是否有未结束的咨询,如果有未结束的咨询则不允许取消关注
            d.show();
            is_consult_finished(true);
        }
    })
}
@ -90,7 +98,7 @@ function concernDoctor(addConsult){
    var url = "/patient/concern/addConcern",
        params = {
            patient: userAgent.uid,
            doctor: doctorCode,
            doctor: doctor,
            concernSource: type || '2'//(关注方式: 1扫描二维码 2咨询关注 3.其他)
        };
    sendPost(url, params, 'json', 'post', queryFailed, function(res){
@ -112,11 +120,11 @@ function concernDoctor(addConsult){
//取消关注
function cancelConcern(){
    d.show();
//  d.show();
    var url = "/patient/concern/deleteConcern",
        params = {
            patient: userAgent.uid,
            doctor: doctorCode
            doctor: doctor
        };
    sendPost(url, params, 'json', 'post', queryFailed, function(res){
        d.close();
@ -130,20 +138,30 @@ function cancelConcern(){
}
//判断是否有未结束的咨询
function is_consult_finished(){
function is_consult_finished(isCancelConcern){
    var url = 'patient/consult/is_consult_unfinished',
        params = {doctor: docInfo.doctor};
    sendPost(url, params, 'json', 'post', function(res){
        queryFailed(res, '获取是否存在咨询失败');
    },function(res){
        d.close();
        if(res.status == 200){
            if(res.data == ""){
                //无进行中的咨询, 跳转去
                window.location.href = "add-consult.html?doctorCode="+docInfo.doctor+"&doctorName="+docInfo.name+"&jobName="+docInfo.jobName;
                if(isCancelConcern){
                    cancelConcern();
                }else{
                    checkDocInWork();
//                  window.location.href = "add-consult.html?doctorCode="+docInfo.doctor+"&doctorName="+docInfo.name+"&jobName="+docInfo.jobName;
                }
            } else {
                d.close();
                var content = '十分抱歉,您与'+ docInfo.name +'医生还有<br/>未结束咨询,';
                if(isCancelConcern){
                    content += '需结束咨询后才能取消关注';
                }else{
                    content += '无法发起新的咨询';
                }
                dialog({
                    content: '十分抱歉,您与'+ docInfo.name +'医生还有<br/>未结束咨询,无法发起新的咨询',
                    content: content,
                    okValue:'前往查看',
                    ok: function (){
                        var url = "../../qygl/html/sign_info.html?consult="+res.data+"&doctor="+docInfo.doctor;
@ -161,6 +179,38 @@ function is_consult_finished(){
    });
}
//获取签约医生的工作时间
function checkDocInWork(){
    var url = 'patient/consult/isDoctorWorkWhenconsult',
        params = {
            doctor: doctor
        };
    sendPost(url, params, 'json', 'post', queryFailed, function(res){
        if(res.status == 200){
            d.close();
            //  data:0-医生不接受咨询/1-医生当前接受咨询/2-全科医生和健管师当前都不在工作时间/3-全科医生当前不在工作时间/4-健管师当前不在工作时间           健管师当前不在工作时间
            if(!(res.data == "1")){
                dialog({
                    content: '您好,由于您关注的医生工作繁忙,设置了每日回复咨询的时间段,所以,在该时间段外的时间,您的咨询将不会马上获得医生的回复。',
                    okValue:'查看医生工作时间',
                    ok: function (){                                    
                        window.location.href = "doctor-work-hours.html?doctor=" + doctor;
                    },
                    cancelValue: '继续新增咨询',
                    cancel: function () {
                        window.location.href = "add-consult.html?doctorCode="+docInfo.doctor+"&doctorName="+docInfo.name+"&jobName="+docInfo.jobName;
                    }
                 }).showModal();
            }else{
                //跳转到新增咨询页面
                window.location.href = "add-consult.html?doctorCode="+docInfo.doctor+"&doctorName="+docInfo.name+"&jobName="+docInfo.jobName;
            }
        }else{
            queryFailed(res);
        }
    });
}
function queryFailed(res){
    d.close();
    if (res && res.msg) {

+ 1 - 1
html/yszx/js/focused-doctor.js

@ -65,7 +65,7 @@ function bindEvents(){
    //单个医生点击
    $("#docList").on("tap", "li", function(){
        var doctorCode = $(this).attr("data-code");
        window.location.href = "doctor-homepage.html?doctorCode="+doctorCode;
        window.location.href = "doctor-homepage.html?doctor="+doctorCode;
    })
}

+ 1 - 1
html/yszx/js/select-consult-doctor.js

@ -119,7 +119,7 @@ function bindEvents(){
    //单个医生点击
    $("#docList").on("tap", "li", function(){
        var doctorCode = $(this).attr("data-code");
        window.location.href = "doctor-homepage.html?doctorCode="+doctorCode;
        window.location.href = "doctor-homepage.html?doctor="+doctorCode;
    })
}