Sfoglia il codice sorgente

优化,医生回复的消息加上“仅供参考”字样

raolu 6 anni fa
parent
commit
e01241494c

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

@ -350,7 +350,7 @@ function submitSuccess(res) {
//回复单条内容填写
var defaultPhoto = "../../../images/p-default.png";
var doctorDefaultPhoto = "../../../images/d-default.png";
function addReply(isPatient, content, time, msgType, doctorName,photo,prepend, isSystem) {
function addReply(isDoctor, content, time, msgType, doctorName,photo,prepend, isSystem) {
    //time = time.substr(10);
    var doctorPhoto = photo ? getImgUrl(photo) : doctorDefaultPhoto;
    var $div = $("<dl></dl>");
@ -366,7 +366,7 @@ function addReply(isPatient, content, time, msgType, doctorName,photo,prepend, i
        return;
    } 
        
    if (isPatient == 1) {
    if (isDoctor == 1) {
        $div.addClass('chat-left');
        img = doctorPhoto;
        name = doctorName;
@ -383,19 +383,36 @@ function addReply(isPatient, content, time, msgType, doctorName,photo,prepend, i
        case 0: //签约信息
        case 1://信息
        case 6://咨询问题
            temp += '<dd class="word-bread"><span>' + content + '</span></dd>';
            temp += '<dd class="word-bread"><span>' + content + '</span>';
            if(isDoctor == 1){
                temp += '<div class="c-t-right c-909090 c-f12 mt5" style="min-width: 80px;">仅供参考</div></dd>';
            }else{
                temp += '</dd>';
            }
            break;
        case 2://图片
//          alert(content);
            temp += '<dd class="word-bread wb-img"><img  style="width:100px; height:100px;" src="'+ getImgUrl(content) +'" /></dd>';
            temp += '<dd class="word-bread wb-img"><img  style="width:100px; height:100px;" src="'+ getImgUrl(content) +'" />';
            //医生回复的内容底部加上“仅供参考”的字样
            if(isDoctor == 1){
                temp += '<div class="c-t-right c-909090 c-f12 mt5" style="min-width: 80px;">仅供参考</div></dd>';
            }else{
                temp += '</dd>';
            }
            break;
        case 3://语音
            var rec = JSON.parse(content);
            temp += "<div class='c-msg'><dd class='word-bread audio' data-type='3' data-audio='" + content + "'>"+
                        "<div class='soundWav'>" +
                               "<span class='soundWavT'>"+(rec? rec.times: "") +"\'\'</span>"+
                        "</div>"+
                    "</dd></div>";
                        "</div>";
                        
            //医生回复的内容底部加上“仅供参考”的字样
            if(isDoctor == 1){
                temp += '<div class="c-t-right c-909090 c-f12 mt5" style="min-width: 80px;">仅供参考</div></dd></div>';
            }else{
                temp += "</dd></div>";
            }
            break;
        case 4: //文章
            temp += formatJyzd(content, "","", time);
@ -404,12 +421,13 @@ function addReply(isPatient, content, time, msgType, doctorName,photo,prepend, i
        case 12://视频
            var videoInfo = content.split(",");
            var shichang = formatSeconds(videoInfo[2]);//时长
            if(isPatient == 1){
            if(isDoctor == 1){
                temp += '<dd class="preview-video" data-video="'+getImgUrl(videoInfo[1])+'">'+
                        '<img class="video-img-left" src="'+getImgUrl(videoInfo[0])+'">'+
                        '<img class="bofang-icon-left" src="../../yszx/images/bofang_icon.png">'+
                        '<img class="jianjiao-icon-left" src="../../yszx/images/zuoshanjiao_bg.png">'+
                        '<span class="shichang-time-left">'+shichang+'</span>'+
                        '<div class="c-t-right c-909090 c-f12" style="min-width: 80px;">仅供参考</div>'+
                    '</dd>';
            }else{
                temp += '<dd class="preview-video" data-video="'+getImgUrl(videoInfo[1])+'">'+
@ -427,7 +445,7 @@ function addReply(isPatient, content, time, msgType, doctorName,photo,prepend, i
    } else{
        $(".talk-box").append('<div class="time-tips"><span>' + time + '</span></div>').append($div.append(temp));
    }
    if(isPatient != null && isPatient != 1) {
    if(isDoctor != null && isDoctor != 1) {
        $(".tw-add-detail").hide(200);
    }
}

+ 7 - 2
html/yszx/css/chatRoom.css

@ -1388,7 +1388,7 @@ em.offline {
	-webkit-background-size: 18px;
	-moz-background-size: 18px;
	-o-background-size: 18px;
	background-position:  10% 50%;
	background-position:  10% 10px;
}
.chat-left .audio.active{
	background: url("../images/yuyin-2.gif") no-repeat #fff;
@ -1535,7 +1535,12 @@ em.offline {
    -webkit-user-modify: read-write-plaintext-only
}
.preview-video{padding: 6px 0px;max-height: 100px;position: relative;}
.preview-video{
    width: 135px;
    padding: 6px 0px;
    /*max-height: 100px;*/
    position: relative;
}
.preview-video .video-img-right{width: 135px !important;height: 100px;border-radius: 15px;border-bottom-right-radius: 0px;border-top-right-radius: 0px;}
.preview-video .video-img-left{width: 135px !important;height: 100px;border-radius: 15px;border-bottom-left-radius: 0px;border-top-left-radius: 0px;}
.preview-video .bofang-icon-right{position: absolute;right: 65px;bottom: 50%;width: 25px !important;height: 25px;margin-right: -12px;top: 40px;z-index: 100;}

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

@ -531,18 +531,35 @@ function addReply(type, content, time, msgType, doctorName,photo,prepend) {
	switch(parseInt(msgType)) {
		case 1://信息
		case 6://咨询问题
			temp += '<dd class="word-bread"><span>' + content + '</span></dd></dl>';
		    temp += '<dd class="word-bread"><span>' + content + '</span>';
    		//医生回复的内容底部加上“仅供参考”的字样
            if(type == 1){
                temp += '<div class="c-t-right c-909090 c-f12" style="min-width: 80px;">仅供参考</div></dd></dl>';
            }else{
                temp += '</dd></dl>';
            }
			break;
		case 2://图片
			temp += '<dd class="word-bread wb-img"><img width="100" height="100" src="'+ getImgUrl(content) +'" /></dd></dl>';
			temp += '<dd class="word-bread wb-img"><img width="100" height="100" src="'+ getImgUrl(content) +'" />';
			//医生回复的内容底部加上“仅供参考”的字样
            if(type == 1){
                temp += '<div class="c-t-right c-909090 c-f12" style="min-width: 80px;">仅供参考</div></dd></dl>';
            }else{
                temp += '</dd></dl>';
            }
			break;
		case 3://语音
			var rec = JSON.parse(content);
			temp += "<div class='c-msg'><dd class='word-bread audio' data-type='3' data-audio='" + getImgUrl(content) + "'>"+
						"<div class='soundWav'>" +
	   						"<span class='soundWavT'>"+(rec? rec.times: "") +"\'\'</span>"+
						"</div>"+
					"</dd></div>";
						"</div>";
			//医生回复的内容底部加上“仅供参考”的字样
            if(type == 1){
                temp += '<div class="c-t-right c-909090 c-f12" style="min-width: 80px;">仅供参考</div></dd></dl>';
            }else{
                temp += '</dd></dl>';
            }
			break;
		case 12://视频
			var videoInfo = content.split(",");
@ -553,6 +570,7 @@ function addReply(type, content, time, msgType, doctorName,photo,prepend) {
						'<img class="bofang-icon-left" src="../images/bofang_icon.png">'+
						'<img class="jianjiao-icon-left" src="../images/zuoshanjiao_bg.png">'+
						'<span class="shichang-time-left">'+shichang+'</span>'+
					    '<div class="c-t-right c-909090 c-f12" style="min-width: 80px;">仅供参考</div>'+
					'</dd>';
			}else{
				temp += '<dd class="preview-video" data-video="'+getImgUrl(videoInfo[1])+'">'+