" + $data.count + "" + $data.caption + "
";
}
} else {
var showDiv = "
" + $data.count + "" + $data.caption + "
";
}
if($photos.length < 6) {
for(var j = 0; j < $photos.length; ++j) {
if($photos[j].img) {
showDiv += "
";
} else {
showDiv += "
";
}
}
} else {
for(var j = $photos.length - 5; j < $photos.length; ++j) {
if($photos[j].img) {
showDiv += "
";
} else {
showDiv += "
";
}
}
showDiv += "
";
}
showDiv += "
";
html.push(showDiv);
}
document.getElementById("researchAreaShow").innerHTML = html.join('');
}
}
var getRecords = function($researchAreaLogs, caption) {
var ret = [];
var t = 0;
for(var i = 0; i < $researchAreaLogs.length; i++) {
if(caption == $researchAreaLogs[i].caption) {
ret[t] = {
id: $researchAreaLogs[i].opreteProfessorId,
img: $researchAreaLogs[i].hasHeadImage
}
t++;
}
}
return ret;
}
var clFlag = 1;
$("#researchAreaShow").on("click", ".plus", function() {
if(userid && userid != null && userid != "null") {
//点赞变化样式
if(clFlag) {
clFlag = 0;
} else {
return;
}
if($(this).data("isagree") > -1) {
$(this).stop(true, true).animate({
backgroundPositionY: 0
}, 300); //变成未点赞样式
} else {
$(this).stop(true, true).animate({
backgroundPositionY: -26
}, 300); //变成点赞样式
}
$.ajax({
"url": $(this).data("isagree") > -1 ? "/ajax/researchArea/unAgree" : "/ajax/researchArea/agree",
"type": "POST",
"data": {
"targetId": $(this).data("pid"),
"targetCaption": $(this).data("caption"),
"opId": userid
},
"contentType": "application/x-www-form-urlencoded",
"success": function($data) {
if($data.success) {
$.get("/ajax/professor/info/" + professorId, function($data) {
if($data.success) {
clFlag = 1;
var $info = $data.data;
if($info) {
$("#researchAreaShow").empty("")
if($info.researchAreas) {
researchAreaShow($info.researchAreas, $info.editResearchAreaLogs);
}
}
}
})
} else {
$.MsgBox.Alert("message", $data.msg);
}
}
});
} else {
$.MsgBox.Alert("消息", "请登录后点赞");
/*location.href="login.html"*/
}
})
/*研究方向点赞列表*/
//关闭按钮
$("#workclose").click(function() {
$(".resAreaCover").fadeOut();
$("body").css("position", "");
});
$("#researchAreaShow").on("click", ".list-browse,.like-num", function() {
var cap = $(this).attr("caption");
//console.log(cap.length);
$.ajax({
url: "/ajax/researchAreaLog/ql",
dataType: 'json', //数据格式类型
type: 'GET', //http请求类型
timeout: 10000, //超时设置
data: {
"professorId": professorId,
'caption': cap,
"rows": 10
},
success: function(data) {
if(data.success) {
$(".attentList").html("");
var $info = data.data;
$("#subArea").text(cap);
$(".resAreaCover").fadeIn();
$(".resAreaCon").show()
if($info.length == 0) {
$(".resAreaCon").hide();
return;
}
for(var i = 0; i < $info.length; i++) {
if($info[i].professor.hasHeadImage == 1) {
var img = "/images/head/" + $info[i].professor.id + "_l.jpg";
} else {
var img = "../images/default-photo.jpg";
}
//认证
var oSty=autho($info[i].professor.authType,$info[i].professor.orgAuth,$info[i].professor.authStatus);
var title = "",
office = "",
orgName = "",
address = '';
if($info[i].professor.title && $info[i].professor.office && $info[i].professor.orgName && $info[i].professor.address) {
title = $info[i].professor.title + ",";
office = $info[i].professor.office + ",";
orgName = $info[i].professor.orgName + " | ";
address = $info[i].professor.address;
} else if(!$info[i].professor.title && $info[i].professor.office && $info[i].professor.orgName && $info[i].professor.address) {
office = $info[i].professor.office + ",";
orgName = $info[i].professor.orgName + " | ";
address = $info[i].professor.address;
} else if($info[i].professor.title && !$info[i].professor.office && $info[i].professor.orgName && $info[i].professor.address) {
title = $info[i].professor.title + ",";
orgName = $info[i].professor.orgName + " | ";
address = $info[i].professor.address;
} else if($info[i].professor.title && $info[i].professor.office && !$info[i].professor.orgName && $info[i].professor.address) {
title = $info[i].professor.title + ",";
office = $info[i].professor.office + " | ";
address = $info[i].professor.address;
} else if($info[i].professor.title && $info[i].professor.office && $info[i].professor.orgName && !$info[i].professor.address) {
title = $info[i].professor.title + ",";
office = $info[i].professor.office + ",";
orgName = $info[i].professor.orgName;
} else if(!$info[i].professor.title && !$info[i].professor.office && $info[i].professor.orgName && $info[i].professor.address) {
orgName = $info[i].professor.orgName + " | ";
address = $info[i].professor.address;
} else if(!$info[i].professor.title && $info[i].professor.office && !$info[i].professor.orgName && $info[i].professor.address) {
office = $info[i].professor.office + " | ";
address = $info[i].professor.address;
} else if(!$info[i].professor.title && $info[i].professor.office && $info[i].professor.orgName && !$info[i].professor.address) {
office = $info[i].professor.office + ",";
orgName = $info[i].professor.orgName;
} else if($info[i].professor.title && !$info[i].professor.office && !$info[i].professor.orgName && $info[i].professor.address) {
title = $info[i].professor.title + " | ";
address = $info[i].professor.address;
} else if($info[i].professor.title && !$info[i].professor.office && $info[i].professor.orgName && !$info[i].professor.address) {
office = $info[i].professor.title + ",";
address = $info[i].professor.orgName;
} else if($info[i].professor.title && $info[i].professor.office && !$info[i].professor.orgName && !$info[i].professor.address) {
title = $info[i].professor.title + ",";
office = $info[i].professor.office;
} else if(!$info[i].professor.title && !$info[i].professor.office && !$info[i].professor.orgName && $info[i].professor.address) {
address = $info[i].professor.address;
} else if(!$info[i].professor.title && !$info[i].professor.office && $info[i].professor.orgName && !$info[i].professor.address) {
orgName = $info[i].professor.orgName;
} else if(!$info[i].professor.title && $info[i].professor.office && !$info[i].professor.orgName && !$info[i].professor.address) {
office = $info[i].professor.office;
} else if($info[i].professor.title && !$info[i].professor.office && !$info[i].professor.orgName && !$info[i].professor.address) {
title = $info[i].professor.title;
}
var addw = '
'
addw += ''
addw += ''
addw += ''
addw += '
' + $info[i].professor.name + ''
addw += '
' + title + office + orgName + address + '
'
addw += '
'
$(".attentList").append(addw);
}
$("body").css("position", "fixed");
}
},
error: function() {}
});
});
/*研究方向点赞点击每一个点赞的用户进入点赞用户的浏览页面*/
$(".attentList").on("click","li",function(){
var opid=$(this).attr("data-id");
location.href="information-brow.html?professorId="+opid;
})
$.get("/ajax/professor/info/" + professorId, function($data) {
if($data.success) {
var $info = $data.data;
orgId=$info.orgId;
orgAuth=$info.orgAuth;
if(orgAuth==1){
$("#orgNameS").css("cursor","pointer");
}
if($info) {
if($info.authType == 1) {
$(".yesshow").show();
if(ass == 0){
$('span:contains("合作历史及评价")').parents(".introduction").hide();
}
if(resou == 0 && ass == 0) {
$('div:contains("合作机会")').parents(".menublock").hide();
}
} else {
if($info.authentication == 3) {
$("#office").hide();
$("#titleS").hide();
}
}
//修改浏览器title信息
if($info.title) {
var qtitle = " - " + $info.title;
} else {
var qtitle = "";
}
if($info.office) {
var qoffice = " - " + $info.office;
} else {
var qoffice = "";
}
var llqtitle = $info.name + qtitle + qoffice + "-" + $info.orgName + "-科袖网";
window.setInterval(function() {
document.title = llqtitle;
}, 500);
//展示专家的信息
//认证
var oStyS=autho($info.authType,$info.orgAuth,$info.authStatus);
$(".proModify").addClass(oStyS.sty);
$(".proModify").attr("title",oStyS.title);
$("#nameS").text($info.name);
if($info.office) {
if($info.title) {
$("#office").text($info.office + ",");
} else {
$("#office").text($info.office);
}
}
if($info.title) {
$("#titleS").text($info.title);
}
if($info.department) {
if($info.orgName) {
$("#industryS").text($info.department + ",");
} else {
$("#industryS").text($info.department);
}
}
if($info.orgName) {
$("#orgNameS").text($info.orgName);
}
if($info.address) {
$("#address").text($info.address);
}
if($info.hasHeadImage) {
$("#headImage").attr("src", "/images/head/" + professorId + "_l.jpg");
} else {
$("#headImage").attr("src", "/images/default-photo.jpg");
}
$("#orgImage").attr("src", "/images/org/" + $info.orgId + ".jpg");
$("#orgImage").load(function() {})
.error(function() {
$("#orgImage").attr("src", "/images/default-icon.jpg");
});
//显示专家信息到保存数据
name = $info.name;
if($info.descp == undefined && $info.subject == undefined && $info.researchAreas.length == 0 && $info.industry == undefined && $info.edus.length == 0 && $info.jobs.length == 0 && $info.projects.length == 0 && $info.papers.length == 0 && $info.patents.length == 0 && $info.honors.length == 0) {
$("div:contains('个人信息')").parents(".menublock").hide();
}
if($info.descp) {
$("#descpS").text($info.descp);
} else {
$("span:contains('个人简介')").parents(".introduction").hide();
$("a:contains('个人简介')").hide();
}
//展示专家的学科
//alert($info.authentication);
if($info.authType == 1) {
if($info.subject) {
subjectShow($info.subject);
} else {
$("span:contains('学术领域')").parents(".introduction").hide();
$("a:contains('学术领域')").hide();
}
} else {
if($info.authentication == 1) {
if($info.subject) {
subjectShow($info.subject);
} else {
$("span:contains('学术领域')").parents(".introduction").hide();
$("a:contains('学术领域')").hide();
}
} else {
$("span:contains('学术领域')").parents(".introduction").hide();
$("a:contains('学术领域')").hide();
}
}
//研究方向
if($info.authType == 1) {
if($info.researchAreas.length) {
researchAreaShow($info.researchAreas, $info.editResearchAreaLogs);
} else {
$("span:contains('研究方向')").parents(".introduction").hide();
$("a:contains('研究方向')").hide();
}
} else {
$("span:contains('研究方向')").parents(".introduction").hide();
$("a:contains('研究方向')").hide();
}
//展示专家的行业
if($info.authType == 1) {
if($info.industry) {
industryShow($info.industry);
} else {
$("span:contains('应用行业')").parents(".introduction").hide();
$("a:contains('应用行业')").hide();
}
} else {
if($info.authentication == 2) {
if($info.industry) {
industryShow($info.industry);
} else {
$("span:contains('应用行业')").parents(".introduction").hide();
$("a:contains('应用行业')").hide();
}
} else {
$("span:contains('应用行业')").parents(".introduction").hide();
$("a:contains('应用行业')").hide();
}
}
//教育北京
if($info.edus.length) {
eduBgShow($info.edus);
} else {
$("span:contains('教育背景')").parents(".introduction").hide();
$("a:contains('教育背景')").hide();
}
//兼职
if($info.jobs.length) {
timeJobShow($info.jobs);
} else {
$("span:contains('工作经历')").parents(".introduction").hide();
$("a:contains('工作经历')").hide();
}
//项目
if($info.projects.length) {
projectShow($info.projects)
} else {
$("span:contains('项目经历')").parents(".introduction").hide();
$("a:contains('项目经历')").hide();
}
//论文
if($info.papers.length) {
paperShow($info.papers);
} else {
$("span:contains('著作、论文、文章')").parents(".introduction").hide();
$("a:contains('著作、论文、文章')").hide();
}
//专利
if($info.patents.length) {
patentShow($info.patents);
} else {
$("span:contains('专利')").parents(".introduction").hide();
$("a:contains('专利')").hide();
}
//荣誉
if($info.honors.length) {
honorShow($info.honors);
} else {
$("span:contains('荣誉及奖项')").parents(".introduction").hide();
$("a:contains('荣誉及奖项')").hide();
}
//下滑滚动不覆盖底部
var d;
var t;
$(function() {
var art_height;
var isHidden=$("#reA").is(":hidden");//是否隐藏
if(isHidden) {
art_height=0;
}else{
art_height=$("#reA").outerHeight(true);
}
$(document).scroll(function() {
var top3 = $(window).height();
var top5 = $(".content-left").height();
var top4 = $("#container").height() + art_height;
//console.log(top5+","+top4+","+top3);
var top1 = $(document).scrollTop();
var top2 = $("#container").height() - top3 + (top3 - 80 - top5) - 10; //变成绝对定位
if(top1 >= 300) {
$(".content-left").css({
"position": "fixed",
"top": "80px"
});
if(top1 >= top2) {
$('.information-content').css("position", "static");
$(".content-left").css("position", "absolute");
$(".content-left").css("top", top4 - top5 - 10 + "px");
} else {
$('.information-content').css("position", "relative");
$(".content-left").css({
"position": "fixed",
"top": "80px"
});
}
} else {
$(".content-left").css({
"position": "static"
});
}
//咨询框弹出
var foot_height = $(".footerblock").height();
if(top1 >= 180 && top1 < top4 - top3) {
$(".coulstblock").slideDown();
$(".coulstblock").css({
"bottom": "0"
});
} else if(top1 >= top4 - top3) {
$(".coulstblock").css({
"bottom": -(top4 - top3 - top1 ) - art_height + "px"
});
} else {
$(".coulstblock").slideUp();
$(".coulstblock").css({
"bottom": "0"
});
}
})
});
//下滑滚动不覆盖底部 结束
}
}
});
}
$("#hsearch").on("click", function() {
var searchContent = $("#hsearchContent").val();
location.href = "search.html?searchContent=" + searchContent;
});
//拿到点击的顺序,然后求出局文档的距离
$(".subsidebar").mouseenter(function(){
var dd=$(this)[0].className;
if(dd!="subsidebar subcolor"){
$(this).css("background","#efefef");
}
}).mouseleave(function(){
$(this).css("background","")
});
//专家信息点击换背景颜色
$(".subsidebar").click(function() {
$(".subsidebar").removeClass("subcolor");
$(".subsidebar").eq($(".subsidebar").index(this)).addClass("subcolor");
});
$(".subsidebar").click(function() {
var index = $(".subsidebar").index(this)+1;
//console.log(index)
var offset = $(".introduction").eq(index).offset();
$("body,html").animate({
scrollTop: offset.top - 80 + "px" //��body��scrollTop����pos��top����ʵ���˹���
}, 1000);
}).mousedown(function(){
$(this).css("background","");
});
/*科研文章*/
$.ajax({
url: "/ajax/article/qaPro",
dataType: 'json', //数据格式类型
type: 'GET', //http请求类型
data: {
"professorId": professorId
},
timeout: 10000, //超时设置
success: function(data) {
if(data.success) {
var pp=ifUserType(professorId)
if(!pp.authType2) {
$("#reA").hide();
return;
} else {
if(data.data.length == 0) {
$("#reA").hide();
return;
}
$("#reA").show();
for(var i = 0; i < data.data.length; i++) {
var add = '
'
add += ''
add += '
' + data.data[i].articleTitle + '
'
add += '
'
add += '';
$add = $(add);
$("#reachArticle").append($add);
$add.find('.tagsBox span').text(data.data[i].industry); //data.data[i].subject
if(data.data[i].articleImg) {
$add.find(".art_img").attr("style", "background: url(/data/article/" + data.data[i].articleImg + ") 0 0 no-repeat;background-size:cover;");
}
}
//资源轮播
var $content2 = $(".sharescrollbox.Acrollbox");
var childcount2 = $content2.find(".otherRes.shareshow li").length;
Carousel(3, 3, 3, childcount2, $content2, $(".articalbtn.resounext"), $(".articalbtn.resouprev"));
}
}
},
error: function() {
return;
}
});
var resou;
//科研资源
$.ajax({
"url": "/ajax/resource/qapro",
"type": "get",
"async": false,
"data": {
"professorId": professorId
},
"success": function(data) {
if(data.success) {
var pp=ifUserType(professorId)
if(!pp.authType2) {
$("span:contains('研发资源')").parents(".introduction").hide();
return;
} else {
resou = data.data.length;
if(data.data.length == 0) {
$("#infor-browse").css("display", "none");
$("span:contains('研发资源')").parents(".introduction").hide();
$("a:contains('研发资源')").hide();
return;
} else {
$("span:contains('研发资源')").parents(".introduction").show();
}
if(data.data.length > 3) {
$("#infor-browse").css("display", "block");
$(".resoubtn").css("display", "block");
}
var add = "";
for(var i = 0; i < data.data.length; i++) {
add = '
'
add += '
'
add += '
资源名称:' + data.data[i].resourceName + '
'
add += '
应用用途:' + data.data[i].supportedServices + '
'
add += '
'
$("#sharescrollbox").append(add);
$('.applicant').eq(i).attr("resourceId", data.data[i].resourceId);
$(".resourceImg").eq(i).attr("src", "/images/resource/" + data.data[i].resourceId + ".jpg");
$(".resourceImg").load(function() {})
.error(function() {
$(this).attr("src", "/images/default-resource.jpg");
});
add = "";
}
//资源轮播
var $content = $("#sharescrollbox");
var childcount = $content.find(".sharesrc").length;
Carousel(3, 3, 3, childcount, $content, $(".resoubtn2.resounext"), $(".resoubtn2.resouprev"));
//科研资源中点咨询
$(".introduction").find(".resourceConsult").bind("click", clickResourceConsult);
}
} else {
$.MsgBox.Alert("消息", "系统异常!");
}
},
"error": function() {
$.MsgBox.Alert('message', 'failddd')
}
});
function getIdentity(professorId) {
$.ajax({
"url": "ajax/professor/" + professorId,
"type": "get",
"async": false,
"success": function(data) {
if(data.success) {
//console.log(data);
$("option")[0].value = data.data.name;
$("option")[1].value = data.data.organization.name;
//console.log($("option")[0].value);
//console.log($("option")[1].value);
} else {
$.MsgBox.Alert("消息", "系统异常!");
}
},
"error": function() {
$.MsgBox.Alert('message', 'failddd')
}
})
}
//资源申请入口
$('.introduction').on("click", '.applicant', function() {
if(userid && userid != null && userid != "null") {
ResourceApply(); //调用资源申请HTML创建函数
$(".limitBox").removeClass("limitBox");
$(".limitwords").removeClass("limitwords");
$(".limitwordbox").removeClass("limitwordbox");
//获取当前时间并且格式化时间
var myDate = new Date();
var nowYear = myDate.getFullYear();
var nowMonth = myDate.getMonth() + 1;
var nowDate = myDate.getDate();
if(nowMonth < 10) {
nowMonth = "0" + nowMonth.toString();
}
if(nowDate < 10) {
nowDate = "0" + nowDate.toString();
}
var now = nowYear + "-" + nowMonth + "-" + nowDate;
$("#datepicker").val(now);
$("#datepicker").datepicker({
"dateFormat": " yy-mm-dd"
});
$(".timelo").css("display", "none");
$(".namecon").text(name);
$(".applysure").hide();
$(".btnboxup").hide();
var index1 = $(this).parent().parent().parent().index();
var resName = $('.presou').eq(index1).text();
var resourceID = $(this).attr("resourceId");
$.ajax({
"url": "/ajax/resource/" + resourceID,
"type": "get",
"async": false,
"success": function(info) {
if(info.success) {
if(info.data.images.length) {
$(".resouImage").attr("src", "/images/resource/" + resourceID + ".jpg");
} else {
$(".resouImage").attr("src", "/images/default-resource.jpg");
}
}
}
})
$(".log").text(resName);
getIdentity(userid);
$("#deliver").on("click", function() {
var $data = {};
$data.demandId = userid;
$data.resourceId = resourceID;
$data.detailDemand = $(".detail").val();
//去除时间里面的- 和字符串前后的空格
$data.deliverTime = replaceStr($.trim($(".dealTime").val()));
//alert(replaceStr($.trim($(".dealTime").val())));
//alert(replaceStr($.trim($(".dealTime").val())).length);
$data.operationStatus = 1;
$data.applysquare = $("select option:selected").val();
//console.log($data.applysquare);
$.ajax({
"url": "/ajax/operation",
"type": "POST",
"success": function(rdata) {
if(rdata.success) {
$.MsgBox.Alert('message', '资源"' + resName + '"申请发送成功!');
$("#mb_msgicon").css("background", 'url("images/sign_icon_chenggong_nor.png") 0% 0% / contain');
$(".blackcover").remove();
$("body").css("position", "");
//location.reload(true);
} else {
$.MsgBox.Alert('message', '资源"' + resName + '"申请发送失败,请重新申请!');
}
},
"data": $data,
"beforeSend": function() { /*console.log(this.data)*/ },
"contentType": "application/x-www-form-urlencoded",
dataType: "json"
});
});
} else {
$.MsgBox.Alert("消息", "您还未登录,请登录之后进行资源申请");
}
});
//科研资源中的咨询
function clickResourceConsult() {
if(userid && userid != null && userid != 'null' && userid != undefined && userid != 'undefined') {
var professorId = $(this).attr("professorId");
consultHandler();
var liEle = $("ul.menucon").children();
for(var i = 0; i < liEle.length; i++) {
$(liEle[i]).removeClass('clicknow');
$(liEle[1]).addClass("clicknow");
};
var item = $(this).parent().parent().parent();
var consultTitleVal = item.find(".consultTitleVal").text();
$("#consultTitle").val("关于" + consultTitleVal + "的咨询");
} else {
$.MsgBox.Alert("消息提醒", "请先登录再进行咨询");
$("#mb_btn_ok").val("去登录");
var aele = document.createElement('a');
$("#mb_btnbox").append(aele);
$("#mb_btnbox a").css({
'display': "block",
'width': '100%',
'height': '40px',
'position': 'absolute',
'bottom': '-6px',
'left': '0'
});
aele.setAttribute('href', '../login.html');
}
};
//===============点击咨询==============
var userid = $.cookie("userid"); //登陆人id====重复代码
var professorId = GetQueryString("professorId"); //专家id====重复代码
//点击科研资源的咨询
$("#consultbtn,#conbtn").bind('click', consultHandler);
function consultHandler() {
if(userid && userid != null && userid != 'null' && userid != undefined && userid != 'undefined') {
ConsultApply();
concultProInfo(professorId);
//点击的发送
$("#sendConsultBtn").click(function() {
sendConsultHandler($(this).attr("proId"));
});
} else {
$.MsgBox.Alert("消息提醒", "请先登录再进行咨询");
$("#mb_btn_ok").val("去登录");
var aele = document.createElement('a');
$("#mb_btnbox").append(aele);
$("#mb_btnbox a").css({
'display': "block",
'width': '100%',
'height': '40px',
'position': 'absolute',
'bottom': '-6px',
'left': '0'
});
aele.setAttribute('href', '../login.html');
}
};
//合作历史及评价
var ass;
$.ajax({
"url": "/ajax/consult/pqAssessHis",
"type": "get",
"data": {
"professorId": professorId
},
"async": false,
"success": function(response) {
if(response.success) {
var $data = response.data.data;
ass = $data.length;
if($data.length == 0) {
$("span:contains('合作历史及评价')").parents(".introduction").hide();
$("a:contains('合作历史及评价')").hide();
}
for(var i = 0; i < $data.length; i++) {
var add = "";
var assessTime = $data[i]["assessTime"].substr(0, 4) + "-" + $data[i].assessTime.substr(4, 2) + "-" + $data[i].assessTime.substr(6, 2) + " " +
$data[i].assessTime.substr(8, 2) + ":" + $data[i].assessTime.substr(10, 2);
add += '
'
add += '
'
add += '
'
if($data[i].professor.hasHeadImage) {
add += ''
} else {
add += ''
}
add += ''
add += '
' + $data[i].professor.name + '
'
// if($data[i].professor.office) {
// add+=''+$data[i].professor.office+' ,'
// }
// if($data[i].professor.title) {
// add+=''+$data[i].professor.title+''
// }
add += '
'
// if($data[i].professor.department) {
// add+=''+$data[i].professor.department+' ,'
// }
// if($data[i].professor.orgName) {
// add+=''+$data[i].professor.orgName+''
// }
add += '
'
add += '
'
add += '
'
add += '
'
add += '- 咨询时间:' + assessTime + '
'
add += '
'
add += '
'
add += ''
add += ''
add += ''
add += ''
add += ''
add += '
'
if($data[i].assessContant) {
add += '
' + $data[i].assessContant + '
'
}
add += '
'
add += '
'
var $add = $(add);
$(".shareabout2").append($add);
$add.find(".evastar:lt(" + $data[i].assessStar + ")").addClass('staspan');
}
$(".evaluate2").eq($data.length - 1).css("border-bottom", "none");
}
}
})
proinfo(professorId);
//底部咨询申请入口专家信息
function proinfo(professorId) {
$.ajax({
url: "/ajax/professor/editBaseInfo/" + professorId,
type: "get",
data: {
"id": professorId
},
contentType: "application/x-www-form-urlencoded",
success: function(response) {
var myData = response["data"];
//console.log(myData);
$("#foot_proname").html(myData["name"]);
if(myData["address"]) {
$("#foot_proaddress").html(' | ' + myData["address"]);
}
if(myData["title"]) {
$("#foot_protitle").html(myData["title"]);
}
if(myData["department"]) {
$("#foot_prodepar").html(myData["department"]);
}
if(myData["orgName"]) {
if(myData["department"] == null || myData["department"] == '') {
$("#foot_proorgname").html(myData["orgName"]);
} else {
$("#foot_proorgname").html(',' + myData["orgName"]);
}
}
//认证
var oStyT=autho(myData.authType,myData.orgAuth,myData.authStatus);
$("#foot_promodify").addClass(oStyT.sty);
$("#foot_promodify").attr("title",oStyT.title);
//头像
if(myData["hasHeadImage"] == 0) {
$("#foot_proimg").attr("src", "images/default-photo.jpg");
} else {
$("#foot_proimg").attr("src", "images/head/" + myData["id"] + "_l.jpg");
}
},
error: function(error) {
$.MsgBox.Alert("message", "请求数据失败");
}
});
}
/*点击机构名字进入企业浏览页面*/
$("#orgNameS").click(function(){
if(orgAuth==1){
location.href="companybrowinfor.html?orgId="+orgId;
}
})
})