Sfoglia il codice sorgente

修复家人咨询问题

lulihong 6 anni fa
parent
commit
ec2061883c

+ 1 - 1
html/grzx/js/my-detail.js

@ -26,7 +26,7 @@ function queryInit() {
		$('.qiehuan-jiaren').hide()
	}
	queryUserInfo(); //查询用户信息
	getWeixinSign(); //获取微信签名
//	getWeixinSign(); //获取微信签名
}
//获得微信sdk信息

+ 6 - 8
html/qygl/js/consulting-doctor.js

@ -46,8 +46,8 @@ var ui = {
    areaMsgList: document.querySelector('#msg-list'),
    boxSoundAlert: document.querySelector('#sound-alert')
};
patientcode = userAgent.uid;
var request = GetRequest();
patientcode = request.patientcode;
var patientName = "";
@ -92,8 +92,8 @@ var consulting = {
                doResponse(res);
//          }
        });
        var userAgent1 = JSON.parse(window.localStorage.getItem(agentName1));
        patientName = userAgent1.name;
//      var userAgent1 = JSON.parse(window.localStorage.getItem(agentName1));
//      patientName = userAgent1.name;
    },
    bindEvents: bindConsultEvents
};
@ -350,7 +350,7 @@ function submitSuccess(res) {
//回复单条内容填写
var defaultPhoto = "../../../images/p-default.png";
var doctorDefaultPhoto = "../../../images/d-default.png";
function addReply(isDoctor, content, time, msgType, doctorName,photo,prepend, isSystem) {
function addReply(isDoctor, content, time, msgType, sender_name,photo,prepend, isSystem) {
    //time = time.substr(10);
    var doctorPhoto = photo ? getImgUrl(photo) : doctorDefaultPhoto;
    var $div = $("<dl></dl>");
@ -369,14 +369,12 @@ function addReply(isDoctor, content, time, msgType, doctorName,photo,prepend, is
    if (isDoctor == 1) {
        $div.addClass('chat-left');
        img = doctorPhoto;
        name = doctorName;
    } else {
        $div.addClass('chat-right');
        img = photo? getImgUrl(photo):defaultPhoto;
        defaultPhoto = img;
        name = patientName;
    }
    
    name = sender_name;
    var temp = '<dt style="height: auto; text-align: center;"><a><img src="' + img + '" class="c-images-cycle" /></a></dt>' +
    '<div class="c-content"><span class="c-f12 name">' + name + '</span>'
    switch(parseInt(msgType)) {

+ 19 - 5
html/yszx/js/add-consult.js

@ -3,13 +3,18 @@ var request = GetRequest(),
    doctorCode = request["doctorCode"],
    docInfo,
    patientInfo = window.localStorage.getItem(agentName1);
var userAgent = window.localStorage.getItem(agentName);
var patientcode = "";
var serverId = ""; //微信图片上传获取的图片id
$(function(){
    if(patientInfo){
        patientInfo = JSON.parse(patientInfo);
    }
    if(userAgent){
    	userAgent = JSON.parse(userAgent);
    	patientcode = userAgent.uid;
    }
//  $("#lbl_patient").text(patientInfo.name);
    
    //获取医生信息
@ -92,9 +97,18 @@ function getFamilyMembers(){
	                rows:5,
	                placeholder:'请选择咨询人员',
	                onSelect: function ( valueText, inst) {
	                	var wlyyAgent = localStorage.getItem("wlyyAgent");
	                	JSON.parse(wlyyAgent).uid = inst._tempValue;
	                	localStorage.setItem("wlyyAgent",wlyyAgent)
	                	var userAgent = JSON.parse(window.localStorage.getItem(agentName));
						if(userAgent){
							//删除represented字段	
							if(userAgent.represented){
								delete userAgent.represented
							}
							if(userAgent.uid!=inst._tempValue){
								userAgent.represented = inst._tempValue;
								patientcode = inst._tempValue;
							}
							window.localStorage.setItem(agentName,JSON.stringify(userAgent))
						}
	                }
	            })
	            $("#patientInfo").val(patientInfo.uid).show()
@ -235,7 +249,7 @@ function submitSuccess(res) {
        d.close();
        //页面跳转到消息页面
        localStorage.setItem("signInfo_tab", 0);
        var direct_url = "../../qygl/html/sign_info.html?doctor="+doctorCode+"&consult="+res.data.consult;
        var direct_url = "../../qygl/html/sign_info.html?doctor="+doctorCode+"&consult="+res.data.consult+"&patientcode="+patientcode;
        
        window.location.href = direct_url;
    } else { 

+ 5 - 5
html/yszx/js/doctor-consultation_new.js

@ -19,7 +19,6 @@ var expensesStatus ="";//'扣费状态 【""没有签约信息 "0"未扣费 "1"
var is_sign = 0;
//页面初始化
$(function(){
    checkUserAgent();
@ -88,8 +87,8 @@ function initFamilyData(){
}
function initPageData(){
    var userInfo= JSON.parse(userAgent);
    patientcode = userInfo.uid;
//  var userInfo= JSON.parse(userAgent);
//  patientcode = userInfo.uid;
    
    getPatientInfo();
}
@ -354,10 +353,11 @@ function bindEvents(){
    });
    
    $("#ul_jiating_consultation").on("tap",'li', function(){
        var userInfo = JSON.parse(userAgent);
        var jsonData = JSON.parse(this.getAttribute("data-json"));
        var userInfo = JSON.parse(userAgent);
        patientcode = window.localStorage.getItem('nowPatientCode')
        if(jsonData.status == 0){
            window.location.href = "../../qygl/html/sign_info.html?consult="+jsonData.code+"&doctor="+jsonData.doctorCode;
            window.location.href = "../../qygl/html/sign_info.html?consult="+jsonData.code+"&doctor="+jsonData.doctorCode+"&patientcode="+patientcode;
        }else{
            localStorage.setItem("evaluate",jsonData.evaluate);
            window.location.href = "consulting-doctor.html?consult=" + jsonData.code+"&type="+jsonData.type+"&toUser="+userInfo.uid+"&doctor="+jsonData.doctorCode;

+ 2 - 0
js/family-members.js

@ -74,6 +74,8 @@ function appendFamilyMember(obj,fun,cssfun,opts){
		function active(one){
			one.find('img').css({width: '55px',height: '55px'});
			one.find('.name').css({'font-size': '14px','line-height':'23px'});
			window.localStorage.setItem('nowPatientCode',one.attr("data-code"))
			
		}
		//关联被代理人