portal html css js resource

userInforShow.js 79KB

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