|
|
|
|
678
|
})
|
678
|
})
|
679
|
}
|
679
|
}
|
680
|
|
680
|
|
|
|
681
|
getConsultData(userid);
|
681
|
function getConsultData(professorId){
|
682
|
function getConsultData(professorId){
|
682
|
var params = {"professorId":professorId};
|
683
|
var params = {"professorId":professorId};
|
683
|
$.ajax({
|
684
|
$.ajax({
|
|
|
|
|
686
|
"async": false,
|
687
|
"async": false,
|
687
|
"data":params,
|
688
|
"data":params,
|
688
|
"success":function(response){
|
689
|
"success":function(response){
|
689
|
var newConsultData = response["data"]["data"][0];
|
|
|
690
|
$("#myFlatConsultTime").attr("consultId",newConsultData["consultId"]);
|
|
|
691
|
$("#myFlatProName").html(newConsultData["professor"]["name"]);
|
|
|
692
|
$("#myFlatProTitle").html(newConsultData["professor"]["title"]);
|
|
|
693
|
$("#myFlatProDepartment").html(newConsultData["professor"]["orgName"]);
|
|
|
694
|
$("#myFlatConsultTime").html(newConsultData["createTime"].substr(0,4) + "-" + newConsultData["createTime"].substr(4,2) + "-" + newConsultData["createTime"].substr(6,2) + " "
|
|
|
695
|
+ newConsultData["createTime"].substr(8,2)+ ":" +newConsultData["createTime"].substr(10,2));
|
|
|
696
|
$("#myFlatConsultTitle").html(newConsultData["consultTitle"]);
|
|
|
697
|
$("#myFlatConsultContent").html(newConsultData["consultContant"]);
|
|
|
|
|
690
|
if(response["data"]["data"].length != 0){
|
|
|
691
|
var newConsultData = response["data"]["data"][0];
|
|
|
692
|
$("#myFlatConsultTime").attr("consultId",newConsultData["consultId"]);
|
|
|
693
|
$("#myFlatProName").html(newConsultData["professor"]["name"]);
|
|
|
694
|
$("#myFlatProTitle").html(newConsultData["professor"]["title"]);
|
|
|
695
|
$("#myFlatProDepartment").html(newConsultData["professor"]["orgName"]);
|
|
|
696
|
$("#myFlatConsultTime").html(newConsultData["createTime"].substr(0,4) + "-" + newConsultData["createTime"].substr(4,2) + "-" + newConsultData["createTime"].substr(6,2) + " "
|
|
|
697
|
+ newConsultData["createTime"].substr(8,2)+ ":" +newConsultData["createTime"].substr(10,2));
|
|
|
698
|
$("#myFlatConsultTitle").html(newConsultData["consultTitle"]);
|
|
|
699
|
$("#myFlatConsultContent").html(newConsultData["consultContant"]);
|
|
|
700
|
}else{
|
|
|
701
|
return false;
|
|
|
702
|
}
|
698
|
|
703
|
|
699
|
},
|
704
|
},
|
700
|
"error":function(){
|
705
|
"error":function(){
|
701
|
$.MsgBox.Alert('message','失败');
|
|
|
|
|
706
|
$.MsgBox.Alert('message','最新咨询数据请求失败');
|
702
|
}
|
707
|
}
|
703
|
|
708
|
|
704
|
})
|
709
|
})
|
705
|
}
|
710
|
}
|
706
|
getConsultData(userid);
|
|
|
|
|
711
|
|
707
|
|
712
|
|
708
|
function getReplyData(consultantId){
|
713
|
function getReplyData(consultantId){
|
709
|
var params = {"consultantId":consultantId};
|
714
|
var params = {"consultantId":consultantId};
|
|
|
|
|
713
|
"async": false,
|
718
|
"async": false,
|
714
|
"data":params,
|
719
|
"data":params,
|
715
|
"success":function(response){
|
720
|
"success":function(response){
|
716
|
var newReplyData = response["data"]["data"][0];
|
|
|
717
|
$("#myFlatRelpyTime").attr("consultId",newReplyData["consultId"])
|
|
|
718
|
$("#myFlatReplyProName").html(newReplyData["professor"]["name"]);
|
|
|
719
|
$("#myFlatReplyProTitle").html(newReplyData["professor"]["title"]);
|
|
|
720
|
$("#myFlatReplyProDepartment").html(newReplyData["professor"]["orgName"]);
|
|
|
721
|
$("#myFlatRelpyTime").html(newReplyData["createTime"].substr(0,4) + "-" + newReplyData["createTime"].substr(4,2) + "-" + newReplyData["createTime"].substr(6,2) + " "
|
|
|
722
|
+ newReplyData["createTime"].substr(8,2)+ ":" +newReplyData["createTime"].substr(10,2));
|
|
|
723
|
$("#myFlatRelpyTitle").html(newReplyData["consultTitle"]);
|
|
|
724
|
$("#myFlatRelpyContent").html(newReplyData["consultContant"]);
|
|
|
|
|
721
|
console.log(response);
|
|
|
722
|
console.log(response["data"]["data"].length);
|
|
|
723
|
if(response["data"]["data"].length != 0){
|
|
|
724
|
var newReplyData = response["data"]["data"][0];
|
|
|
725
|
$("#myFlatRelpyTime").attr("consultId",newReplyData["consultId"]);
|
|
|
726
|
$("#myFlatReplyProName").html(newReplyData["professor"]["name"]);
|
|
|
727
|
$("#myFlatReplyProTitle").html(newReplyData["professor"]["title"]);
|
|
|
728
|
$("#myFlatReplyProDepartment").html(newReplyData["professor"]["orgName"]);
|
|
|
729
|
$("#myFlatRelpyTime").html(newReplyData["createTime"].substr(0,4) + "-" + newReplyData["createTime"].substr(4,2) + "-" + newReplyData["createTime"].substr(6,2) + " "
|
|
|
730
|
+ newReplyData["createTime"].substr(8,2)+ ":" +newReplyData["createTime"].substr(10,2));
|
|
|
731
|
$("#myFlatRelpyTitle").html(newReplyData["consultTitle"]);
|
|
|
732
|
$("#myFlatRelpyContent").html(newReplyData["consultContant"]);
|
|
|
733
|
}else{
|
|
|
734
|
return false;
|
|
|
735
|
}
|
|
|
736
|
|
725
|
|
737
|
|
726
|
},
|
738
|
},
|
727
|
"error":function(){
|
739
|
"error":function(){
|
728
|
$.MsgBox.Alert('message','失败');
|
|
|
|
|
740
|
$.MsgBox.Alert('message','最新回复数据请求失败');
|
729
|
}
|
741
|
}
|
730
|
|
742
|
|
731
|
})
|
743
|
})
|