|
@ -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);
|
|
|
}
|
|
|
}
|