Przeglądaj źródła

微信端bug解决

raolu 6 lat temu
rodzic
commit
2a07f7ad0e

+ 5 - 1
html/qygl/js/consulting-doctor.js

@ -49,6 +49,8 @@ var ui = {
patientcode = userAgent.uid;
var patientName = "";
var consulting = {
    //初始化页面
    getInfo: function(){
@ -89,6 +91,8 @@ var consulting = {
                doResponse(res);
//          }
        });
        var userAgent1 = JSON.parse(window.localStorage.getItem(agentName1));
        patientName = userAgent1.name;
    },
    bindEvents: bindConsultEvents
};
@ -367,7 +371,7 @@ function addReply(isPatient, content, time, msgType, doctorName,photo,prepend, i
        $div.addClass('chat-right');
        img = photo? getImgUrl(photo):defaultPhoto;
        defaultPhoto = img;
        name = window.localStorage.getItem("nowPatientName");
        name = patientName;
    }
    
    var temp = '<dt style="height: auto; text-align: center;"><a><img src="' + img + '" class="c-images-cycle" /></a></dt>' +

+ 1 - 1
html/yszx/css/mingyi-homepage.css

@ -3,7 +3,7 @@
.absolute {position: absolute; z-index: 100;}
.set-focus {top: 70px;right: 30px; height: 87px; border-radius: 0;}
.is-focus {display: block; width: 50px; height: 24px; border-radius: 5px; background-color: #17b3ec; line-height: 24px; color: #fff; text-align: center;}
.is-focus.grey{background-color: #dcdcdc}
.is-focus.grey{}
.height-35{height: 35px;}
.t-indent-2 {text-indent: 2em;}
.c-888 {color: #888888;}

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

@ -3,12 +3,15 @@ var request = GetRequest(),
    doctorCode = request["doctorCode"],
    doctorName = decodeURI(request["doctorName"]),
    jobName = decodeURI(request["jobName"]),
    patientName = window.localStorage.getItem('nowPatientName');
    patientInfo = window.localStorage.getItem(agentName1);
var serverId = ""; //微信图片上传获取的图片id
$(function(){
    $("#lbl_patient").text(patientName);
    if(patientInfo){
        patientInfo = JSON.parse(patientInfo);
    }
    $("#lbl_patient").text(patientInfo.name);
    var text = doctorName;
    if(jobName){
        text += "("+jobName+")"

+ 7 - 5
html/yszx/js/consulting-doctor.js

@ -23,7 +23,8 @@ var patientcode = "";
var pagetype=24;
var networkStatus = "";
var userAgent = window.localStorage.getItem(agentName);
var userInfo = '';
var userInfo = '',
    patientName = "";
$(function() {
	if(!userAgent) {
@ -33,9 +34,11 @@ $(function() {
		return false;	
	}
	
	var newUaObj = JSON.parse(window.localStorage.getItem(agentName))
	userInfo = JSON.parse(window.localStorage.getItem(agentName))
	patientcode = userInfo.represented?userInfo.represented:userInfo.uid;
	
	patientcode = newUaObj.represented?newUaObj.represented:newUaObj.uid;
	var userAgent1 = JSON.parse(window.localStorage.getItem(agentName1));
	patientName = userAgent1.name;
	
	//判断关系
	function hasFamilyRelation(a,b){
@ -180,7 +183,6 @@ $(function() {
			//加载socket组件
			jQuery.getScript(imurl+"/socket.io/socket.io.js").done(function() {
				var socket = io.connect(imurl);
				var userInfo = JSON.parse(window.localStorage.getItem(agentName));	
		    	socket.emit('login', {userId: userInfo.represented?userInfo.represented:userInfo.uid, password: userInfo.represented?userInfo.represented:userInfo.uid,sessionId:sessionId,clientType:"patient"});
		    	socket.on('message', function (data) {
//		    		console.log(data)
@ -560,7 +562,7 @@ function addReply(type, content, time, msgType, doctorName,photo,prepend) {
		$div.addClass('chat-right');
		img = photo?getImgUrl(photo):defaultPhoto;
		defaultPhoto = img;
		name = window.localStorage.getItem("nowPatientName");
		name = patientName;
	}
	
	var temp = 	'<dt style="height: auto; text-align: center;"><a><img src="' + img + '" class="c-images-cycle" /></a></dt>' +

+ 16 - 0
html/yszx/js/doctor-homepage.js

@ -82,6 +82,10 @@ function bindEvents(){
    
    $("#isFocus").on('click', function(){
        var $this = $(this);
        if($this.hasClass("disabled")){
            return false;
        }
        $this.addClass("disabled");
        if($this.hasClass("grey")){
            concernDoctor();
        }else{
@ -111,8 +115,13 @@ function concernDoctor(addConsult){
                d.close();
                $("#isFocus").text("已关注");
                $("#isFocus").removeClass("grey");
                $("#isFocus").removeClass("disabled");
                //修改关注数
                var count = $("#concern").text();
                $("#concern").text(parseInt(count) + 1);
            }
        }else{
            $("#isFocus").removeClass("disabled");
            queryFailed(res);
        }
    })
@ -131,7 +140,12 @@ function cancelConcern(){
        if(res.status == 200){
            $("#isFocus").text("关注");
            $("#isFocus").addClass("grey");
            $("#isFocus").removeClass("disabled");
            //修改关注数
            var count = $("#concern").text();
            $("#concern").text(parseInt(count) - 1);
        }else{
            $("#isFocus").removeClass("disabled");
            queryFailed(res);
        }
    })
@ -154,6 +168,7 @@ function is_consult_finished(isCancelConcern){
                }
            } else {
                d.close();
                $("#isFocus").removeClass("disabled");
                var content = '十分抱歉,您与'+ docInfo.name +'医生还有<br/>未结束咨询,';
                if(isCancelConcern){
                    content += '需结束咨询后才能取消关注';
@ -186,6 +201,7 @@ function checkDocInWork(){
            doctor: doctor
        };
    sendPost(url, params, 'json', 'post', queryFailed, function(res){
        $("#isFocus").removeClass("disabled");
        if(res.status == 200){
            d.close();
            //  data:0-医生不接受咨询/1-医生当前接受咨询/2-全科医生和健管师当前都不在工作时间/3-全科医生当前不在工作时间/4-健管师当前不在工作时间           健管师当前不在工作时间