123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711 |
- $(function() {
- var orgId = $.cookie("orgId");
- var rows = 20,
- dataO = {
- artPublishTime:"",
- artShareId:"",
-
- resPublishTime:"",
- resShareId:"",
-
- serModifyTime: "",
-
- prdModifyTime: ""
- },
- watchO={
- beiTime:"",
- beiProId:"",
- };
- var oAjax = function(url, dataS, otype, oFun,beforeFun,completeFun) {
- $.ajax({
- url:url,
- dataType: 'json',
- type: otype,
- data: dataS,
- traditional: true,
- beforeSend: beforeFun,
- success: function(res) {
- if(res.success) {
- oFun(res)
- }
- },
- complete:completeFun
-
- });
- },
- insertNodata = function (targetE,newStr) {
- var parent = document.getElementById(targetE).parentNode;
- var kong = document.createElement("div");
- kong.className = "con-kong";
- kong.innerHTML ='<div class="picbox picNull"></div>'+
- '<div class="txtbox">暂时没有符合该搜索条件的内容</div>'
- if(newStr){
- kong.querySelector(".txtbox").innerHTML = newStr;
- }
- if (parent.firstChild.className == "con-kong") {
- return
- } else {
- parent.insertBefore(kong,parent.firstChild);
- }
- },
- removeNodata = function (targetE) {
- var parent = document.getElementById(targetE).parentNode;
- if (parent.firstChild.className == "con-kong") {
- parent.removeChild(parent.firstChild);
- } else {
- return
- }
- },
- getCmpInfo=function() {
- oAjax("/ajax/org/" + orgId,{}, "get", function(data){
- console.log(data)
- var $info = data.data;
- if($info.resMgr){
- resourceListVal(true);
- serviceListVal(true);
- $(".establishments").show()
- $(".goworkspaceSpan").text('发布服务、资源、文章');
- }
- if(!$info.colMgr && !$info.resMgr){
- productListVal(true);
- $(".productions").show()
- $(".goworkspaceSpan").text('发布需求、产品和文章');
- }
- if($info.colMgr){
- $(".goworkspaceSpan").text('发布文章');
- }
- $.cookie("colMgr",$info.colMgr);
- $.cookie("resMgr",$info.resMgr);
-
- $("#viewNums").text($info.pageViews);
- if($info.hasOrgLogo) {
- $("#proHead").attr("src", "/images/org/" + $info.id + ".jpg");
- }else{
- $("#proHead").attr("src", "/images/default-icon.jpg");
- }
- if($info.forShort) {
- $("#proName").text($info.forShort);
- } else {
- $("#proName").text($info.name);
- }
- demandListVal(true,$info.name);
- commerceInfo($info.name);
- if($info.authStatus == "3") {
- $("#proAuth").addClass("authicon-com-ok");
- $("#proAuth").attr("title", "科袖认证企业");
- }
- if($info.city) {
- $("#proAddress").html($info.city + "<span style='margin-right:10px;'></span>");
- }
- var proOther = "";
- if($info.industry) {
- proOther = $info.industry.replace(/,/gi, " | ");
- }
- $("#proOther").text(proOther);
- if($info.orgType == "2") {
- $("#proTit").html(orgTypeShow[$info.orgType] + "<span style='margin-right:10px;'></span>");
- }
- var llqtitle = $info.name + "-" + proOther + "科袖网";
- document.title = llqtitle;
-
- if($info.descp) {
- $("#item1user>.nodatabox").addClass("displayNone");
- $("#descpS").parents(".coninfobox").removeClass("displayNone");
- $("#descpS").text($info.descp);
- } else {
- $("#descpS").parents(".coninfobox").addClass("displayNone");
- }
-
- if($info.subject) {
- $("#item1user>.nodatabox").addClass("displayNone");
- $("#subjectShow").parents(".coninfobox").removeClass("displayNone");
-
- var subs=strToAry($info.subject)
- if(subs.length > 0) {
- for(var i = 0; i < subs.length; i++) {
- $("#subjectShow").append("<li>" + subs[i] + "</li>");
- };
- }
- } else {
- $("#subjectShow").parents(".coninfobox").addClass("displayNone");
- }
-
- if($info.qualification) {
- var subs=strToAry($info.qualification)
- if(subs.length > 0) {
- for(var i = 0; i < subs.length; i++) {
- $("#qualification").append("<li><div class='h4tit'>" + subs[i] + "</div></li>");
- };
- }
- } else {
- $("#qualification").parents(".coninfobox").hide();
- }
-
- $("#orgName").text($info.name);
- if($info.orgSize) {
- $("#orgSize").text(orgSizeShow[$info.orgSize]);
- } else {
- $("#orgSize").parent("li").hide();
- }
- if($info.industry) {
- $("#orgIndustry").text($info.industry);
- } else {
- $("#orgIndustry").parent("li").hide();
- }
- if($info.city) {
- $("#orgCity").text($info.city);
- } else {
- $("#orgCity").parent("li").hide();
- }
- if($info.orgType) {
- $("#orgType").text(orgTypeShow[$info.orgType]);
- } else {
- $("#orgType").parent("li").hide();
- }
- if($info.foundTime) {
- $("#foundTime").text(TimeTr($info.foundTime));
- } else {
- $("#foundTime").parent("li").hide();
- }
- if($info.orgUrl) {
- $("#orgUrl").text($info.orgUrl);
- } else {
- $("#orgUrl").parent("li").hide();
- }
- if($info.addr) {
- $("#cmpAddress").text($info.addr);
- } else {
- $("#cmpAddress").parent("li").hide();
- }
- var weibotitle = $info.name;
- var weibourl = window.location.href;
- var weibopic = "http://" + window.location.host + "/images/org/" + $info.id + ".jpg";
- $("#weibo").attr("href", "http://service.weibo.com/share/share.php?appkey=3677230589&title=" + encodeURIComponent(weibotitle) + "&url=" + encodeURIComponent(weibourl) + "&pic=" + encodeURIComponent(weibopic) + "&content=utf-8" + "&ralateUid=6242830109&searchPic=false&style=simple");
- });
- },
- commerceInfo=function(oName){
- oAjax("/ajax/org/regInfo",{
- "name": oName
- }, "get", function(data){
- if(data.data) {
- $("#comMes").parents(".coninfobox").show();
- var $data = data.data;
- var str = "";
- if($data.num) {
- str += "<li>工商注册号:" + $data.num + "</li>"
- }
- if($data.code) {
- str += "<li>组织机构代码:" + $data.code + "</li>"
- }
- if($data.creditCode) {
- str += "<li>统一信用代码:" + $data.creditCode + "</li>"
- }
- if($data.type) {
- str += "<li>企业类型:" + $data.type + "</li>"
- }
- if($data.industry) {
- str += "<li>行业:" + $data.industry + "</li>"
- }
- if($data.operatingPeriod) {
- str += "<li>营业期限:" + $data.operatingPeriod + "</li>"
- }
- if($data.dayOfApproval) {
- str += "<li>核准日期:" + $data.dayOfApproval + "</li>"
- }
- if($data.manager) {
- str += "<li>登记机关:" + $data.manager + "</li>"
- }
- if($data.addr) {
- str += "<li>注册地址:" + $data.addr + "</li>"
- }
- if($data.scopeOfBusiness) {
- str += "<li>经营范围:" + $data.scopeOfBusiness + "</li>"
- }
- $("#comMes").html(str);
- }
- });
- },
- demandListVal=function(isbind,par) {
- oAjax("/ajax/demand/pq/org",{
- "state":[1],
- 'oname':par,
- "pageSize":5
- }, "get", function(data){
- var $info = data.data.data;
- if($info.length > 0){
- $("#showDemand").parents(".coninfobox").removeClass("displayNone");
- $("#item1user>.nodatabox").addClass("displayNone");
- for(var i = 0; i < $info.length; i++) {
- var liStr=$("<li></li>").appendTo("#showDemand");
- var $data=$info[i];
- var sowU="";
- if($data.pageViews!=0){
- sowU='<li><span>浏览量 '+$data.pageViews +'</span></li>'
- }
- var strCon='';
- strCon+='<a class="" target="_blank" href="demandShow.html?demandId='+$data.id+'" class="madiaInfo">'
- strCon+='<p class="h1Font ellipsisSty">'+ $data.title +'</p>'
- strCon+='<ul class="showliTop h3Font clearfix">'
- strCon+='<li><span>发布于 '+TimeTr($data.createTime)+'</span></li>'
- strCon+= sowU
- strCon+='</ul>'
- strCon+='<p class="h2Font ellipsisSty-2">'+$data.descp+'</p>'
- strCon+='<ul class="showli clearfix h3Font">'
-
- if($data.city){ strCon+='<li>所在城市:'+$data.city+'</li>' }
- if($data.duration!=0){ strCon+='<li>预计周期:'+demandDuration[$data.duration]+'</li>' }
- if($data.cost!=0){ strCon+='<li>费用预算:'+demandCost[$data.cost]+'</li>' }
- if($data.invalidDay){ strCon+='<li>有效期至:'+TimeTr($data.invalidDay)+'</li>' }
-
- strCon+='</ul>'
- strCon+='</a>'
- $(strCon).appendTo(liStr);
- }
- }else{
- $("#showDemand").parents(".needinfobox").addClass("displayNone");
- }
- })
- },
- articalListVal=function(isbind){
- var aimId="proArticel",aimIdF="showArticle",newStr="企业尚未发布任何文章"
- oAjax("/ajax/article/publish",{
- "category": "2",
- "owner":orgId,
- "publishTime":dataO.artPublishTime,
- "shareId": dataO.artShareId,
- "rows": rows
- }, "get", function(res){
- var $info = res.data;
- if($info.length > 0) {
- $("#"+aimId).show()
- $("#"+aimIdF).parents(".leftconItem").find(".nodatabox").hide()
- $("#"+aimIdF).parents(".coninfobox").removeClass("displayNone");
- dataO.artPublishTime = $info[$info.length - 1].publishTime;
- dataO.artShareId = $info[$info.length - 1].shareId;
-
- for(var i = 0; i < $info.length; i++) {
- var sowU="",hasImg="/images/default-artical.jpg"
- if($info[i].articleImg) {
- hasImg="/data/article/" + $info[i].articleImg
- }
- if($info[i].pageViews!=0){
- if($info[i].articleAgree!=0){
- sowU='<li><span>阅读量 '+$info[i].pageViews+'</span></li><li><span>赞 '+$info[i].articleAgree+'</span></li>'
- }else{
- sowU='<li><span>阅读量 '+$info[i].pageViews+'</span></li>'
- }
- }
- var itemlist = '<li>';
- itemlist += '<a href="/'+pageUrl('a',$info[i])+'" class="flexCenter urlgo">';
- itemlist += '<div class="madiaHead artHead" style="background-image:url(' + hasImg + ')"></div>';
- itemlist += '<div class="madiaInfo">';
- itemlist += '<p class="h1Font ellipsisSty-2">'+$info[i].articleTitle+'</p>';
- itemlist += '<ul class="h2Font clearfix">';
- itemlist += '<li><span class="time">' + commenTime($info[i].publishTime) + '</span></li>';
- itemlist += sowU
- itemlist += '<li><span class="leaveMsgCount"></span></li>';
- itemlist += '</ul></div>';
- itemlist += '</a></li>';
- var $itemlist = $(itemlist);
- $("#"+aimId).append($itemlist)
- leaveMsgCount($info[i].articleId,1,$itemlist);
-
- if(isbind && i==0){
- var $itemlist = $(itemlist);
- $("#"+aimIdF).append($itemlist);
- leaveMsgCount($info[0].articleId,1,$itemlist);
- }
- }
- }
- var liLen=document.getElementById(aimId).querySelectorAll("li").length;
- removeNodata(aimId);
- if($info.length == 0 && liLen == 0 ){
- $("#"+aimId).hide()
- insertNodata(aimId,newStr);
- }
- if(isbind){
- $("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
- articalListVal(false)
- })
- }
- if ($info.length < rows) {
- $("#"+aimId).parent().find(".js-load-more").unbind("click");
- $("#"+aimId).parent().find(".js-load-more").hide();
- }
- },function(){
- $("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
- $("#"+aimId).parent().find(".js-load-more").addClass("active");
- },function(){
- $("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
- $("#"+aimId).parent().find(".js-load-more").removeClass("active");
- })
- },
- resourceListVal=function(isbind){
- var aimId="proResource",aimIdF="showResource",newStr="企业尚未发布任何资源"
- oAjax("/ajax/resource/publish",{
- "category": "2",
- "owner":orgId,
- "publishTime":dataO.resPublishTime,
- "shareId": dataO.resShareId,
- "rows": rows
- }, "get", function(res){
- var $info = res.data;
- if($info.length > 0) {
- $("#"+aimId).show()
- $("#"+aimIdF).parents(".leftconItem").find(".nodatabox").hide()
- $("#"+aimIdF).parents(".form-item").removeClass("displayNone");
- $("#"+aimIdF).parents(".coninfobox").show();
- dataO.resPublishTime = $info[$info.length - 1].publishTime;
- dataO.resShareId = $info[$info.length - 1].shareId;
-
- for(var i = 0; i < $info.length; i++) {
- var hasImg='/images/default-resource.jpg'
- if($info[i].images.length) {
- hasImg="/data/resource/" + $info[i].images[0].imageSrc
- }
-
- var itemlist = '<li>';
- itemlist += '<a href="resourceShow.html?resourceId=' + $info[i].resourceId + '" class="flexCenter urlgo">';
- itemlist += '<div class="madiaHead resouseHead" style="background-image:url(' + hasImg + ')"></div>';
- itemlist += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">' + $info[i].resourceName + '</p><p class="h2Font ellipsisSty">用途:' + $info[i].supportedServices + '</p></div>';
- itemlist += '</a></li>';
- var $itemlist = $(itemlist);
- $("#"+aimId).append($itemlist)
-
- if(isbind && i==0){
- var $itemlist = $(itemlist);
- $("#"+aimIdF).append($itemlist);
- }
- }
- }
- var liLen=document.getElementById(aimId).querySelectorAll("li").length;
- removeNodata(aimId);
- if($info.length == 0 && liLen == 0 ){
- $("#"+aimId).hide()
- insertNodata(aimId,newStr);
- }
- if(isbind){
- $("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
- resourceListVal(false)
- })
- }
- if ($info.length < rows) {
- $("#"+aimId).parent().find(".js-load-more").unbind("click");
- $("#"+aimId).parent().find(".js-load-more").hide();
- }
- },function(){
- $("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
- $("#"+aimId).parent().find(".js-load-more").addClass("active");
- },function(){
- $("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
- $("#"+aimId).parent().find(".js-load-more").removeClass("active");
- })
- },
- serviceListVal=function(isbind){
- var aimId="proService",aimIdF="showService",newStr="企业尚未发布任何服务"
- oAjax("/ajax/ware/publish",{
- "category":"2",
- "owner":orgId,
- "modifyTime":dataO.serModifyTime,
- "rows": rows
- }, "get", function(res){
- var $info = res.data;
- if($info.length > 0) {
- $("#"+aimId).show()
- $("#"+aimIdF).parents(".leftconItem").find(".nodatabox").hide()
- $("#"+aimIdF).parents(".form-item").removeClass("displayNone");
- $("#"+aimIdF).parents(".coninfobox").show();
- dataO.serModifyTime = $info[$info.length - 1].modifyTime;
-
- for(var i = 0; i < $info.length; i++) {
- var cnt="", hasImg="../images/default-service.jpg"
- if($info[i].images) {
- var subs = strToAry($info[i].images)
- if(subs.length > 0) {
- hasImg="/data/ware" + subs[0]
- }
- }
- var itemlist = '<li>';
- itemlist += '<a href="../sevriceShow.html?sevriceId=' + $info[i].id + '" class="flexCenter urlgo">';
- itemlist += '<div class="madiaHead resouseHead" style="background-image:url(' + hasImg + ')"></div>';
- itemlist += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">' + $info[i].name + '</p><p class="h2Font ellipsisSty">' + cnt+ '</p></div>';
- itemlist += '</a></li>';
- var $itemlist = $(itemlist);
- $("#"+aimId).append($itemlist)
-
- if(isbind && i==0){
- var $itemlist = $(itemlist);
- $("#"+aimIdF).append($itemlist);
- }
- }
- }
- var liLen=document.getElementById(aimId).querySelectorAll("li").length;
- removeNodata(aimId);
- if($info.length == 0 && liLen == 0 ){
- $("#"+aimId).hide()
- insertNodata(aimId,newStr);
- }
- if(isbind){
- $("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
- serviceListVal(false)
- })
- }
- if ($info.length < rows) {
- $("#"+aimId).parent().find(".js-load-more").unbind("click");
- $("#"+aimId).parent().find(".js-load-more").hide();
- }
- },function(){
- $("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
- $("#"+aimId).parent().find(".js-load-more").addClass("active");
- },function(){
- $("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
- $("#"+aimId).parent().find(".js-load-more").removeClass("active");
- })
- },
- productListVal=function(isbind){
- var aimId="proProduct",aimIdF="showProduct",newStr="企业尚未发布任何产品"
- oAjax("/ajax/product/publish",{
- "owner":orgId,
- "modifyTime":dataO.prdModifyTime,
- "rows": rows
- }, "get", function(res){
- var $info = res.data;
- if($info.length > 0) {
- $("#"+aimId).show()
- $("#"+aimIdF).parents(".leftconItem").find(".nodatabox").hide()
- $("#"+aimIdF).parents(".splitBlock").removeClass("displayNone");
- $("#"+aimIdF).parents(".coninfobox").show();
- dataO.prdModifyTime = $info[$info.length - 1].modifyTime;
-
- for(var i = 0; i < $info.length; i++) {
- var cnt="", hasImg="../images/default-product.jpg"
- if($info[i].images) {
- var subs = strToAry($info[i].images)
- if(subs.length > 0) {
- hasImg="/data/product" + subs[0]
- }
- }
- if($info[i].cnt) {
- cnt = "简介:" +$info[i].cnt;
- }
- var itemlist = '<li>';
- itemlist += '<a href="../productShow.html?productId=' + $info[i].id + '" class="flexCenter urlgo">';
- itemlist += '<div class="madiaHead resouseHead" style="background-image:url(' + hasImg + ')"></div>';
- itemlist += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">' + $info[i].name + '</p><p class="h2Font ellipsisSty">' + cnt+ '</p></div>';
- itemlist += '</a></li>';
- var $itemlist = $(itemlist);
- $("#"+aimId).append($itemlist)
-
- if(isbind && i==0){
- var $itemlist = $(itemlist);
- $("#"+aimIdF).append($itemlist);
- }
- }
- }
- var liLen=document.getElementById(aimId).querySelectorAll("li").length;
- removeNodata(aimId);
- if($info.length == 0 && liLen == 0 ){
- $("#"+aimId).hide()
- insertNodata(aimId,newStr);
- }
- if(isbind){
- $("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
- serviceListVal(false)
- })
- }
- if ($info.length < rows) {
- $("#"+aimId).parent().find(".js-load-more").unbind("click");
- $("#"+aimId).parent().find(".js-load-more").hide();
- }
- },function(){
- $("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
- $("#"+aimId).parent().find(".js-load-more").addClass("active");
- },function(){
- $("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
- $("#"+aimId).parent().find(".js-load-more").removeClass("active");
- })
- },
- queryPubCount=function(){
- oAjax("/ajax/watch/countProfessor",{
- "id": orgId,
- "type":"6"
- }, "GET", function(data){
- $("#attenNum").text(data.data);
- });
- oAjax("/ajax/article/count/publish",{
- "owner": orgId,
- "category":"2"
- }, "GET", function(data){
- if(data.data>0 && data.data<99){
- $("#artCount").text(data.data);
- }
- if(data.data>99){
- $("#artCount").text("99+");
- }
- });
- oAjax("/ajax/resource/count/publish",{
- "owner": orgId,
- "category":"2"
- }, "GET", function(data){
- if(data.data>0 && data.data<99){
- $("#resCount").text(data.data);
- }
- if(data.data>99){
- $("#resCount").text("99+");
- }
- });
- oAjax("/ajax/ware/count/publish",{
- "owner": orgId,
- "category":"2"
- }, "GET", function(data){
- if(data.data>0 && data.data<99){
- $("#serCount").text(data.data);
- }
- if(data.data>99){
- $("#serCount").text("99+");
- }
- });
- oAjax("/ajax/product/count/publish",{
- "owner": orgId
- }, "GET", function(data){
- if(data.data>0 && data.data<99){
- $("#productCount").text(data.data);
- }
- if(data.data>99){
- $("#productCount").text("99+");
- }
- });
- },
- attentMyself=function(isbind){
- var aimId="attendMy",newStr="企业尚未被任何人关注"
- oAjax("/ajax/watch/watchList",{
- "watchObject": orgId,
- "createTime": watchO.beiTime,
- "professorId":watchO.beiProId,
- "rows":rows
- }, "GET", function(res){
- var $info = res.data;
- if($info.length > 0) {
- $("#"+aimId).show()
- watchO.beiTime = $info[$info.length - 1].createTime;
- watchO.beiProId = $info[$info.length - 1].professorId;
-
- for(var i = 0; i < $info.length; i++) {
- var liItem = document.createElement("li");
- document.getElementById("attendMy").appendChild(liItem);
- detailPro($info[i].professorId,liItem);
- }
- }
- var liLen=document.getElementById(aimId).querySelectorAll("li").length;
- removeNodata(aimId);
- if($info.length == 0 && liLen == 0 ){
- $("#"+aimId).hide()
- insertNodata(aimId,newStr);
- }
- if(isbind){
- $("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
- attentMyself(false)
- })
- }
- if ($info.length < rows) {
- $("#"+aimId).parent().find(".js-load-more").unbind("click");
- $("#"+aimId).parent().find(".js-load-more").hide();
- }
- },function(){
- $("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
- $("#"+aimId).parent().find(".js-load-more").addClass("active");
- },function(){
- $("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
- $("#"+aimId).parent().find(".js-load-more").removeClass("active");
- })
- },
- detailPro=function(pid,liItem) {
- oAjax("/ajax/professor/baseInfo/" + pid,{},"get",function(data){
- var datalist=data.data;
- var userType = autho(datalist.authType, datalist.orgAuth, datalist.authStatus);
- var os = "";
- if(datalist.title) {
- if(datalist.orgName) {
- os = datalist.title + "," + datalist.orgName;
- } else {
- os = datalist.title;
- }
- } else {
- if(datalist.office) {
- if(datalist.orgName) {
- os = datalist.office + "," + datalist.orgName;
- } else {
- os = datalist.office;
- }
- } else {
- if(datalist.orgName) {
- os = datalist.orgName;
- }
- }
- }
- var baImg = "../images/default-photo.jpg";
- if(datalist.hasHeadImage == 1) {
- baImg = "/images/head/" + datalist.id + "_l.jpg";
- }
- var strAdd = '';
- strAdd += '<a target="_blank" href="userInforShow.html?professorId='+ datalist.id +'" class="flexCenter urlgo">';
- strAdd += '<div class="madiaHead useHead" style="width: 80px;height: 80px;margin-top: -40px;background-image:url(' + baImg + ')"></div>';
- strAdd += '<div class="madiaInfo" style="padding-left:92px"><p class="h1Font ellipsisSty">' + datalist.name + '</span><em class="authicon ' + userType.sty + '" title="'+userType.title+'"></em></p>';
- strAdd += '<p class="h2Font ellipsisSty">' + os + '</p>';
- strAdd += '</div>';
- strAdd += '</a>';
- liItem.innerHTML = strAdd
- })
- },
- bindClickFun=function(){
-
- $(".coninfobox").on("click", "#seeMorePd", function() {
- document.body.scrollTop = document.documentElement.scrollTop = 0;
- $("#tab10user").addClass("liNow").siblings().removeClass("liNow");
- $("#item1user").hide();
- $("#item10user").show();
- })
-
- $(".coninfobox").on("click", "#seeMoreS", function() {
- document.body.scrollTop = document.documentElement.scrollTop = 0;
- $("#tab9user").addClass("liNow").siblings().removeClass("liNow");
- $("#item1user").hide();
- $("#item9user").show();
- })
-
- $(".coninfobox").on("click", "#seeMoreR", function() {
- document.body.scrollTop = document.documentElement.scrollTop = 0;
- $("#tab2user").addClass("liNow").siblings().removeClass("liNow");
- $("#item1user").hide();
- $("#item2user").show();
- })
-
- $(".coninfobox").on("click", "#seeMoreA", function() {
- document.body.scrollTop = document.documentElement.scrollTop = 0;
- $("#tab3user").addClass("liNow").siblings().removeClass("liNow");
- $("#item1user").hide();
- $("#item3user").show();
- })
-
- $("#attendmyGo").on("click",function(){
- $(".mainNavUl li.rightbtn").addClass("liNow").siblings().removeClass("liNow");
- $("#item8more").show();
- $("#item8user").show().siblings().hide();
- $(".moreBuUl li.attendMy").addClass("liNow").siblings().removeClass("liNow");
- $("#item8drop1").show().siblings().hide();
- })
-
- }
-
- queryPubCount();
- getCmpInfo();
- articalListVal(true);
- bindClickFun();
-
- attentMyself(true);
- })
|