portal html css js resource

userInforShow.js 77KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211
  1. $(function() {
  2. loginStatus();//判断个人是否登录
  3. var userid = $.cookie("userid");
  4. var professorId = GetQueryString("professorId");
  5. if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){
  6. location.href="http://" + window.location.host + "/e/p.html?id="+professorId;
  7. }
  8. var oArray=[];
  9. var watchType=1;
  10. var pageSize=10
  11. var QTime,QId,ATime,AId,WTime,WId,rows= 10;
  12. if(professorId) {
  13. $("#collectArtTab").on('click',function(){
  14. })
  15. // $(".navconBox").on("click","li",function(){
  16. // $(this).addClass("liNow").siblings().removeClass("liNow");
  17. // $(".leftconBox .leftconItem").eq($(".navconBox li").index(this)).show().siblings().hide();
  18. // })
  19. // $(".navconBox>.mainNavUl").on("click","li:not('.rightbtn')",function(){
  20. // $(".moreNav").hide();
  21. // })
  22. // $(".navconBox>.mainNavUl").on("click","li.wenda",function(){//问答
  23. // if(userid === professorId) {
  24. // $(".wendaNav").show();
  25. // }else{
  26. // $("#item6user .coninfobox").eq(0).addClass("displayNone").siblings().removeClass("displayNone");
  27. // }
  28. // })
  29. // $(".navconBox>.mainNavUl").on("click","li.rightbtn",function(){//更多
  30. // $(".moreBu").show();
  31. // $(".wendaNav").hide();
  32. // })
  33. // $(".wendaUl").on("click","li",function(){//获取关注对象类型标志
  34. // console.log($(".wendaUl li").index(this))
  35. // $("#item6user>.coninfobox").eq($(".wendaUl li").index(this)).show().siblings().hide();
  36. //
  37. // })
  38. // $(".moreBuUl").on("click","li:not('.rightbtn')",function(){//获取关注对象类型标志
  39. // $("#item8user").find(".js-load-more").unbind();
  40. // $("#item8user").find(".js-load-more").remove();
  41. // $("#item8user").find("ul").each(function () {
  42. // $(this).html("");
  43. // });
  44. // watchType=$(this).attr("data-num");
  45. // console.log($(".moreBuUl li:not('.rightbtn')").index(this))
  46. // $("#item8user>.coninfobox").eq($(".moreBuUl li:not('.rightbtn')").index(this)).show().siblings().hide();
  47. // WTime = "";WId = "";
  48. // if(watchType==0){
  49. // attentMy()
  50. // }else if(watchType == 9) {
  51. // getMyWatchA(userid,true)
  52. // }else if(watchType == 8) {
  53. // getMyWatchQ(userid, true);
  54. // }else{
  55. //
  56. // collAttent(1,true);
  57. // }
  58. // })
  59. // $(".navconBox .moreBu>.moreBuUl").on("click","li.rightbtn",function(){
  60. // $(this).find(".table-drop").show();
  61. // })
  62. // $(".table-drop").on("click","li",function(){
  63. // $(".navconBox .moreBu>.moreBuUl>.rightbtn").find("span").html($(this).text());
  64. // $(".table-drop").fadeOut(1000);
  65. // })
  66. //
  67. }
  68. function subjectShow(data) {
  69. if(data != undefined && data.length != 0) {
  70. var subs=strToAry(data)
  71. if(subs.length > 0) {
  72. for(var i = 0; i < subs.length; i++) {
  73. $("#subjectShow").append("<li>" + subs[i] + "</li>");
  74. };
  75. }
  76. }
  77. }
  78. function researchAreaShow(dataStrs, dataStrrecords) {
  79. if(dataStrs != undefined && dataStrs.length != 0) {
  80. var html = [];
  81. for(var i = 0; i < dataStrs.length; ++i) {
  82. var dataStr = dataStrs[i];
  83. var $photos = [];
  84. //获取头像
  85. if(dataStrrecords.length > 0) {
  86. $photos = getRecords(dataStrrecords, dataStr.caption);
  87. }
  88. var isAgree = -1;
  89. for(var j = 0; j < $photos.length; j++) {
  90. if(userid == $photos[j].id)
  91. isAgree++;
  92. }
  93. oArray[i]=dataStr.caption;
  94. if(professorId != userid) {
  95. if(isAgree) {
  96. var showDiv = '<li><div class="favorBox" caption="'+ dataStr.caption +'"><span class="like">'+ dataStr.count +'</span>'+ dataStr.caption +'</div><span class="plus" data-pid="'+ dataStr.professorId +'" data-caption="'+ i + '" data-isagree="' + isAgree + '"></span><div class="favorCount" caption="'+ dataStr.caption +'">';
  97. } else {
  98. var showDiv = '<li><div class="favorBox" caption="'+ dataStr.caption +'"><span class="like">'+ dataStr.count +'</span>'+ dataStr.caption +'</div><span class="plus" style="background-position-y:-26px" data-pid="'+ dataStr.professorId +'" data-caption="'+ i + '" data-isagree="' + isAgree + '"></span><div class="favorCount" caption="'+ dataStr.caption +'">';
  99. }
  100. } else {
  101. var showDiv = '<li><div class="favorBox" caption="'+ dataStr.caption +'"><span class="like">'+ dataStr.count +'</span>'+ dataStr.caption +'</div><div class="favorCount" caption="'+ dataStr.caption +'">';
  102. }
  103. if($photos.length < 6) {
  104. for(var j = 0; j < $photos.length; ++j) {
  105. if($photos[j].img) {
  106. showDiv += '<span class="like-people" style="background-image: url(../images/head/'+ $photos[j].id +'_s.jpg);"></span>';
  107. } else {
  108. showDiv += '<span class="like-people" style="background-image: url(../images/default-photo.jpg);"></span>';
  109. }
  110. }
  111. } else {
  112. for(var j = $photos.length - 5; j < $photos.length; ++j) {
  113. if($photos[j].img) {
  114. showDiv +='<span class="like-people" style="background-image: url(../images/head/'+ $photos[j].id +'_s.jpg);"></span>';
  115. } else {
  116. showDiv += '<span class="like-people" style="background-image: url(../images/default-photo.jpg);"></span>';
  117. }
  118. }
  119. showDiv += '<span class="like-people like-more"></span>';
  120. }
  121. showDiv += "</div></li>";
  122. html.push(showDiv);
  123. }
  124. document.getElementById("researchAreaShow").innerHTML = html.join('');
  125. }
  126. }
  127. function industryShow(data) {
  128. if(data != undefined && data.length != 0) {
  129. var subs=strToAry(data)
  130. if(subs.length > 0) {
  131. for(var i = 0; i < subs.length; i++) {
  132. $("#industryShow").append("<li><div class='h4tit'>" + subs[i] + "</div></li>");
  133. };
  134. }
  135. }
  136. }
  137. function projectShow(data) {
  138. if(data.length > 0) {
  139. for(var i = 0; i < data.length; i++) {
  140. if(!data[i].descp) {
  141. data[i].descp = "";
  142. }
  143. var sDate = "";
  144. var eDate = "";
  145. if(data[i].startMonth) {
  146. sDate = data[i].startMonth.substr(0, 4) + "年" + data[i].startMonth.substr(4, 6) + "月";
  147. sDateV = data[i].startMonth.substr(0, 4) + "-" + data[i].startMonth.substr(4, 6);
  148. if(data[i].stopMonth) {
  149. eDate =" - "+ data[i].stopMonth.substr(0, 4) + "年" + data[i].stopMonth.substr(4, 6) + "月";
  150. } else {
  151. eDate = " - "+ "至今";
  152. }
  153. }
  154. var projectHtml = '<li>';
  155. projectHtml += '<div class="h4Font h4tit">' + data[i].name + '<small class="h6Font">' + sDate + eDate + '</small></div>';
  156. projectHtml += '<div class="h5Font">' + data[i].descp + '</div>';
  157. projectHtml += '</li>';
  158. $("#projectShow").append(projectHtml);
  159. }
  160. }
  161. }
  162. function honorShow(data) {
  163. if(data.length > 0) {
  164. for(var i = 0; i < data.length; i++) {
  165. var timeho="";
  166. if(data[i].year){
  167. timeho = data[i].year+'年';
  168. }else{
  169. data[i].year="";
  170. }
  171. if(!data[i].descp) {
  172. data[i].descp = "";
  173. }
  174. var honorHtml = '<li>';
  175. honorHtml += '<div class="h4Font h4tit">' + data[i].name + '<small class="h6Font">' + timeho + '</small></div>';
  176. honorHtml += '<div class="h5Font">' + data[i].descp + '</div>';
  177. honorHtml += '</li>';
  178. $("#honorShow").append(honorHtml);
  179. }
  180. }
  181. }
  182. function timeJobShow(data) {
  183. if(data.length > 0) {
  184. for(var i = 0; i < data.length; i++) {
  185. if(data[i].department) {
  186. var dep = " - " + data[i].department;
  187. } else {
  188. var dep = ""
  189. }
  190. var sDate = "";
  191. var eDate = "";
  192. if(data[i].startMonth) {
  193. sDate = data[i].startMonth.substr(0, 4) + "年" + data[i].startMonth.substr(4, 6) + "月";
  194. sDateV = data[i].startMonth.substr(0, 4) + "-" + data[i].startMonth.substr(4, 6);
  195. if(data[i].stopMonth) {
  196. eDate =" - "+ data[i].stopMonth.substr(0, 4) + "年" + data[i].stopMonth.substr(4, 6) + "月";
  197. } else {
  198. eDate = " - "+ "至今";
  199. }
  200. }
  201. var JobHtml = '<li>';
  202. JobHtml += '<div class="h4Font h4tit">' + data[i].company + dep + ' - ' + data[i].title + '<small class="h6Font">' + sDate + eDate + '</small></div>';
  203. JobHtml += '</li>';
  204. $("#timeJobShow").append(JobHtml);
  205. }
  206. }
  207. }
  208. function eduBgShow(data) {
  209. if(data.length > 0) {
  210. for(var i = 0; i < data.length; i++) {
  211. var college="",major="",degree=""
  212. if(data[i].college){
  213. college =' - ' + data[i].college
  214. }else{
  215. data[i].college="";
  216. }
  217. if(data[i].major){
  218. major =' - ' + data[i].major
  219. }else{
  220. data[i].major="";
  221. }
  222. if(data[i].degree){
  223. degree =' - ' + data[i].degree
  224. if(data[i].degree==0){
  225. degree =""
  226. }
  227. }else{
  228. data[i].degree="";
  229. }
  230. var timebiye="";
  231. if(data[i].year){
  232. if(data[i].year.trim()=="至今"){
  233. timebiye=data[i].year;
  234. }else{
  235. timebiye=data[i].year+'年';
  236. }
  237. }else{
  238. timebiye="";
  239. }
  240. var showHtml = '<li><div class="h4Font h4tit">'
  241. showHtml += data[i].school + college + major + degree;
  242. showHtml +='<small class="h6Font">' + timebiye + '</small></div></li>';
  243. $("#eduBgShow").append(showHtml);
  244. }
  245. }
  246. }
  247. //判断点赞的用户是否有头像
  248. function getRecords($researchAreaLogs, caption) {
  249. var ret = [];
  250. var t = 0;
  251. for(var i = 0; i < $researchAreaLogs.length; i++) {
  252. if(caption == $researchAreaLogs[i].caption) {
  253. ret[t] = {
  254. id: $researchAreaLogs[i].opreteProfessorId,
  255. img: $researchAreaLogs[i].hasHeadImage
  256. }
  257. t++;
  258. }
  259. }
  260. return ret;
  261. }
  262. function openAttend(){//打开收藏与关注
  263. watchO={
  264. watchTime:"",
  265. watchObjId:"",
  266. };
  267. var pa=$(".moreNavUl.moreBuUl>li.liNow").attr("rel")
  268. $("#"+pa).find("ul").html("")
  269. $("#"+pa).find(".js-load-more").show();
  270. collectSorts(1,true);
  271. $(".mainNavUl li.rightbtn").addClass("liNow").siblings().removeClass("liNow");
  272. $(".navconBox .moreBu").show();
  273. $(".wendaNav").hide();
  274. $("#item8user").show().siblings().hide();
  275. $(".moreBuUl li.attentType").eq(0).addClass("liNow").siblings().removeClass("liNow");
  276. $("#item8drop1").show().siblings().hide();
  277. }
  278. function researchAlert(cap){
  279. $.ajax({
  280. "url": "/ajax/researchAreaLog/ql",
  281. "type": "get",
  282. "data": {
  283. "professorId": professorId,
  284. "caption": cap,
  285. "rows": 1000
  286. },
  287. "success": function(data) {
  288. if(data.success) {
  289. console.log(data)
  290. $("#areaCon").html("");
  291. var $info = data.data;
  292. $("#subArea").text(cap);
  293. $(".resAreaCover").fadeIn();
  294. $(".resAreaTip").addClass("displayNone")
  295. $(".resAreaCon").show()
  296. if($info.length == 0) {
  297. $(".resAreaCon").hide();
  298. $(".resAreaTip").removeClass("displayNone")
  299. return;
  300. }
  301. var arr=[];
  302. for(var i in $info) {
  303. arr[i]=$info[i].opreteProfessorId;
  304. }
  305. detailPro(arr,"areaCon");
  306. }
  307. }
  308. });
  309. }
  310. var rows = 2,
  311. dataO = {
  312. artPublishTime:"",
  313. artShareId:"",
  314. resPublishTime:"",
  315. resShareId:"",
  316. serModifyTime: "",
  317. serId: "",
  318. patTime:"",
  319. patId:"",
  320. parTime:"",
  321. parId:"",
  322. AnsTime:"",
  323. AnsId:"",
  324. QuTime:"",
  325. QuId:"",
  326. },
  327. watchO={
  328. beiTime:"",
  329. beiProId:"",
  330. watchTime:"",
  331. watchObjId:"",
  332. WATime:"",
  333. WAId:"",
  334. WQTime:"",
  335. WQId:"",
  336. };
  337. var oAjax = function(url, dataS, otype, oFun,beforeFun,completeFun) {
  338. $.ajax({
  339. url:url,
  340. dataType: 'json',
  341. type: otype,
  342. data: dataS,
  343. traditional: true,
  344. beforeSend: beforeFun,
  345. success: function(res) {
  346. if(res.success) {
  347. oFun(res)
  348. }
  349. },
  350. complete:completeFun
  351. });
  352. },
  353. insertNodata = function (targetE,newStr) {
  354. var parent = document.getElementById(targetE).parentNode;
  355. var kong = document.createElement("div");
  356. kong.className = "con-kong";
  357. kong.innerHTML ='<div class="picbox picNull"></div>'+
  358. '<div class="txtbox">暂时没有符合该搜索条件的内容</div>'
  359. if(newStr){
  360. kong.querySelector(".txtbox").innerHTML = newStr;
  361. }
  362. if (parent.firstChild.className == "con-kong") {
  363. return
  364. } else {
  365. parent.insertBefore(kong,parent.firstChild);
  366. }
  367. },
  368. removeNodata = function (targetE) {
  369. var parent = document.getElementById(targetE).parentNode;
  370. if (parent.firstChild.className == "con-kong") {
  371. parent.removeChild(parent.firstChild);
  372. } else {
  373. return
  374. }
  375. },
  376. getUserInfo=function() {
  377. oAjax("/ajax/professor/info/"+ professorId,{}, "get", function(data){
  378. var $info = data.data;
  379. if($info.hasHeadImage){
  380. $("#proHead").css("background-image","url(/images/head/"+ $info.id +"_l.jpg)");
  381. }
  382. $("#proName").text($info.name);
  383. var oStyS=autho($info.authType,$info.orgAuth,$info.authStatus);
  384. $("#proAuth").addClass(oStyS.sty); $("#proAuth").attr("title",oStyS.title);
  385. if($info.address){
  386. $("#proAddress").html($info.address + "<span style='margin-right:10px;'></span>");
  387. }
  388. var proOther="";
  389. if($info.orgName){
  390. if($info.department){
  391. if($info.office){
  392. proOther = $info.orgName + "," + $info.department + "," + $info.office
  393. }else{
  394. proOther = $info.orgName + "," + $info.department
  395. }
  396. }else{
  397. if($info.office){
  398. proOther = $info.orgName +"," + $info.office
  399. }else{
  400. proOther = $info.orgName
  401. }
  402. }
  403. }else{
  404. if($info.department){
  405. if($info.office){
  406. proOther = $info.department + "," + $info.office
  407. }else{
  408. proOther = $info.department
  409. }
  410. }else{
  411. if($info.office){
  412. proOther = $info.office
  413. }
  414. }
  415. }
  416. $("#proOther").text(proOther);
  417. var llqtitle=$info.name + "-" + proOther.replace(/,/gi,"-") + "-科袖网";//修改浏览器title信息
  418. if($info.title){
  419. $("#proTit").html($info.title + "<span style='margin-right:10px;'></span>");
  420. llqtitle = $info.name + "-" + $info.title + "-" + proOther.replace(/,/gi,"-") + "-科袖网";
  421. }
  422. document.title = llqtitle;
  423. //主页浏览量
  424. $("#viewNums").text($info.pageViews);
  425. //个人简介
  426. if($info.descp) {
  427. $("#descpS").parents(".coninfobox").removeClass("displayNone");
  428. $("#item1user>.nodatabox").addClass("displayNone");
  429. $("#descpS").text($info.descp);
  430. }
  431. //学术领域
  432. if($info.subject) {
  433. $("#subjectShow").parents(".coninfobox").removeClass("displayNone");
  434. $("#item1user>.nodatabox").addClass("displayNone");
  435. subjectShow($info.subject);
  436. }
  437. //研究方向
  438. if($info.researchAreas.length) {
  439. $("#researchAreaShow").parents(".coninfobox").removeClass("displayNone");
  440. $("#item1user>.nodatabox").addClass("displayNone");
  441. researchAreaShow($info.researchAreas, $info.editResearchAreaLogs);
  442. }
  443. //行业领域
  444. if($info.industry) {
  445. $("#industryShow").parents(".coninfobox").removeClass("displayNone");
  446. $("#item1user>.nodatabox").addClass("displayNone");
  447. industryShow($info.industry);
  448. }
  449. //教育背景
  450. if($info.edus.length) {
  451. eduBgShow($info.edus);
  452. } else {
  453. $("#eduBgShow").parents(".coninfobox").hide();
  454. }
  455. //兼职
  456. if($info.jobs.length) {
  457. timeJobShow($info.jobs);
  458. } else {
  459. $("#timeJobShow").parents(".coninfobox").hide();
  460. }
  461. //项目
  462. if($info.projects.length) {
  463. projectShow($info.projects)
  464. } else {
  465. $("#projectShow").parents(".coninfobox").hide();
  466. }
  467. //荣誉
  468. if($info.honors.length) {
  469. honorShow($info.honors);
  470. } else {
  471. $("#honorShow").parents(".coninfobox").hide();
  472. }
  473. if($info.honors.length == 0 && $info.projects.length == 0 && $info.jobs.length == 0 && $info.edus.length == 0){
  474. $("#item7user>.nodatabox").show();
  475. $("#item7user>.nodatabox").find(".noContip").text("用户尚未完善详细资料")
  476. }
  477. var weibotitle = $info.name;
  478. var weibourl = window.location.href;
  479. var weibopic ="http://"+window.location.host+"/images/head/"+ $info.id +"_l.jpg";
  480. $("#weibo").attr("href","http://service.weibo.com/share/share.php?appkey=3677230589&title="+weibotitle+"&url="+weibourl+"&pic="+weibopic+"&ralateUid=6242830109&searchPic=false&style=simple");
  481. });
  482. },
  483. commerceInfo=function(oName){
  484. oAjax("/ajax/org/regInfo",{
  485. "name": oName
  486. }, "get", function(data){
  487. if(data.data) {
  488. $("#comMes").parents(".coninfobox").show();
  489. var $data = data.data;
  490. var str = "";
  491. if($data.num) {
  492. str += "<li>工商注册号:" + $data.num + "</li>"
  493. }
  494. if($data.code) {
  495. str += "<li>组织机构代码:" + $data.code + "</li>"
  496. }
  497. if($data.creditCode) {
  498. str += "<li>统一信用代码:" + $data.creditCode + "</li>"
  499. }
  500. if($data.type) {
  501. str += "<li>企业类型:" + $data.type + "</li>"
  502. }
  503. if($data.industry) {
  504. str += "<li>行业:" + $data.industry + "</li>"
  505. }
  506. if($data.operatingPeriod) {
  507. str += "<li>营业期限:" + $data.operatingPeriod + "</li>"
  508. }
  509. if($data.dayOfApproval) {
  510. str += "<li>核准日期:" + $data.dayOfApproval + "</li>"
  511. }
  512. if($data.manager) {
  513. str += "<li>登记机关:" + $data.manager + "</li>"
  514. }
  515. if($data.addr) {
  516. str += "<li>注册地址:" + $data.addr + "</li>"
  517. }
  518. if($data.scopeOfBusiness) {
  519. str += "<li>经营范围:" + $data.scopeOfBusiness + "</li>"
  520. }
  521. $("#comMes").html(str);
  522. }
  523. });
  524. },
  525. demandListVal=function(isbind) {
  526. oAjax("/ajax/demand/pq",{
  527. "state":'1',
  528. "uid":professorId,
  529. "pageSize":5
  530. }, "get", function(data){
  531. var $info = data.data.data;
  532. if($info.length > 0){
  533. $("#showDemand").parents(".coninfobox").removeClass("displayNone");
  534. $("#item1user>.nodatabox").addClass("displayNone");
  535. for(var i = 0; i < $info.length; i++) {
  536. var liStr=$("<li></li>").appendTo("#showDemand");
  537. var $data=$info[i];
  538. var sowU="";
  539. if($data.pageViews!=0){
  540. sowU='<li><span>浏览量 '+$data.pageViews +'</span></li>'
  541. }
  542. var strCon='';
  543. strCon+='<a class="" target="_blank" href="demandShow.html?demandId='+$data.id+'" class="madiaInfo">'
  544. strCon+='<p class="h1Font ellipsisSty">'+ $data.title +'</p>'
  545. strCon+='<ul class="showliTop h3Font clearfix">'
  546. strCon+='<li><span>发布于 '+TimeTr($data.createTime)+'</span></li>'
  547. strCon+= sowU
  548. strCon+='</ul>'
  549. strCon+='<p class="h2Font ellipsisSty-2">'+$data.descp+'</p>'
  550. strCon+='<ul class="showli clearfix h3Font">'
  551. if($data.city){ strCon+='<li>所在城市:'+$data.city+'</li>' }
  552. if($data.duration!=0){ strCon+='<li>预期时长:'+demandDuration[$data.duration]+'</li>' }
  553. if($data.cost!=0){ strCon+='<li>费用预算:'+demandCost[$data.cost]+'</li>' }
  554. if($data.invalidDay){ strCon+='<li>有效期至:'+TimeTr($data.invalidDay)+'</li>' }
  555. strCon+='</ul>'
  556. strCon+='</a>'
  557. $(strCon).appendTo(liStr);
  558. }
  559. }else{
  560. $("#showDemand").parents(".needinfobox").addClass("displayNone");
  561. }
  562. })
  563. },
  564. articalListVal=function(isbind){
  565. var aimId="proArticel",aimIdF="showArticle",newStr="用户尚未发布任何文章"
  566. oAjax("/ajax/article/publish",{
  567. "category": "1",
  568. "owner":professorId,
  569. "publishTime":dataO.artPublishTime,
  570. "shareId": dataO.artShareId,
  571. "rows": rows
  572. }, "get", function(res){
  573. var $info = res.data;
  574. if($info.length > 0) {
  575. $("#"+aimId).show()
  576. $("#"+aimIdF).parents(".coninfobox").removeClass("displayNone");
  577. dataO.artPublishTime = $info[$info.length - 1].publishTime;
  578. dataO.artShareId = $info[$info.length - 1].shareId;
  579. for(var i = 0; i < $info.length; i++) {
  580. var sowU="",hasImg="/images/default-artical.jpg"
  581. if($info[i].articleImg) {
  582. hasImg="/data/article/" + $info[i].articleImg
  583. }
  584. if($info[i].pageViews!=0){
  585. if($info[i].articleAgree!=0){
  586. sowU='<li><span>阅读量 '+$info[i].pageViews+'</span></li><li><span>赞 '+$info[i].articleAgree+'</span></li>'
  587. }else{
  588. sowU='<li><span>阅读量 '+$info[i].pageViews+'</span></li>'
  589. }
  590. }
  591. var itemlist = '<li>';
  592. itemlist += '<a href="/'+pageUrl('a',$info[i])+'" class="flexCenter urlgo">';
  593. itemlist += '<div class="madiaHead artHead" style="background-image:url(' + hasImg + ')"></div>';
  594. itemlist += '<div class="madiaInfo">';
  595. itemlist += '<p class="h1Font ellipsisSty-2">'+$info[i].articleTitle+'</p>';
  596. itemlist += '<ul class="h2Font clearfix">';
  597. itemlist += '<li><span class="time">' + commenTime($info[i].publishTime) + '</span></li>';
  598. itemlist += sowU
  599. itemlist += '<li><span class="leaveMsgCount"></span></li>';
  600. itemlist += '</ul></div>';
  601. itemlist += '</a></li>';
  602. var $itemlist = $(itemlist);
  603. $("#"+aimId).append($itemlist)
  604. leaveMsgCount($info[i].articleId,1,$itemlist);
  605. if(isbind && i==0){
  606. var $itemlist = $(itemlist);
  607. $("#"+aimIdF).append($itemlist);
  608. leaveMsgCount($info[0].articleId,1,$itemlist);
  609. }
  610. }
  611. }
  612. var liLen=document.getElementById(aimId).querySelectorAll("li").length;
  613. removeNodata(aimId);
  614. if($info.length == 0 && liLen == 0 ){
  615. $("#"+aimId).hide()
  616. insertNodata(aimId,newStr);
  617. }
  618. if(isbind){
  619. $("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
  620. articalListVal(false)
  621. })
  622. }
  623. if ($info.length < rows) {
  624. $("#"+aimId).parent().find(".js-load-more").unbind("click");
  625. $("#"+aimId).parent().find(".js-load-more").hide();
  626. }
  627. },function(){
  628. $("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
  629. $("#"+aimId).parent().find(".js-load-more").addClass("active");
  630. },function(){
  631. $("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
  632. $("#"+aimId).parent().find(".js-load-more").removeClass("active");
  633. })
  634. },
  635. resourceListVal=function(isbind){
  636. var aimId="proResource",aimIdF="showResource",newStr="用户尚未发布任何资源"
  637. oAjax("/ajax/resource/publish",{
  638. "category": "1",
  639. "owner":professorId,
  640. "publishTime":dataO.resPublishTime,
  641. "shareId": dataO.resShareId,
  642. "rows": rows
  643. }, "get", function(res){
  644. var $info = res.data;
  645. if($info.length > 0) {
  646. $("#"+aimId).show()
  647. $("#"+aimIdF).parents(".form-item").removeClass("displayNone");
  648. $("#"+aimIdF).parents(".coninfobox").show();
  649. dataO.resPublishTime = $info[$info.length - 1].publishTime;
  650. dataO.resShareId = $info[$info.length - 1].shareId;
  651. for(var i = 0; i < $info.length; i++) {
  652. var hasImg='/images/default-resource.jpg'
  653. if($info[i].images.length) {
  654. hasImg="/data/resource/" + $info[i].images[0].imageSrc
  655. }
  656. var itemlist = '<li>';
  657. itemlist += '<a href="resourceShow.html?resourceId=' + $info[i].resourceId + '" class="flexCenter urlgo">';
  658. itemlist += '<div class="madiaHead resouseHead" style="background-image:url(' + hasImg + ')"></div>';
  659. itemlist += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">' + $info[i].resourceName + '</p><p class="h2Font ellipsisSty">应用用途:' + $info[i].supportedServices + '</p></div>';
  660. itemlist += '</a></li>';
  661. var $itemlist = $(itemlist);
  662. $("#"+aimId).append($itemlist)
  663. if(isbind && i==0){
  664. var $itemlist = $(itemlist);
  665. $("#"+aimIdF).append($itemlist);
  666. }
  667. }
  668. }
  669. var liLen=document.getElementById(aimId).querySelectorAll("li").length;
  670. removeNodata(aimId);
  671. if($info.length == 0 && liLen == 0 ){
  672. $("#"+aimId).hide()
  673. insertNodata(aimId,newStr);
  674. }
  675. if(isbind){
  676. $("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
  677. resourceListVal(false)
  678. })
  679. }
  680. if ($info.length < rows) {
  681. $("#"+aimId).parent().find(".js-load-more").unbind("click");
  682. $("#"+aimId).parent().find(".js-load-more").hide();
  683. }
  684. },function(){
  685. $("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
  686. $("#"+aimId).parent().find(".js-load-more").addClass("active");
  687. },function(){
  688. $("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
  689. $("#"+aimId).parent().find(".js-load-more").removeClass("active");
  690. })
  691. },
  692. serviceListVal=function(isbind){
  693. var aimId="proService",aimIdF="showService",newStr="用户尚未发布任何服务"
  694. oAjax("/ajax/ware/publish",{
  695. "category":"1",
  696. "owner":professorId,
  697. "modifyTime":dataO.serModifyTime,
  698. "rows": rows
  699. }, "get", function(res){
  700. var $info = res.data;
  701. if($info.length > 0) {
  702. $("#"+aimId).show()
  703. $("#"+aimIdF).parents(".form-item").removeClass("displayNone");
  704. $("#"+aimIdF).parents(".coninfobox").show();
  705. dataO.serModifyTime = $info[$info.length - 1].modifyTime;
  706. for(var i = 0; i < $info.length; i++) {
  707. var cnt="", hasImg="../images/default-service.jpg"
  708. if($info[i].images) {
  709. var subs = strToAry($info[i].images)
  710. if(subs.length > 0) {
  711. hasImg="/data/ware" + subs[0]
  712. }
  713. }
  714. var itemlist = '<li>';
  715. itemlist += '<a href="serviceShow.html?serviceId=' + $info[i].id + '" class="flexCenter urlgo">';
  716. itemlist += '<div class="madiaHead resouseHead" style="background-image:url(' + hasImg + ')"></div>';
  717. itemlist += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">' + $info[i].name + '</p><p class="h2Font ellipsisSty">' + cnt+ '</p></div>';
  718. itemlist += '</a></li>';
  719. var $itemlist = $(itemlist);
  720. $("#"+aimId).append($itemlist)
  721. if(isbind && i==0){
  722. var $itemlist = $(itemlist);
  723. $("#"+aimIdF).append($itemlist);
  724. }
  725. }
  726. }
  727. var liLen=document.getElementById(aimId).querySelectorAll("li").length;
  728. removeNodata(aimId);
  729. if($info.length == 0 && liLen == 0 ){
  730. $("#"+aimId).hide()
  731. insertNodata(aimId,newStr);
  732. }
  733. if(isbind){
  734. $("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
  735. serviceListVal(false)
  736. })
  737. }
  738. if ($info.length < rows) {
  739. $("#"+aimId).parent().find(".js-load-more").unbind("click");
  740. $("#"+aimId).parent().find(".js-load-more").hide();
  741. }
  742. },function(){
  743. $("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
  744. $("#"+aimId).parent().find(".js-load-more").addClass("active");
  745. },function(){
  746. $("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
  747. $("#"+aimId).parent().find(".js-load-more").removeClass("active");
  748. })
  749. },
  750. patentListVal=function(isbind){
  751. var aimId="proPatent",aimIdF="showPatent",newStr="用户尚未发布任何专利"
  752. oAjax("/ajax/ppatent/professor",{
  753. "category":"1",
  754. "owner":professorId,
  755. "assTime":dataO.patTime,
  756. "id":dataO.patId,
  757. "rows": rows
  758. }, "get", function(res){
  759. var $info = res.data;
  760. if($info.length > 0) {
  761. $("#"+aimId).show()
  762. $("#"+aimIdF).parents(".form-item").removeClass("displayNone");
  763. $("#"+aimIdF).parents(".coninfobox").show();
  764. dataO.patTime = $info[$info.length - 1].assTime;
  765. dataO.patId = $info[$info.length - 1].id;
  766. for(var i = 0; i < $info.length; i++) {
  767. var dataStr= $info
  768. if(!dataStr[i].reqPerson){
  769. dataStr[i].reqPerson="";
  770. }
  771. var strAdd = '';
  772. strAdd += '<li><a target="_blank" href="/'+ pageUrl("pt",dataStr[i]) +'" class="flexCenter urlgo">';
  773. strAdd += '<div class="madiaHead patentHead"></div>';
  774. strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty">'+ dataStr[i].name +'</p>';
  775. strAdd += '<p class="h2Font ellipsisSty">发明人:'+ dataStr[i].authors.substring(0, dataStr[i].authors.length - 1) +'</p>';
  776. strAdd += '<p class="h2Font ellipsisSty">申请人:'+ dataStr[i].reqPerson +'</p>';
  777. strAdd += '</div>';
  778. strAdd += '</a></li>';
  779. var $itemlist = $(strAdd);
  780. $("#"+aimId).append($itemlist)
  781. if(isbind && i==0){
  782. var $itemlist = $(strAdd);
  783. $("#"+aimIdF).append($itemlist);
  784. }
  785. }
  786. }
  787. var liLen=document.getElementById(aimId).querySelectorAll("li").length;
  788. removeNodata(aimId);
  789. if($info.length == 0 && liLen == 0 ){
  790. $("#"+aimId).hide()
  791. insertNodata(aimId,newStr);
  792. }
  793. if(isbind){
  794. $("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
  795. patentListVal(false)
  796. })
  797. }
  798. if ($info.length < rows) {
  799. $("#"+aimId).parent().find(".js-load-more").unbind("click");
  800. $("#"+aimId).parent().find(".js-load-more").hide();
  801. }
  802. },function(){
  803. $("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
  804. $("#"+aimId).parent().find(".js-load-more").addClass("active");
  805. },function(){
  806. $("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
  807. $("#"+aimId).parent().find(".js-load-more").removeClass("active");
  808. })
  809. },
  810. paperListVal=function(isbind){
  811. var aimId="proPaper",aimIdF="showPaper",newStr="用户尚未发布任何论文"
  812. oAjax("/ajax/ppaper/professor",{
  813. "category":"1",
  814. "owner":professorId,
  815. "assTime":dataO.parTime,
  816. "id":dataO.parId,
  817. "rows": rows
  818. }, "get", function(res){
  819. var $info = res.data;
  820. if($info.length > 0) {
  821. $("#"+aimId).show()
  822. $("#"+aimIdF).parents(".form-item").removeClass("displayNone");
  823. $("#"+aimIdF).parents(".coninfobox").show();
  824. dataO.parTime = $info[$info.length - 1].assTime;
  825. dataO.parId = $info[$info.length - 1].id;
  826. for(var i = 0; i < $info.length; i++) {
  827. var dataStr= $info
  828. var moreInf=""
  829. if(!dataStr[i].cn4periodical){
  830. dataStr[i].cn4periodical="";
  831. }
  832. if(!dataStr[i].en4periodical){
  833. dataStr[i].en4periodical="";
  834. }
  835. if(!dataStr[i].pubDay){
  836. dataStr[i].pubDay="";
  837. }
  838. moreInf = dataStr[i].cn4periodical+ " " +dataStr[i].en4periodical+ " " +dataStr[i].pubDay
  839. var strAdd = '';
  840. strAdd += '<li><a target="_blank" href="/'+ pageUrl("pp",dataStr[i]) +'" class="flexCenter urlgo">';
  841. strAdd += '<div class="madiaHead paperHead"></div>';
  842. strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty">'+ dataStr[i].name +'</p>';
  843. strAdd += '<p class="h2Font ellipsisSty">作者:'+ dataStr[i].authors.substring(0, dataStr[i].authors.length - 1) +'</p>';
  844. strAdd += '<p class="h2Font ellipsisSty">期刊:'+ moreInf +'</p>';
  845. strAdd += '</div>';
  846. strAdd += '</a></li>';
  847. var $itemlist = $(strAdd);
  848. $("#"+aimId).append($itemlist)
  849. if(isbind && i==0){
  850. var $itemlist = $(strAdd);
  851. $("#"+aimIdF).append($itemlist);
  852. }
  853. }
  854. }
  855. var liLen=document.getElementById(aimId).querySelectorAll("li").length;
  856. removeNodata(aimId);
  857. if($info.length == 0 && liLen == 0 ){
  858. $("#"+aimId).hide()
  859. insertNodata(aimId,newStr);
  860. }
  861. if(isbind){
  862. $("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
  863. paperListVal(false)
  864. })
  865. }
  866. if ($info.length < rows) {
  867. $("#"+aimId).parent().find(".js-load-more").unbind("click");
  868. $("#"+aimId).parent().find(".js-load-more").hide();
  869. }
  870. },function(){
  871. $("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
  872. $("#"+aimId).parent().find(".js-load-more").addClass("active");
  873. },function(){
  874. $("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
  875. $("#"+aimId).parent().find(".js-load-more").removeClass("active");
  876. })
  877. },
  878. answerListVal=function(isbind){//获取问答
  879. var aimId="proA",aimIdF="showAnswer",newStr="用户尚未任何回答"
  880. oAjax("/ajax/question/answer/bySelf",{
  881. "time":dataO.AnsTime,
  882. "id":dataO.AnsId,
  883. "uid":professorId,
  884. "rows":rows
  885. }, "get", function(res){
  886. var $info = res.data;
  887. if($info.length > 0) {
  888. $("#"+aimId).show()
  889. $("#"+aimIdF).parents(".form-item").removeClass("displayNone");
  890. $("#"+aimIdF).parents(".coninfobox").show();
  891. dataO.AnsTime = $info[$info.length - 1].createTime;
  892. dataO.AnsId = $info[$info.length - 1].id;
  893. for(var i = 0; i < $info.length; i++) {
  894. var listLi = $('<li>')
  895. listLi.appendTo($("#"+aimId));
  896. detailAnswer($info[i], listLi);
  897. if(isbind && i==0){
  898. var li = listLi.clone();
  899. $("#"+aimIdF).append(li);
  900. questioninfo($info[i].qid, li);
  901. proinfo($info[i].uid, li);
  902. leaveMsgCount($info[i].id,4, li);
  903. }
  904. }
  905. }
  906. var liLen=document.getElementById(aimId).querySelectorAll("li").length;
  907. removeNodata(aimId);
  908. if($info.length == 0 && liLen == 0 ){
  909. $("#"+aimId).hide()
  910. insertNodata(aimId,newStr);
  911. }
  912. if(isbind){
  913. $("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
  914. answerListVal(false)
  915. })
  916. }
  917. if ($info.length < rows) {
  918. $("#"+aimId).parent().find(".js-load-more").unbind("click");
  919. $("#"+aimId).parent().find(".js-load-more").hide();
  920. }
  921. },function(){
  922. $("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
  923. $("#"+aimId).parent().find(".js-load-more").addClass("active");
  924. },function(){
  925. $("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
  926. $("#"+aimId).parent().find(".js-load-more").removeClass("active");
  927. })
  928. },
  929. questionListVal=function(isbind) {
  930. var aimId="proQ",newStr="用户尚未发布任何问题"
  931. oAjax("/ajax/question/my",{
  932. "uid":professorId,
  933. "time":dataO.QuTime,
  934. "id":dataO.QuId,
  935. "rows":rows,
  936. }, "get", function(res){
  937. var $info = res.data;
  938. if($info.length > 0) {
  939. $("#"+aimId).show()
  940. dataO.QuTime = $info[$info.length - 1].createTime;
  941. dataO.QuId = $info[$info.length - 1].id;
  942. for(var i = 0; i < $info.length; i++) {
  943. var listLi = $('<li class="mui-table-view-cell">').appendTo($("#proQ"));
  944. detailQuestion($info[i], listLi);
  945. if(isbind && i==0){
  946. $("#"+aimId).html();
  947. }
  948. }
  949. }
  950. var liLen=document.getElementById(aimId).querySelectorAll("li").length;
  951. removeNodata(aimId);
  952. if($info.length == 0 && liLen == 0 ){
  953. $("#"+aimId).hide()
  954. insertNodata(aimId,newStr);
  955. }
  956. if(isbind){
  957. $("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
  958. questionListVal(false)
  959. })
  960. }
  961. if ($info.length < rows) {
  962. $("#"+aimId).parent().find(".js-load-more").unbind("click");
  963. $("#"+aimId).parent().find(".js-load-more").hide();
  964. }
  965. },function(){
  966. $("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
  967. $("#"+aimId).parent().find(".js-load-more").addClass("active");
  968. },function(){
  969. $("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
  970. $("#"+aimId).parent().find(".js-load-more").removeClass("active");
  971. })
  972. },
  973. relevantarticalList=function(){//相关文章信息
  974. oAjax("/ajax/article/byAssProfessor",{
  975. "id":professorId
  976. }, "get", function(data){
  977. if(data.data.length>0){
  978. $("#relateArt").parents(".conBlock").removeClass("displayNone");
  979. var itemlist = '';
  980. $("#relateArt").html("");
  981. for(var i = 0; i < data.data.length; i++) {
  982. var itemlist = '<li class="flexCenter"><a target="_blank" href="/'+ pageUrl('a',data.data[i]) +'" class="urlgo">';
  983. itemlist += '<p class="h2Font ellipsisSty-2"><em class="circlePre"></em>'+data.data[i].articleTitle+'</p>';
  984. itemlist += '</a></li>';
  985. $itemlist = $(itemlist);
  986. $("#relateArt").append($itemlist);
  987. }
  988. }
  989. });
  990. },
  991. likeExperts=function(){//感兴趣的企业
  992. oAjax("/ajax/professor/ralateProfessors",{
  993. "professorId":professorId
  994. }, "get", function(data){
  995. var lengthT;
  996. if(data.data.length>5){
  997. lengthT=5;
  998. }else{
  999. lengthT=data.data.length
  1000. }
  1001. for(var i = 0; i < lengthT; i++) {
  1002. var ExpId = data.data[i].id;
  1003. (function(Id){
  1004. oAjax("/ajax/professor/info/"+Id,{}, "get", function(data){
  1005. $("#likePro").parents(".conBlock").removeClass("displayNone");
  1006. var itemlist = '<li class="flexCenter"><a target="_blank" href="" class="urlgo">';
  1007. itemlist += '<div class="madiaHead useHead" id="userimg"></div>';
  1008. itemlist += '<div class="madiaInfo">';
  1009. itemlist += '<p><span class="h1Font" id="userName"></span><em class="authiconNew" title=""></em></p>';
  1010. itemlist += '<p class="ellipsisSty h2Font" id="usertitle"></p>';
  1011. itemlist += '</div></a></li>';
  1012. $itemlist = $(itemlist);
  1013. $("#likePro").append($itemlist);
  1014. if(data.data.title) {
  1015. if(data.data.orgName) {
  1016. $itemlist.find("#usertitle").text(data.data.title +","+ data.data.orgName);
  1017. }else{
  1018. $itemlist.find("#usertitle").text(data.data.title);
  1019. }
  1020. }else{
  1021. if(data.data.office) {
  1022. if(data.data.orgName) {
  1023. $itemlist.find("#usertitle").text(data.data.office +","+ data.data.orgName);
  1024. }else{
  1025. $itemlist.find("#usertitle").text(data.data.office);
  1026. }
  1027. }else{
  1028. if(data.data.orgName) {
  1029. $itemlist.find("#usertitle").text(data.data.orgName);
  1030. }
  1031. }
  1032. }
  1033. $itemlist.find("#userName").text(data.data.name);
  1034. $itemlist.find(".urlgo").attr("href", "userInforShow.html?professorId="+data.data.id);
  1035. if(data.data.hasHeadImage == 1) {
  1036. $itemlist.find("#userimg").attr("style", "background-image: url(/images/head/" + data.data.id + "_l.jpg);");
  1037. }
  1038. var userType = autho(data.data.authType, data.data.orgAuth, data.data.authStatus);
  1039. $itemlist.find(".authiconNew").attr("title", userType.title);
  1040. $itemlist.find(".authiconNew").addClass(userType.sty);
  1041. })
  1042. })(ExpId)
  1043. }
  1044. });
  1045. },
  1046. relevantExperts=function(){
  1047. oAjax("/ajax/professor/coadjutant",{
  1048. "id":professorId
  1049. }, "get", function(data){
  1050. var lengthT;
  1051. if(data.data.length>5){
  1052. lengthT=5;
  1053. }else{
  1054. lengthT=data.data.length
  1055. }
  1056. for(var i = 0; i < lengthT; i++) {
  1057. var ExpId = data.data[i].id;
  1058. (function(Id){
  1059. oAjax("/ajax/professor/info/"+Id,{}, "get", function(data){
  1060. $("#relatePro").parents(".conBlock").removeClass("displayNone");
  1061. var itemlist = '<a target="_blank" href="" class="urlgo">';
  1062. itemlist += '<div class="madiaHead useHead" id="userimg"></div>';
  1063. itemlist += '<div class="madiaInfo">';
  1064. itemlist += '<p><span class="h1Font" id="userName"></span><em class="authiconNew" title=""></em></p>';
  1065. itemlist += '<p class="ellipsisSty h2Font" id="usertitle"></p>';
  1066. itemlist += '<p class="h2Font ellipsisSty" id="copNum"></p>';
  1067. itemlist += '</div></a>';
  1068. $(itemlist).appendTo(liItem);
  1069. var $itemlist =liItem;
  1070. if(numL){
  1071. if(numZ){
  1072. $itemlist.find("#copNum").text("合作:"+numZ+"项专利,"+numL+"篇论文")
  1073. }else{
  1074. $itemlist.find("#copNum").text("合作:"+numL+"篇论文")
  1075. }
  1076. }else{
  1077. if(numZ){
  1078. $itemlist.find("#copNum").text("合作:"+numZ+"项专利")
  1079. }else{
  1080. }
  1081. }
  1082. if(data.data.title) {
  1083. if(data.data.orgName) {
  1084. $itemlist.find("#usertitle").text(data.data.title +","+ data.data.orgName);
  1085. }else{
  1086. $itemlist.find("#usertitle").text(data.data.title);
  1087. }
  1088. }else{
  1089. if(data.data.office) {
  1090. if(data.data.orgName) {
  1091. $itemlist.find("#usertitle").text(data.data.office +","+ data.data.orgName);
  1092. }else{
  1093. $itemlist.find("#usertitle").text(data.data.office);
  1094. }
  1095. }else{
  1096. if(data.data.orgName) {
  1097. $itemlist.find("#usertitle").text(data.data.orgName);
  1098. }
  1099. }
  1100. }
  1101. $itemlist.find("#userName").text(data.data.name);
  1102. $itemlist.find(".urlgo").attr("href", "userInforShow.html?professorId="+data.data.id);
  1103. if(data.data.hasHeadImage == 1) {
  1104. $itemlist.find("#userimg").attr("style", "background-image: url(/images/head/" + data.data.id + "_l.jpg);");
  1105. }
  1106. var userType = autho(data.data.authType, data.data.orgAuth, data.data.authStatus);
  1107. $itemlist.find(".authiconNew").attr("title", userType.title);
  1108. $itemlist.find(".authiconNew").addClass(userType.sty);
  1109. })
  1110. })(ExpId)
  1111. }
  1112. });
  1113. },
  1114. isActUser=function(){
  1115. oAjax("/ajax/baseUserInfo",{
  1116. "id": professorId
  1117. }, "get", function(data){
  1118. if(!data.data.activeTime){
  1119. $(".last_meg").removeClass("displayNone");
  1120. $(".message_b").on("click",function(){
  1121. $(".meg_md5").toggle();
  1122. if(data.data.email && data.data.mobilePhone){
  1123. $("#wayTel").text('尾号为 '+data.data.mobilePhone+' 的手机号或邮箱 '+data.data.email);
  1124. }else if(data.data.mobilePhone && !data.data.email){
  1125. $("#wayTel").text('尾号为 '+data.data.mobilePhone+' 的手机号');
  1126. }else if(data.data.email && !data.data.mobilePhone){
  1127. $("#wayTel").text('邮箱 '+data.data.email);
  1128. }
  1129. })
  1130. }else{
  1131. $(".last_meg").addClass("displayNone");
  1132. }
  1133. })
  1134. },
  1135. queryPubCount=function(){
  1136. oAjax("/ajax/watch/countProfessor",{//关注我的
  1137. "id": professorId,
  1138. "type":"1"
  1139. }, "GET", function(data){
  1140. $("#focusMe").text(data.data);
  1141. });
  1142. oAjax("/ajax/watch/countObject",{//我关注的
  1143. "id": professorId,
  1144. "type":"1"
  1145. }, "GET", function(data){
  1146. $("#myFocus").text(data.data);
  1147. });
  1148. oAjax("/ajax/professor/agree/sum",{//总获赞
  1149. "id": professorId,
  1150. }, "GET", function(data){
  1151. $("#agreeMecount").text(data.data);
  1152. });
  1153. oAjax("/ajax/article/count/publish",{//文章总数
  1154. "owner": professorId,
  1155. "category":"1"
  1156. }, "GET", function(data){
  1157. if(data.data>0 && data.data<99){
  1158. $("#artCount").text(data.data);
  1159. }
  1160. if(data.data>99){
  1161. $("#artCount").text("99+");
  1162. }
  1163. });
  1164. oAjax("/ajax/resource/count/publish",{//资源总数
  1165. "owner": professorId,
  1166. "category":"1"
  1167. }, "GET", function(data){
  1168. if(data.data>0 && data.data<99){
  1169. $("#resCount").text(data.data);
  1170. }
  1171. if(data.data>99){
  1172. $("#resCount").text("99+");
  1173. }
  1174. });
  1175. oAjax("/ajax/ware/count/publish",{//服务总数
  1176. "owner": professorId,
  1177. "category":"1"
  1178. }, "GET", function(data){
  1179. if(data.data>0 && data.data<99){
  1180. $("#serCount").text(data.data);
  1181. }
  1182. if(data.data>99){
  1183. $("#serCount").text("99+");
  1184. }
  1185. });
  1186. oAjax("/ajax/ppatent/count/publish",{//专利总数
  1187. "owner": professorId,
  1188. }, "GET", function(data){
  1189. if(data.data>0 && data.data<99){
  1190. $("#patCount").text(data.data);
  1191. }
  1192. if(data.data>99){
  1193. $("#patCount").text("99+");
  1194. }
  1195. });
  1196. oAjax("/ajax/ppaper/count/publish",{//论文总数
  1197. "owner": professorId,
  1198. }, "GET", function(data){
  1199. if(data.data>0 && data.data<99){
  1200. $("#parCount").text(data.data);
  1201. }
  1202. if(data.data>99){
  1203. $("#parCount").text("99+");
  1204. }
  1205. });
  1206. },
  1207. attentMyself=function(isbind){
  1208. var aimId="attendMy",newStr="用户尚未被任何人关注"
  1209. oAjax("/ajax/watch/watchList",{//关注我的列表
  1210. "watchObject": professorId,
  1211. "createTime": watchO.beiTime,
  1212. "professorId":watchO.beiProId,
  1213. "rows":rows
  1214. }, "GET", function(res){
  1215. console.log(res)
  1216. var $info = res.data;
  1217. if($info.length > 0) {
  1218. $("#"+aimId).show()
  1219. watchO.beiTime = $info[$info.length - 1].createTime;
  1220. watchO.beiProId = $info[$info.length - 1].professorId;
  1221. var arr=[];
  1222. for(var i in $info) {
  1223. arr[i]=$info[i].professorId;
  1224. }
  1225. detailPro(arr,aimId);
  1226. }
  1227. var liLen=document.getElementById(aimId).querySelectorAll("li").length;
  1228. removeNodata(aimId);
  1229. if($info.length == 0 && liLen == 0 ){
  1230. $("#"+aimId).hide()
  1231. insertNodata(aimId,newStr);
  1232. }
  1233. if(isbind){
  1234. $("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
  1235. attentMyself(false)
  1236. })
  1237. }
  1238. if ($info.length < rows) {
  1239. $("#"+aimId).parent().find(".js-load-more").unbind("click");
  1240. $("#"+aimId).parent().find(".js-load-more").hide();
  1241. }
  1242. },function(){
  1243. $("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
  1244. $("#"+aimId).parent().find(".js-load-more").addClass("active");
  1245. },function(){
  1246. $("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
  1247. $("#"+aimId).parent().find(".js-load-more").removeClass("active");
  1248. })
  1249. },
  1250. collectAnswer=function(isbind){
  1251. var aimId="attendAnswer",newStr="用户还未收藏任何回答"
  1252. oAjax("/ajax/question/answer/byWatch",{
  1253. "time":watchO.WATime,
  1254. "id":watchO.WAId,
  1255. "uid":professorId,
  1256. "rows":rows
  1257. }, "get", function(res){
  1258. var $info = res.data;
  1259. if($info.length > 0) {
  1260. $("#"+aimId).show()
  1261. watchO.WATime = $info[$info.length - 1].createTime;
  1262. watchO.WAId = $info[$info.length - 1].id;
  1263. for(var i = 0; i < $info.length; i++) {
  1264. var listLi = $('<li>')
  1265. listLi.appendTo($("#"+aimId));
  1266. detailAnswer($info[i], listLi);
  1267. }
  1268. }
  1269. var liLen=document.getElementById(aimId).querySelectorAll("li").length;
  1270. removeNodata(aimId);
  1271. if($info.length == 0 && liLen == 0 ){
  1272. $("#"+aimId).hide()
  1273. insertNodata(aimId,newStr);
  1274. }
  1275. if(isbind){
  1276. $("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
  1277. collectAnswer(false)
  1278. })
  1279. }
  1280. if ($info.length < rows) {
  1281. $("#"+aimId).parent().find(".js-load-more").unbind("click");
  1282. $("#"+aimId).parent().find(".js-load-more").hide();
  1283. }
  1284. },function(){
  1285. $("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
  1286. $("#"+aimId).parent().find(".js-load-more").addClass("active");
  1287. },function(){
  1288. $("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
  1289. $("#"+aimId).parent().find(".js-load-more").removeClass("active");
  1290. })
  1291. },
  1292. collectQuestion=function(isbind){
  1293. var aimId="attendQuestion",newStr="用户还未关注任何问题"
  1294. oAjax("/ajax/question/watch",{
  1295. "time":watchO.WQTime,
  1296. "id":watchO.WQId,
  1297. "uid":professorId,
  1298. "rows":rows
  1299. }, "get", function(res){
  1300. var $info = res.data;
  1301. if($info.length > 0) {
  1302. $("#"+aimId).show()
  1303. watchO.WQTime = $info[$info.length - 1].createTime;
  1304. watchO.WQId = $info[$info.length - 1].id;
  1305. for(var i = 0; i < $info.length; i++) {
  1306. var listLi = $('<li>')
  1307. listLi.appendTo($("#"+aimId));
  1308. detailQuestion($info[i], listLi);
  1309. }
  1310. }
  1311. var liLen=document.getElementById(aimId).querySelectorAll("li").length;
  1312. removeNodata(aimId);
  1313. if($info.length == 0 && liLen == 0 ){
  1314. $("#"+aimId).hide()
  1315. insertNodata(aimId,newStr);
  1316. }
  1317. if(isbind){
  1318. $("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
  1319. collectQuestion(false)
  1320. })
  1321. }
  1322. if ($info.length < rows) {
  1323. $("#"+aimId).parent().find(".js-load-more").unbind("click");
  1324. $("#"+aimId).parent().find(".js-load-more").hide();
  1325. }
  1326. },function(){
  1327. $("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
  1328. $("#"+aimId).parent().find(".js-load-more").addClass("active");
  1329. },function(){
  1330. $("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
  1331. $("#"+aimId).parent().find(".js-load-more").removeClass("active");
  1332. })
  1333. },
  1334. collectSorts=function(type,isbind){
  1335. var aimId="",newStr=""
  1336. oAjax("/ajax/watch/proList",{//我关注的列表
  1337. "professorId": professorId,
  1338. "watchType":type,
  1339. "createTime": watchO.watchTime,
  1340. "watchObject":watchO.watchObjId,
  1341. "rows":rows
  1342. }, "GET", function(res){
  1343. var $info = res.data;
  1344. var arr=[];
  1345. if($info.length > 0) {
  1346. $("#"+aimId).show()
  1347. watchO.watchTime = $info[$info.length - 1].createTime;
  1348. watchO.watchObjId = $info[$info.length - 1].watchObject;
  1349. for(var i in $info) {
  1350. arr[i]=$info[i].watchObject;
  1351. }
  1352. }
  1353. if(type==1){
  1354. aimId="attendPro"
  1355. newStr="用户还未关注任何专家"
  1356. detailPro(arr,aimId);
  1357. }else if(type==2){
  1358. aimId="attendRes"
  1359. newStr="用户还未收藏任何资源"
  1360. detailRes(arr,aimId);
  1361. }else if(type==3){
  1362. aimId="attendArt"
  1363. newStr="用户还未收藏任何文章"
  1364. detailArt(arr,aimId);
  1365. }else if(type==4){
  1366. aimId="attendPatent"
  1367. newStr="用户还未收藏任何专利"
  1368. detailPat(arr,aimId);
  1369. }else if(type==5){
  1370. aimId="attendPaper"
  1371. newStr="用户还未收藏任何论文"
  1372. detailPer(arr,aimId);
  1373. }else if(type==6){
  1374. aimId="attendCmp"
  1375. newStr="用户还未关注任何企业"
  1376. detailCmp(arr,aimId);
  1377. }else if(type==7){
  1378. aimId="attendDemand"
  1379. newStr="用户还未收藏任何需求"
  1380. detailDemand(arr,aimId);
  1381. }else if(type==10){
  1382. aimId="attendSer"
  1383. newStr="用户还未收藏任何服务"
  1384. detailService(arr,aimId);
  1385. }
  1386. var liLen=document.getElementById(aimId).querySelectorAll("li").length;
  1387. removeNodata(aimId);
  1388. if($info.length == 0 && liLen == 0 ){
  1389. $("#"+aimId).hide()
  1390. insertNodata(aimId,newStr);
  1391. }
  1392. if(isbind){
  1393. $("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
  1394. collectSorts(type,false)
  1395. })
  1396. }
  1397. if ($info.length < rows) {
  1398. $("#"+aimId).parent().find(".js-load-more").unbind("click");
  1399. $("#"+aimId).parent().find(".js-load-more").hide();
  1400. }
  1401. },function(){
  1402. $("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
  1403. $("#"+aimId).parent().find(".js-load-more").addClass("active");
  1404. },function(){
  1405. $("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
  1406. $("#"+aimId).parent().find(".js-load-more").removeClass("active");
  1407. })
  1408. },
  1409. detailPro=function(arr,obj) {
  1410. oAjax("/ajax/professor/qm",{
  1411. id:arr,
  1412. },"get",function(data){
  1413. var dataStr=data.data;
  1414. for(var i = 0; i < dataStr.length; i++) {
  1415. var li = document.createElement("li");
  1416. li.className = "mui-table-view-cell";
  1417. var userType = autho(dataStr[i].authType, dataStr[i].orgAuth, dataStr[i].authStatus);
  1418. var os = "";
  1419. if(dataStr[i].title) {
  1420. if(dataStr[i].orgName) {
  1421. os = dataStr[i].title + "," + dataStr[i].orgName;
  1422. } else {
  1423. os = dataStr[i].title;
  1424. }
  1425. } else {
  1426. if(dataStr[i].office) {
  1427. if(dataStr[i].orgName) {
  1428. os = dataStr[i].office + "," + dataStr[i].orgName;
  1429. } else {
  1430. os = dataStr[i].office;
  1431. }
  1432. } else {
  1433. if(dataStr[i].orgName) {
  1434. os = dataStr[i].orgName;
  1435. }
  1436. }
  1437. }
  1438. var baImg = "../images/default-photo.jpg";
  1439. if(dataStr[i].hasHeadImage == 1) {
  1440. baImg = "/images/head/" + dataStr[i].id + "_l.jpg";
  1441. }
  1442. var strAdd = '';
  1443. strAdd += '<a target="_blank" href="userInforShow.html?professorId='+ dataStr[i].id +'" class="flexCenter urlgo">';
  1444. strAdd += '<div class="madiaHead useHead" style="width: 80px;height: 80px;margin-top: -40px;background-image:url(' + baImg + ')"></div>';
  1445. strAdd += '<div class="madiaInfo" style="padding-left:92px"><p class="h1Font ellipsisSty">' + dataStr[i].name + '</span><em class="authicon ' + userType.sty + '" title="'+userType.title+'"></em></p>';
  1446. strAdd += '<p class="h2Font ellipsisSty">' + os + '</p>';
  1447. strAdd += '</div>';
  1448. strAdd += '</a>'
  1449. li.innerHTML = strAdd
  1450. document.getElementById(obj).appendChild(li);
  1451. }
  1452. });
  1453. },
  1454. detailCmp=function(arr,obj) {
  1455. oAjax("/ajax/org/qm",{
  1456. id:arr,
  1457. },"get",function(data){
  1458. var dataStr=data.data;
  1459. for(var i = 0; i < dataStr.length; i++) {
  1460. var li = document.createElement("li");
  1461. li.setAttribute("data-id", dataStr[i].id);
  1462. var oimg = (dataStr[i].hasOrgLogo) ?"/images/org/" + dataStr[i].id + ".jpg" : "../images/default-icon.jpg";
  1463. var oAuth = (dataStr[i].authStatus == 3) ? 'authicon-com-ok' : '';
  1464. var orgName = (dataStr[i].forShort) ? dataStr[i].forShort : dataStr[i].name;
  1465. var orgType = (dataStr[i].orgType == '2') ? "上市企业" : "";
  1466. var orgOther = (dataStr[i].industry) ? dataStr[i].industry.replace(/,/gi, " | ") : "";
  1467. li.className = "mui-table-view-cell";
  1468. var itemlist=''
  1469. itemlist += '<a class="flexCenter" target="_blank" href="cmpInforShow.html?orgId='+dataStr[i].id+'"><div class="madiaHead cmpHead">';
  1470. itemlist += '<div class="boxBlock"><img class="boxBlockimg" src="' + oimg + '"></div></div>';
  1471. itemlist += '<div class="madiaInfo">';
  1472. itemlist += '<p class="h1Font"><span>' + orgName + '</span><em class="authiconNew ' + oAuth + '" title="科袖认证企业"></em></p>';
  1473. itemlist += '<p class="h2Font ellipsisSty"><span>' + orgType + '</span> <span>' + orgOther + '</span></p>';
  1474. itemlist += '</div></a>';
  1475. li.innerHTML = itemlist
  1476. document.getElementById(obj).appendChild(li);
  1477. }
  1478. });
  1479. },
  1480. detailPat=function(arr,obj) {
  1481. oAjax("/ajax/ppatent/qm",{
  1482. id:arr,
  1483. },"get",function(data){
  1484. var dataStr=data.data;
  1485. for(var i = 0; i < dataStr.length; i++) {
  1486. var li = document.createElement("li");
  1487. li.className = "mui-table-view-cell";
  1488. var strAdd = '';
  1489. strAdd += '<a target="_blank" href="/'+ pageUrl("pt",dataStr[i]) +'" class="flexCenter urlgo">';
  1490. strAdd += '<div class="madiaHead patentHead"></div>';
  1491. strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty">'+ dataStr[i].name +'</p>';
  1492. strAdd += '<p class="h2Font ellipsisSty">发明人:'+ dataStr[i].authors.substring(0, dataStr[i].authors.length - 1) +'</p>';
  1493. strAdd += '<p class="h2Font ellipsisSty">申请人:'+ dataStr[i].reqPerson +'</p>';
  1494. strAdd += '</div>';
  1495. strAdd += '</a>';
  1496. li.innerHTML = strAdd
  1497. document.getElementById(obj).appendChild(li);
  1498. }
  1499. });
  1500. },
  1501. detailPer=function(arr,obj) {
  1502. oAjax("/ajax/ppaper/qm",{
  1503. id:arr,
  1504. },"get",function(data){
  1505. var dataStr=data.data;
  1506. for(var i = 0; i < dataStr.length; i++) {
  1507. var moreInf=""
  1508. if(!dataStr[i].cn4periodical){
  1509. dataStr[i].cn4periodical="";
  1510. }
  1511. if(!dataStr[i].en4periodical){
  1512. dataStr[i].en4periodical="";
  1513. }
  1514. if(!dataStr[i].pubDay){
  1515. dataStr[i].pubDay="";
  1516. }
  1517. moreInf = dataStr[i].cn4periodical+ " " +dataStr[i].en4periodical+ " " +dataStr[i].pubDay
  1518. var li = document.createElement("li");
  1519. li.className = "mui-table-view-cell";
  1520. var strAdd = '';
  1521. strAdd += '<a target="_blank" href="/'+ pageUrl("pp",dataStr[i]) +'" class="flexCenter urlgo">';
  1522. strAdd += '<div class="madiaHead paperHead"></div>';
  1523. strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty">'+ dataStr[i].name +'</p>';
  1524. strAdd += '<p class="h2Font ellipsisSty">作者:'+ dataStr[i].authors.substring(0, dataStr[i].authors.length - 1) +'</p>';
  1525. strAdd += '<p class="h2Font ellipsisSty">期刊:'+ moreInf +'</p>';
  1526. strAdd += '</div>';
  1527. strAdd += '</a>';
  1528. li.innerHTML = strAdd
  1529. document.getElementById(obj).appendChild(li);
  1530. }
  1531. });
  1532. },
  1533. detailRes=function(arr,obj) {
  1534. oAjax("/ajax/resource/qm",{
  1535. id:arr,
  1536. },"get",function(data){
  1537. console.log(data)
  1538. var dataItem=data.data;
  1539. for(var i = 0; i < dataItem.length; i++) {
  1540. var dataStr=dataItem[i]
  1541. var rImg = "../images/default-resource.jpg";
  1542. if(dataStr.images.length) {
  1543. rImg = "/data/resource/" + dataStr.images[0].imageSrc;
  1544. }
  1545. var li = document.createElement("li");
  1546. li.className = "mui-table-view-cell";
  1547. var strAdd = '';
  1548. strAdd += '<a target="_blank" href="resourceShow.html?resourceId='+ dataStr.resourceId +'" class="flexCenter urlgo">';
  1549. strAdd += '<div class="madiaHead resouseHead" style="background-image:url('+ rImg +')"></div>';
  1550. strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty">'+ dataStr.resourceName +'</p>';
  1551. strAdd += '<p class="h1Font ellipsisSty"><span class="ownerName"></span><em class="authiconNew ownerSty"></em></p>';
  1552. strAdd += '<p class="h2Font ellipsisSty-2">用途:'+ dataStr.supportedServices+'</p></div>';
  1553. strAdd += '</a>';
  1554. li.innerHTML =strAdd
  1555. var $itemlist = $(li);
  1556. document.getElementById(obj).appendChild(li);
  1557. if(dataStr.resourceType=="1"){
  1558. (function(mo){
  1559. cacheModel.getProfessor(dataStr.professorId,function(sc,value){
  1560. if(sc){
  1561. mo.find(".ownerName").html(value.name)
  1562. var userType = autho(value.authType, value.orgAuth, value.authStatus);
  1563. mo.find(".ownerSty").addClass(userType.sty).attr("title",userType.title)
  1564. }else{
  1565. console.log("error")
  1566. }
  1567. })
  1568. })($itemlist);
  1569. }else if(dataStr.resourceType=="2"){
  1570. (function(mo){
  1571. cacheModel.getCompany(dataStr.orgId,function(sc,value){
  1572. if(sc){
  1573. if(value.forShort){
  1574. mo.find(".ownerName").html(value.forShort)
  1575. }else{
  1576. mo.find(".ownerName").html(value.name)
  1577. }
  1578. if(value.authStatus==3) {
  1579. mo.find(".ownerSty").addClass("authicon-com-ok").attr("title","科袖认证企业")
  1580. }
  1581. }else{
  1582. console.log("error")
  1583. }
  1584. })
  1585. })($itemlist);
  1586. }
  1587. }
  1588. });
  1589. },
  1590. detailArt=function (arr,obj) {
  1591. oAjax("/ajax/article/qm",{
  1592. id:arr,
  1593. },"get",function(data){
  1594. var dataStr=data.data;
  1595. for(var i = 0; i < dataStr.length; i++) {
  1596. var dataItem=dataStr[i]
  1597. var arImg = "../images/default-artical.jpg";
  1598. if(dataItem.articleImg) {
  1599. arImg ="/data/article/" + dataItem.articleImg
  1600. }
  1601. var li = document.createElement("li");
  1602. li.className = "mui-table-view-cell";
  1603. var strAdd = '';
  1604. strAdd += '<a target="_blank" href="/'+ pageUrl('a',dataItem) +'" class="flexCenter urlgo">';
  1605. strAdd += '<div class="madiaHead artHead" style="background-image:url('+ arImg +')"></div>';
  1606. strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">'+ dataItem.articleTitle +'</p>';
  1607. strAdd += '<ul class="h2Font clearfix">';
  1608. strAdd += '<li><span class="ownerName"></span></li>';
  1609. strAdd += '<li><span class="time">'+ commenTime(dataItem.publishTime) +'</span></li>';
  1610. strAdd += '<li><span class="comment"></span></li>';
  1611. strAdd += '</ul></div>';
  1612. strAdd += '</a>';
  1613. li.innerHTML =strAdd
  1614. var $itemlist = $(li);
  1615. document.getElementById(obj).appendChild(li);
  1616. if(dataItem.articleType=="1"){
  1617. (function(mo){
  1618. cacheModel.getProfessor(dataItem.professorId,function(sc,value){
  1619. if(sc){
  1620. mo.find(".ownerName").html(value.name)
  1621. }else{
  1622. console.log("error")
  1623. }
  1624. })
  1625. })($itemlist);
  1626. }else if(dataItem.articleType=="2"){
  1627. (function(mo){
  1628. cacheModel.getCompany(dataItem.orgId,function(sc,value){
  1629. if(sc){
  1630. if(value.forShort){
  1631. mo.find(".ownerName").html(value.forShort)
  1632. }else{
  1633. mo.find(".ownerName").html(value.name)
  1634. }
  1635. }else{
  1636. console.log("error")
  1637. }
  1638. })
  1639. })($itemlist);
  1640. }
  1641. }
  1642. });
  1643. },
  1644. detailDemand=function(arr,obj) {
  1645. oAjax("/ajax/demand/qm",{
  1646. id:arr,
  1647. },"get",function(data){
  1648. var dataStr=data.data;
  1649. for(var i = 0; i < dataStr.length; i++) {
  1650. var li = document.createElement("li");
  1651. li.className = "mui-table-view-cell";
  1652. var strCon='<a target="_blank" href="demandShow.html?demandId='+ dataStr[i].id +'" class="flexCenter urlgo">';
  1653. strCon+='<div class="madiaInfo" style="padding-left:0">'
  1654. strCon+='<p class="h1Font ellipsisSty">'+ dataStr[i].title +'</p>'
  1655. strCon+='<ul class="showli clearfix h3Font">'
  1656. if(dataStr[i].city){ strCon+='<li>'+dataStr[i].city+'</li>' }
  1657. if(dataStr[i].duration!=0){ strCon+='<li>预期 '+demandDuration[dataStr[i].duration]+'</li>' }
  1658. if(dataStr[i].cost!=0){ strCon+='<li>预算 '+demandCost[dataStr[i].cost]+'</li>' }
  1659. if(dataStr[i].invalidDay){ strCon+='<li>有效期至 '+TimeTr(dataStr[i].invalidDay)+'</li>' }
  1660. strCon+='</ul></div></a>'
  1661. li.innerHTML = strCon
  1662. document.getElementById(obj).appendChild(li);
  1663. }
  1664. });
  1665. },
  1666. detailAnswer=function(dataStr,listLi){
  1667. var strAdd = '<a target="_blank" href="/qa-show.html?id='+dataStr.qid+'&topid='+dataStr.id+'">'+
  1668. '<div class="madiaInfo" style="padding-left: 0">' +
  1669. '<div class="ellipsisSty qa-question"></div>' +
  1670. '<div class="flexCenter qa-owner">' +
  1671. '</div>' +
  1672. '<div class="qa-con ellipsisSty-3">' + listConCut(dataStr.cnt) +'</div>' +
  1673. '<div class="showspan">' +
  1674. '<span>'+commenTime(dataStr.createTime)+'</span>' +
  1675. '<span class="agree"></span>' +
  1676. '<span class="leaveMsgCount"></span>' +
  1677. '</div>' +
  1678. '</div></a>';
  1679. var $strAdd = $(strAdd);
  1680. listLi.append( $strAdd);
  1681. if(dataStr.agree > 0) {
  1682. $strAdd.find(".agree").html("赞 "+dataStr.agree);
  1683. }
  1684. questioninfo(dataStr.qid, $strAdd);
  1685. proinfo(dataStr.uid, $strAdd);
  1686. leaveMsgCount(dataStr.id,4, $strAdd);
  1687. },
  1688. detailQuestion=function(dataStr,listLi) {
  1689. var baImg = "../images/default-q&a.jpg";
  1690. var subs = new Array();
  1691. if(dataStr.img) {
  1692. var subs=strToAry(dataStr.img)
  1693. baImg = "/data/question"+ subs[0];
  1694. }
  1695. var hd = "";
  1696. if (dataStr.replyCount > 0) {
  1697. hd = '<li><span>回答 ' + dataStr.replyCount + '</span></li>'
  1698. }
  1699. var strAdd = '<a target="_blank" href="/qa-show.html?id='+dataStr.id+'" class="flexCenter urlgo">'
  1700. strAdd += '<div class="madiaHead qa-Head" style="background-image:url('+ baImg +')"></div>';
  1701. strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">'+ dataStr.title +'</p>';
  1702. strAdd += '<ul class="h2Font clearfix">'
  1703. strAdd += '<li><span class="time">'+commenTime(dataStr.createTime)+'</span></li><li><span class="qaPageview"></span></li>'+hd+'<li><span class="attendCount"></span></li>'
  1704. strAdd += '</ul></div></a>'
  1705. var $str = $(strAdd);
  1706. listLi.append($str);
  1707. },
  1708. detailService=function(arr,obj) {
  1709. oAjax("/ajax/ware/qm",{
  1710. id:arr,
  1711. },"get",function(data){
  1712. console.log(data)
  1713. var dataItem=data.data;
  1714. for(var i = 0; i < dataItem.length; i++) {
  1715. var dataStr=dataItem[i]
  1716. var li = document.createElement("li");
  1717. li.className = "mui-table-view-cell";
  1718. var cnt="", rImg = "../images/default-service.jpg";
  1719. if(dataStr.images) {
  1720. var subs = strToAry(dataStr.images)
  1721. if(subs.length > 0) {
  1722. rImg="/data/ware" + subs[0]
  1723. }
  1724. }
  1725. if(dataStr.cnt){
  1726. cnt="内容:"+dataStr.cnt
  1727. }
  1728. var strAdd = '';
  1729. strAdd += '<a target="_blank" href="serviceShow.html?serviceId='+dataStr[i].id+'" class="flexCenter urlgo">';
  1730. strAdd += '<div class="madiaHead resouseHead" style="background-image:url('+ rImg +')"></div>';
  1731. strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty">'+ dataStr.name +'</p>';
  1732. strAdd += '<p class="h1Font ellipsisSty"><span class="ownerName"></span><em class="authiconNew ownerSty"></em></p>';
  1733. strAdd += '<p class="h2Font ellipsisSty-2">'+ cnt+'</p></div>';
  1734. strAdd += '</a>';
  1735. li.innerHTML = strAdd
  1736. var $itemlist = $(li);
  1737. document.getElementById(obj).appendChild(li);
  1738. if(dataStr.category=="1"){
  1739. (function(mo){
  1740. cacheModel.getProfessor(dataStr.owner,function(sc,value){
  1741. if(sc){
  1742. mo.find(".ownerName").html(value.name)
  1743. var userType = autho(value.authType, value.orgAuth, value.authStatus);
  1744. mo.find(".ownerSty").addClass(userType.sty).attr("title",userType.title)
  1745. }else{
  1746. console.log("error")
  1747. }
  1748. })
  1749. })($itemlist);
  1750. }else if(dataStr.category=="2"){
  1751. (function(mo){
  1752. cacheModel.getCompany(dataStr.owner,function(sc,value){
  1753. if(sc){
  1754. if(value.forShort){
  1755. mo.find(".ownerName").html(value.forShort)
  1756. }else{
  1757. mo.find(".ownerName").html(value.name)
  1758. }
  1759. if(value.authStatus==3) {
  1760. mo.find(".ownerSty").addClass("authicon-com-ok").attr("title","科袖认证企业")
  1761. }
  1762. }else{
  1763. console.log("error")
  1764. }
  1765. })
  1766. })($itemlist);
  1767. }
  1768. }
  1769. });
  1770. },
  1771. proinfo=function(pid, $str) {
  1772. oAjax("/ajax/professor/baseInfo/" + pid,{}, "get", function(data){
  1773. var dataStr = data.data
  1774. var baImg = "../images/default-photo.jpg";
  1775. if (dataStr.hasHeadImage == 1) {
  1776. baImg = "/images/head/" + dataStr.id + "_l.jpg";
  1777. }
  1778. var userType = autho(dataStr.authType, dataStr.orgAuth, dataStr.authStatus);
  1779. var os = "";
  1780. if (dataStr.title) {
  1781. if (dataStr.orgName) {
  1782. os = dataStr.title + "," + dataStr.orgName;
  1783. } else {
  1784. os = dataStr.title;
  1785. }
  1786. } else {
  1787. if (dataStr.office) {
  1788. if (dataStr.orgName) {
  1789. os = dataStr.office + "," + dataStr.orgName;
  1790. } else {
  1791. os = dataStr.office;
  1792. }
  1793. } else {
  1794. if (dataStr.orgName) {
  1795. os = dataStr.orgName;
  1796. }
  1797. }
  1798. }
  1799. var str = '<div class="owner-head useHead" style="background-image:url(' + baImg + ')"></div>' +
  1800. '<div class="owner-info">' +
  1801. '<div class="owner-name"><span class="h1Font">' + dataStr.name + '</span><em class="authiconNew ' + userType.sty + '" title="' + userType.title + '"></em></div>' +
  1802. '<div class="owner-tit mui-ellipsis h2Font">' + os + '</div>' +
  1803. '</div>'
  1804. $str.find(".qa-owner").html(str)
  1805. });
  1806. },
  1807. questioninfo=function(qid, $str) {
  1808. oAjax("/ajax/question/qo",{
  1809. id:qid
  1810. }, "get", function(data){
  1811. $str.find(".qa-question").html(data.data.title);
  1812. if(data.data.pageViews>0){
  1813. $str.find(".qaPageview").html("阅读量 "+data.data.pageViews);
  1814. }else{
  1815. $str.find(".qaPageview").hide()
  1816. }
  1817. });
  1818. },
  1819. attendCount=function(id, $str) {
  1820. oAjax("/ajax/watch/countProfessor",{
  1821. id:id,
  1822. type: "8"
  1823. }, "get", function(data){
  1824. if(data.data > 0) {
  1825. $str.find(".attendCount").html("关注 "+data.data);
  1826. }
  1827. });
  1828. },
  1829. bindClickFun=function(){
  1830. $("#myAttends").unbind("click").on("click",function(){//关注与收藏
  1831. openAttend()
  1832. })
  1833. $("#tab8user").unbind("click").on("click",function(){//点击更多
  1834. watchO={
  1835. beiTime:"",
  1836. beiProId:"",
  1837. watchTime:"",
  1838. watchObjId:"",
  1839. };
  1840. var pa=$(".moreNavUl.moreBuUl>li.liNow").attr("rel")
  1841. $("#"+pa).find("ul").html("")
  1842. $("#"+pa).find(".js-load-more").show();
  1843. if(userid!=professorId){
  1844. //关注他的人
  1845. $(".moreNavUl.moreBuUl>li.attentType").hide();
  1846. $(".moreNavUl.moreBuUl>li.attendMy").addClass("liNow").text("关注他的人");
  1847. $("#item8drop5").show().siblings().hide();
  1848. attentMyself(true);
  1849. }else{
  1850. $("#item8drop1").show().siblings().hide();
  1851. collectSorts(1,true);
  1852. }
  1853. collectSorts(3,true);
  1854. })
  1855. $("#tab6user").unbind("click").on("click",function(){//点击问答
  1856. dataO = {
  1857. AnsTime:"",
  1858. AnsId:"",
  1859. QuTime:"",
  1860. QuId:"",
  1861. };
  1862. var pa=$(".moreNavUl.wendaUl>li.liNow").attr("rel")
  1863. $("#"+pa).find("ul").html("")
  1864. $("#"+pa).find(".js-load-more").show();
  1865. if(userid!=professorId){
  1866. //他的回答
  1867. $(".moreNavUl.wendaUl>li").eq(0).hide().siblings().addClass("liNow").text("他的回答");
  1868. $("#item6drop2").show().siblings().hide();
  1869. answerListVal(true);
  1870. }else{
  1871. questionListVal(true);
  1872. }
  1873. })
  1874. $(".moreNavUl.wendaUl").on("click","li",function(){//问答tab切换
  1875. var pa=$(this).attr("rel")
  1876. $("#"+pa).find("ul").html("")
  1877. $("#"+pa).find(".js-load-more").show();
  1878. var sortN=$(this).attr("data-num");
  1879. dataO = {
  1880. AnsTime:"",
  1881. AnsId:"",
  1882. QuTime:"",
  1883. QuId:"",
  1884. };
  1885. if(sortN==1){
  1886. questionListVal(true);
  1887. }else if(sortN==2){
  1888. answerListVal(true);
  1889. }
  1890. })
  1891. $(".moreNavUl.moreBuUl").on("click","li.attentType:not(.rightbtn)",function(){//关注tab切换
  1892. var pa=$(this).attr("rel")
  1893. $("#"+pa).find("ul").html("")
  1894. $("#"+pa).find(".js-load-more").show();
  1895. var sortN=$(this).attr("data-num");
  1896. watchO={
  1897. watchTime:"",
  1898. watchObjId:"",
  1899. WATime:"",
  1900. WAId:"",
  1901. WQTime:"",
  1902. WQId:"",
  1903. };
  1904. if(sortN==8){
  1905. collectQuestion(true)
  1906. }else if(sortN==9){
  1907. collectAnswer(true)
  1908. }else{
  1909. collectSorts(sortN,true);
  1910. }
  1911. })
  1912. $("#tabAttendMy").unbind("click").on("click",function(){//关注我的人
  1913. var pa=$(this).attr("rel")
  1914. $("#"+pa).find("ul").html("")
  1915. $("#"+pa).find(".js-load-more").show();
  1916. watchO={
  1917. beiTime:"",
  1918. beiProId:"",
  1919. }
  1920. attentMyself(true);
  1921. })
  1922. $("#attendmyGo").unbind("click").on("click",function(){
  1923. if(userid!=professorId){
  1924. $(".moreNavUl.moreBuUl>li.attentType").hide();//关注他的人
  1925. $(".moreNavUl.moreBuUl>li.attendMy").addClass("liNow").text("关注他的人");
  1926. }
  1927. $(".mainNavUl li.rightbtn").addClass("liNow").siblings().removeClass("liNow");
  1928. $(".moreNav").hide()
  1929. $("#item8more").fadeIn();
  1930. $("#item8user").show().siblings().hide();
  1931. $(".moreBuUl li.attendMy").addClass("liNow").siblings().removeClass("liNow");
  1932. $("#item8drop5").show().siblings().hide();
  1933. watchO={
  1934. beiTime:"",
  1935. beiProId:"",
  1936. }
  1937. $("#item8drop5").find("ul").html("")
  1938. $("#item8drop5").find(".js-load-more").show();
  1939. attentMyself(true);
  1940. })
  1941. /*研究方向点赞*/
  1942. var clFlag = 1;
  1943. $("#researchAreaShow").on("click", ".plus", function() {
  1944. if(userid && userid != null && userid != "null") {
  1945. //点赞变化样式
  1946. if(clFlag) {
  1947. clFlag = 0;
  1948. } else {
  1949. return;
  1950. }
  1951. if($(this).data("isagree") > -1) {
  1952. $(this).stop(true, true).animate({
  1953. backgroundPositionY: 0
  1954. }, 300); //变成未点赞样式
  1955. } else {
  1956. $(this).stop(true, true).animate({
  1957. backgroundPositionY: -26
  1958. }, 300); //变成点赞样式
  1959. }
  1960. $.ajax({
  1961. "url": $(this).data("isagree") > -1 ? "/ajax/researchArea/unAgree" : "/ajax/researchArea/agree",
  1962. "type": "POST",
  1963. "data": {
  1964. "targetId": $(this).data("pid"),
  1965. "targetCaption": oArray[$(this).data("caption")],
  1966. "opId": userid,
  1967. "uname":$.cookie("userName")
  1968. },
  1969. "contentType": "application/x-www-form-urlencoded",
  1970. "success": function(dataStr) {
  1971. if(dataStr.success) {
  1972. $.get("/ajax/professor/info/" + professorId, function(dataStr) {
  1973. if(dataStr.success) {
  1974. clFlag = 1;
  1975. var $info = dataStr.data;
  1976. if($info) {
  1977. $("#researchAreaShow").empty("")
  1978. if($info.researchAreas) {
  1979. researchAreaShow($info.researchAreas, $info.editResearchAreaLogs);
  1980. }
  1981. }
  1982. }
  1983. })
  1984. } else {
  1985. $.MsgBox.Alert("提示", dataStr.msg);
  1986. }
  1987. }
  1988. });
  1989. } else {
  1990. quickLog();
  1991. operatTab();
  1992. closeLog();
  1993. }
  1994. })
  1995. //点击每个研究方向弹出研究方向详情窗口
  1996. $("#researchAreaShow").on("click", ".favorBox,.favorCount", function() {
  1997. var cap = $(this).attr("caption");
  1998. researchAlert(cap)
  1999. });
  2000. //关闭按钮
  2001. $("#workclose").click(function() {
  2002. $(".resAreaCover").fadeOut();
  2003. $("body").css("position", "");
  2004. });
  2005. //点击查看全部资源
  2006. $(".coninfobox").on("click","#seeMoreR",function(){
  2007. document.body.scrollTop = document.documentElement.scrollTop = 0;
  2008. $("#tab2user").addClass("liNow").siblings().removeClass("liNow");
  2009. $("#item1user").hide();
  2010. $("#item2user").show();
  2011. })
  2012. //点击查看全部服务
  2013. $(".coninfobox").on("click","#seeMoreS",function(){
  2014. document.body.scrollTop = document.documentElement.scrollTop = 0;
  2015. $("#tab9user").addClass("liNow").siblings().removeClass("liNow");
  2016. $("#item1user").hide();
  2017. $("#item9user").show();
  2018. })
  2019. //点击查看全部文章
  2020. $(".coninfobox").on("click","#seeMoreA",function(){
  2021. document.body.scrollTop = document.documentElement.scrollTop = 0;
  2022. $("#tab3user").addClass("liNow").siblings().removeClass("liNow");
  2023. $("#item1user").hide();
  2024. $("#item3user").show();
  2025. })
  2026. //点击查看全部专利
  2027. $(".coninfobox").on("click","#seeMoreP",function(){
  2028. document.body.scrollTop = document.documentElement.scrollTop = 0;
  2029. $("#tab4user").addClass("liNow").siblings().removeClass("liNow");
  2030. $("#item1user").hide();
  2031. $("#item4user").show();
  2032. })
  2033. //点击查看全部论文
  2034. $(".coninfobox").on("click","#seeMoreL",function(){
  2035. document.body.scrollTop = document.documentElement.scrollTop = 0;
  2036. $("#tab5user").addClass("liNow").siblings().removeClass("liNow");
  2037. $("#item1user").hide();
  2038. $("#item5user").show();
  2039. })
  2040. //点击查看全部问题
  2041. $(".coninfobox").on("click","#seeMoreQA",function(){
  2042. document.body.scrollTop = document.documentElement.scrollTop = 0;
  2043. $("#tab6user").addClass("liNow").siblings().removeClass("liNow");
  2044. $("#item1user").hide();
  2045. $("#item6user").show();
  2046. if(userid === professorId) {
  2047. $(".wendaNav").show();
  2048. }else{
  2049. $("#item6user .coninfobox").eq(0).addClass("displayNone").siblings().removeClass("displayNone");
  2050. }
  2051. })
  2052. //点击关注按钮
  2053. $("#attentBtn").on('click', function() {
  2054. if(userid && userid != null && userid != "null") {
  2055. if($(this).is('.attenedSpan')){
  2056. cancelCollectionAbout(orgId,$(this),6)
  2057. } else {
  2058. collectionAbout(orgId,$(this), 6);
  2059. }
  2060. guanzhuNum();
  2061. attentMy();
  2062. }else{
  2063. quickLog();
  2064. operatTab();
  2065. closeLog();
  2066. }
  2067. });
  2068. //点击联系按钮
  2069. $("#conbtn").on('click', function(){
  2070. if(userid && userid != null && userid != 'null' && userid != undefined && userid != 'undefined') {
  2071. location.href="tidings.html?id="+professorId
  2072. } else {
  2073. quickLog();
  2074. operatTab();
  2075. closeLog();
  2076. }
  2077. });
  2078. //纠错反馈
  2079. $(".correctSubmit").on("click",function(){
  2080. var cntCon=$(this).siblings(".correctCon").val();
  2081. var cntUser="";
  2082. if(userid && userid != null && userid != "null") {
  2083. cntUser = userid;
  2084. }
  2085. if(cntCon.length>500){
  2086. $.MsgBox.Alert('提示', '纠错反馈内容不得超过500个字');
  2087. return;
  2088. }else{
  2089. oAjax("/ajax/feedback/error/professor",{
  2090. "id": professorId,
  2091. "cnt":cntCon,
  2092. "user":cntUser
  2093. }, "POST", function(data){
  2094. backSuccessed();
  2095. });
  2096. }
  2097. })
  2098. }
  2099. if(GetQueryString("flag")) {
  2100. researchAlert(GetQueryString("flag"))
  2101. }
  2102. if(GetQueryString("iLike")){
  2103. openAttend();
  2104. }
  2105. if(userid!=professorId){
  2106. pageViewLog(professorId,1)
  2107. relevantExperts();//合作专家
  2108. relevantarticalList();//相关文章
  2109. likeExperts();//感兴趣专家
  2110. isActUser();//判断用户是否被激活
  2111. ifcollectionAbout(professorId,$(".goSpan").find(".attenSpan"), 1)
  2112. $(".goSpan").show();
  2113. }else{
  2114. $(".goSpanTo").show();
  2115. $(".myoneself").show();
  2116. }
  2117. queryPubCount();
  2118. getUserInfo(); //获取详细信息
  2119. demandListVal(true);
  2120. articalListVal(true);
  2121. resourceListVal(true);
  2122. serviceListVal(true);
  2123. patentListVal(true);
  2124. paperListVal(true);
  2125. bindClickFun();
  2126. })