|
@ -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-健管师当前不在工作时间 健管师当前不在工作时间
|