portal html css js resource

resourceShow.js 19KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636
  1. $(document).ready(function() {
  2. loginStatus(); //判断个人是否登录
  3. var userid = $.cookie("userid");
  4. $(".jqzoom").imagezoom();
  5. $("#thumblist").on("click", "li a", function() {
  6. $(this).parents("li").addClass("tb-selected").siblings().removeClass("tb-selected");
  7. $(".jqzoom").attr('src', $(this).find("img").attr("src"));
  8. $(".jqzoom").attr('rel', $(this).find("img").attr("src"));
  9. });
  10. $('.shareWeixin').hover(function() {
  11. $('.shareCode').stop(true, false).fadeToggle();
  12. });
  13. var resourceId = GetQueryString("resourceId");
  14. ifCollection(resourceId, 2)
  15. var professorId = "";
  16. getRecourceMe();
  17. /*获取资源信息*/
  18. function getRecourceMe() {
  19. $.ajax({
  20. "url": "/ajax/resource/queryOne",
  21. "type": "GET",
  22. "success": function(data) {
  23. console.log(data);
  24. if(data.success) {
  25. resourceHtml(data.data);
  26. var resourceName = data.data.resourceName + "-科袖网";
  27. window.setTimeout(function() {
  28. document.title = resourceName;
  29. }, 500);
  30. }
  31. },
  32. "data": {
  33. "resourceId": resourceId
  34. },
  35. dataType: "json",
  36. 'error': function() {
  37. $.MsgBox.Alert('提示', '服务器连接超时!');
  38. }
  39. });
  40. }
  41. /*合作备注及性能参数存储换行格式*/
  42. function outHTML(selecter) {
  43. var getValue = selecter;
  44. var aa = "";
  45. if(getValue) {
  46. var endValue = ((getValue.replace(/<(.+?)>/gi, "&lt;$1&gt;")).replace(/ /gi, "&nbsp;")).replace(/\n/gi, "|");
  47. var cc = endValue.split("|");
  48. for(var i = 0; i < cc.length; i++) {
  49. aa += cc[i] + '<br/>'
  50. }
  51. }
  52. return aa;
  53. }
  54. /*处理资源html代码*/
  55. function resourceHtml($da) {
  56. $("#resourceName").text($da.resourceName); //名字
  57. $("#application").text($da.supportedServices); //应用用途
  58. if($da.editProfessor) {
  59. $("#person").show();
  60. if($da.orgName) { //所属机构
  61. $("#organizationName").text($da.orgName).parents("li").show();
  62. }
  63. $("#nameS").text($da.editProfessor.name);
  64. if($da.editProfessor.title) {
  65. $("#titleOffice").text($da.editProfessor.title);
  66. } else {
  67. if($da.editProfessor.office) {
  68. $("#titleOffice").text($da.editProfessor.office);
  69. }
  70. }
  71. if($da.editProfessor.orgName) {
  72. $("#orgType").text($da.editProfessor.orgName);
  73. }
  74. professorId = $da.editProfessor.id;
  75. console.log(professorId);
  76. console.log(userid);
  77. if(userid != professorId) {
  78. ifCollection(professorId, 1)
  79. $(".goSpan").show();
  80. }
  81. var professorFlag = autho($da.editProfessor.authType, $da.editProfessor.orgAuth, $da.editProfessor.authStatus);
  82. $("#authFlag").addClass(professorFlag.sty).attr("title", professorFlag.title);
  83. if($da.editProfessor.hasHeadImage == 1) {
  84. $("#headImg").css("background-image", 'url(/images/head/' + $da.editProfessor.id + '_l.jpg)');
  85. }
  86. }else{
  87. $("#enterprise,#resPerson").show();
  88. $(".qiyego").attr("href","userInforShow.html?orgId="+$da.organization.id);
  89. if($da.organization.hasOrgLogo) {
  90. $("#Qimg").attr("style", "background-image: url(/images/org/" + $da.organization.id + ".jpg);");
  91. }
  92. if($da.organization.authStatus==3){
  93. $("#QauthFlag").addClass("authicon-com-ok").attr("title", "认证企业");
  94. }
  95. $("#Qname").text($da.organization.name).attr("href","userInforShow.html?orgId="+$da.organization.id);
  96. $("#Qindustry").text($da.organization.subject);
  97. if($da.organization.orgType==2){
  98. $("#QorgType").text("上市企业");
  99. }else if($da.organization.orgType==3){
  100. $("#QorgType").text("国有企业");
  101. }else if($da.organization.orgType==4){
  102. $("#QorgType").text("合资企业");
  103. }else if($da.organization.orgType==5){
  104. $("#QorgType").text("私人企业");
  105. }else if($da.organization.orgType==6){
  106. $("#QorgType").text("外资企业");
  107. }else if($da.organization.orgType==7){
  108. $("#QorgType").text("初创企业");
  109. }else{
  110. $("#QorgType").text("");
  111. }
  112. }
  113. if($da.spec) { //厂商型号
  114. $("#modelNumber").text($da.spec).parents("li").show();
  115. }
  116. if($da.parameter) { //性能参数
  117. $("#performancePa").html(outHTML($da.parameter)).parents("li").show();
  118. }
  119. if($da.cooperationNotes) { //合作备注
  120. $("#remarkContent").html(outHTML($da.cooperationNotes)).parents("li").show();
  121. }
  122. if($da.subject) {
  123. var oSub = $da.subject.split(",");
  124. if($da.resourceType==1) {
  125. interestingResources(oSub,$da.professorId,0);
  126. }else{
  127. interestingResources(oSub,$da.orgId,1);
  128. }
  129. var oSt = "";
  130. for(var i = 0; i < oSub.length; i++) {
  131. oSt += '<li><p class="h2Font">' + oSub[i] + '</p></li>'
  132. }
  133. $(".tagList").html(oSt);
  134. } else {
  135. $(".aboutTit:contains('您可能感兴趣的资源')").parent().hide();
  136. }
  137. if($da.descp) { //编辑器
  138. $("#descp").html($da.descp).parents("li").show();
  139. }
  140. var weibotitle = $da.resourceName;
  141. var weibourl = window.location.href;
  142. //return;
  143. if($da.images.length) {
  144. var weibopic = "http://" + window.location.host + "/data/resource/" + $da.images[0].imageSrc;
  145. $("#firstFigure").attr({
  146. "src": "/data/resource/" + $da.images[0].imageSrc,
  147. "rel": "/data/resource/" + $da.images[0].imageSrc
  148. }).parent().attr("href", "/data/resource/" + $da.images[0].imageSrc);
  149. var arr = "";
  150. for(var i = 0; i < $da.images.length; i++) {
  151. if($da.images[i] == $da.images[0]) {
  152. var oString = '<li class="tb-selected">' +
  153. '<div class="tb-pic tb-s66">' +
  154. '<a href="javascript:void(0);">' +
  155. '<img src="/data/resource/' + $da.images[i].imageSrc + '"/>' +
  156. '</a>' +
  157. '</div>' +
  158. '</li>'
  159. } else {
  160. var oString = '<li >' +
  161. '<div class="tb-pic tb-s66">' +
  162. '<a href="javascript:void(0);">' +
  163. '<img src="/data/resource/' + $da.images[i].imageSrc + '"/>' +
  164. '</a>' +
  165. '</div>' +
  166. '</li>'
  167. }
  168. arr += oString;
  169. }
  170. $("#thumblist").html(arr);
  171. } else {
  172. var weibopic = "http://" + window.location.host + "../images/default-resource.jpg";
  173. $("#firstFigure").attr({
  174. "src": '../images/default-resource.jpg',
  175. "rel": '../images/default-resource.jpg'
  176. });
  177. }
  178. $("#weibo").attr("href", "http://service.weibo.com/share/share.php?appkey=3677230589&title=" + weibotitle + "&url=" + weibourl + "&pic=" + weibopic + "&ralateUid=6242830109&searchPic=false&style=simple");
  179. }
  180. /*点击名字及头像跳转个人浏览页面*/
  181. $("#nameS,#headImg").click(function() {
  182. location.href = "userInforShow.html?professorId=" + professorId;
  183. })
  184. //关键词标签点击进去搜索
  185. $(".tagList").on("click","li",function(){
  186. var tagText = $(this).find("p").text();
  187. location.href = "searchNew.html?searchContent=" + tagText + "&tagflag=2";
  188. })
  189. /*资源里面相关文章*/
  190. function relatedArticles() {
  191. $.ajax({
  192. "url": "/ajax/resource/articles",
  193. "type": "GET",
  194. "success": function(data) {
  195. console.log(data);
  196. if(data.success) {
  197. if(data.data.length == 0) {
  198. $("#oArticle").parent().hide();
  199. $(".aboutTit:contains('相关文章')").hide();
  200. return;
  201. }
  202. relatedArticlesHtml(data.data);
  203. }
  204. },
  205. "data": {
  206. "resourceId": resourceId,
  207. "rows": 5
  208. },
  209. dataType: "json",
  210. 'error': function() {
  211. $.MsgBox.Alert('提示', '服务器连接超时!');
  212. }
  213. });
  214. }
  215. relatedArticles();
  216. /*资源相关文章html*/
  217. function relatedArticlesHtml($html) {
  218. for(var i = 0; i < $html.length; i++) {
  219. (function(n) {
  220. var oURL;
  221. if($html[i].article.articleType==1) {
  222. oURL="/ajax/professor/baseInfo/" + $html[i].article.professorId;
  223. }else{
  224. oURL="/ajax/org/" + $html[i].article.orgId;
  225. }
  226. $.ajax({
  227. "url":oURL,
  228. "type": "GET",
  229. "success": function(data) {
  230. if(data.success) {
  231. if($html[n].article.articleType==1) {
  232. var stl = autho(data.data.authType, data.data.orgAuth, data.data.authStatus);
  233. }else {
  234. var stl={};
  235. stl.sty="";
  236. stl.title="";
  237. if(data.data.authStatus==3) {
  238. stl.sty="authicon-com-ok";
  239. stl.title="认证企业";
  240. }
  241. }
  242. var str = ""
  243. str += '<li data-id="' + $html[n].article.articleId + '">'
  244. if($html[n].article.articleImg) {
  245. str += '<div class="madiaHead artHead" style="background-image: url(/data/article/' + $html[n].article.articleImg + ')"></div>'
  246. } else {
  247. str += '<div class="madiaHead artHead"></div>'
  248. }
  249. str += '<div class="madiaInfo" style="margin-top:18px;padding-bottom:8px">'
  250. str += '<p class="h1Font ellipsisSty">' + $html[n].article.articleTitle + '</p>'
  251. str += '<p><span class="h2Font">' + data.data.name + '</span><em class="authiconNew ' + stl.sty + '" title="' + stl.title + '"></em></p>'
  252. str += '</div></li>'
  253. $("#oArticle").append(str);
  254. }
  255. },
  256. 'dataType': "json",
  257. 'error': function() {
  258. $.MsgBox.Alert('提示', '服务器连接超时!');
  259. }
  260. });
  261. })(i);
  262. }
  263. }
  264. /*文章跳转*/
  265. $("#oArticle").on("click", "li", function() {
  266. location.href = "articalShow.html?articleId=" + $(this).attr("data-id");
  267. })
  268. /*感兴趣的资源*/
  269. function interestingResources(arry,oId,oNu) {
  270. var oUrl;
  271. var $in={};
  272. $in.keys= arry;
  273. $in.resourceId= resourceId;
  274. if(oNu==0) {
  275. $in.professorId= oId;
  276. oUrl="/ajax/resource/ralateRes";
  277. }else {
  278. $in.orgId= oId;
  279. oUrl="/ajax/resource/orgRalateRes";
  280. }
  281. $.ajax({
  282. "url": oUrl,
  283. "type": "GET",
  284. "success": function(data) {
  285. console.log(data);
  286. if(data.success) {
  287. if(data.data.length == 0) {
  288. $(".aboutTit:contains('您可能感兴趣的资源')").parent().hide();
  289. return;
  290. }
  291. interestingResourcesHtml(data.data);
  292. }
  293. },
  294. "data":$in,
  295. "traditional": true,
  296. dataType: "json",
  297. 'error': function() {
  298. $.MsgBox.Alert('提示', '服务器连接超时!');
  299. }
  300. });
  301. }
  302. /*感兴趣资源的html*/
  303. function interestingResourcesHtml($respond) {
  304. for(var i = 0; i < $respond.length; i++) {
  305. if($respond[i].organization) {
  306. var stl={};
  307. stl.sty="";
  308. stl.title="";
  309. if($respond[i].organization.authStatus==3) {
  310. stl.sty="authicon-com-ok";
  311. stl.title="认证企业";
  312. }
  313. var name= $respond[i].organization.name;
  314. }else {
  315. var stl = autho($respond[i].editProfessor.authType, $respond[i].editProfessor.orgAuth, $respond[i].editProfessor.authStatus);
  316. var name= $respond[i].editProfessor.name;
  317. }
  318. var oStr = '';
  319. if($respond[i].images.length) {
  320. oStr += '<li data-id="' + $respond[i].resourceId + '"><div class="madiaHead resouseHead"style="background-image: url(/data/resource/' + $respond[i].images[0].imageSrc + ')"></div>'
  321. } else {
  322. oStr += '<li data-id="' + $respond[i].resourceId + '"><div class="madiaHead resouseHead"></div>'
  323. }
  324. oStr += '<div class="madiaInfo">'
  325. oStr += '<p class="h1Font">' + $respond[i].resourceName + '</p>'
  326. oStr += '<p class="h2Font ellipsisSty">用途:<span>' + $respond[i].supportedServices + '</span></p>'
  327. oStr += '<p><span class="h2Font">' + name + '</span><em class="authiconNew ' + stl.sty + '" title="' + stl.title + '"></em></p>'
  328. oStr += '</div></li>'
  329. $("#resourceList").append(oStr);
  330. }
  331. }
  332. /*点击资源列表*/
  333. $("#resourceList").on("click", "li", function() {
  334. location.href = "resourceShow.html?resourceId=" + $(this).attr("data-id");
  335. })
  336. /*点击咨询*/
  337. $("#consultin").on("click", function() {
  338. clickResouceConsultHandler();
  339. });
  340. $("#expertli").on("click", ".addbtn", function() {
  341. var $this = $(this);
  342. clickResouceConsultHandler($this);
  343. })
  344. /*咨询函数*/
  345. function clickResouceConsultHandler($this) {
  346. if(userid && userid != "null" && userid != null) {
  347. ConsultApply();
  348. if(!professorId) {
  349. concultProInfo($this.attr("data-id")); //专家信息common.js中
  350. } else {
  351. concultProInfo(professorId); //专家信息common.js中
  352. }
  353. //默认选中资源咨询和标题
  354. for(var i = 0; i < $("ul.menucon").children().length; i++) {
  355. $("ul.menucon").children().eq(i).removeClass("clicknow");
  356. $("ul.menucon").children().eq(1).addClass("clicknow");
  357. }
  358. var consultTitleVal = $("#resourceName").text();
  359. $("#consultTitle").val("关于" + consultTitleVal + "的咨询");
  360. //点击的发送
  361. $("#sendConsultBtn").click(function() {
  362. sendConsultHandler(professorId); //common.js中
  363. });
  364. } else {
  365. $.MsgBox.Alert("消息提醒", "请先登录再进行咨询");
  366. $("#mb_btn_ok").val("去登录");
  367. var aele = document.createElement('a');
  368. $("#mb_btnbox").append(aele);
  369. $("#mb_btnbox a").css({
  370. 'display': "block",
  371. 'width': '100%',
  372. 'height': '40px',
  373. 'position': 'absolute',
  374. 'bottom': '-6px',
  375. 'left': '0'
  376. });
  377. aele.setAttribute('href', '../login.html');
  378. }
  379. };
  380. //点击专家关注
  381. $('.attenSpan').click(function() {
  382. if(userid && userid != "null" && userid != null) {
  383. if($(this).is('.attenSpanyes')) {
  384. cancelCollectionExpert(professorId, 1)
  385. } else {
  386. collectionExpert(professorId, 1);
  387. }
  388. } else {
  389. $.MsgBox.Alert('提示', "请先登录再进行关注");
  390. $("#mb_btn_ok").val("去登录");
  391. var aele = document.createElement('a');
  392. $("#mb_btnbox").append(aele);
  393. $("#mb_btnbox a").css({
  394. 'display': "block",
  395. 'width': '100%',
  396. 'height': '40px',
  397. 'position': 'absolute',
  398. 'bottom': '-6px',
  399. 'left': '0'
  400. });
  401. aele.setAttribute('href', '../login.html');
  402. }
  403. })
  404. //点击资源收藏
  405. $('#attention em').click(function() {
  406. if(userid && userid != "null" && userid != null) {
  407. if($(this).is('.icon-collected')) {
  408. cancelCollectionExpert(resourceId, 2)
  409. } else {
  410. collectionExpert(resourceId, 2);
  411. }
  412. } else {
  413. $.MsgBox.Alert('提示', "请先登录再进行收藏");
  414. $("#mb_btn_ok").val("去登录");
  415. var aele = document.createElement('a');
  416. $("#mb_btnbox").append(aele);
  417. $("#mb_btnbox a").css({
  418. 'display': "block",
  419. 'width': '100%',
  420. 'height': '40px',
  421. 'position': 'absolute',
  422. 'bottom': '-6px',
  423. 'left': '0'
  424. });
  425. aele.setAttribute('href', '../login.html');
  426. }
  427. })
  428. /*判断是非关注专家*/
  429. function ifCollection(getid, num) {
  430. var data = {
  431. "professorId": userid,
  432. "watchObject": getid
  433. }
  434. //alert(JSON.stringify(data))
  435. $.ajax({
  436. url: "/ajax/watch/hasWatch",
  437. data: data,
  438. dataType: 'json', //数据格式类型
  439. type: 'get', //http请求类型
  440. timeout: 10000,
  441. async: true,
  442. success: function(data) {
  443. if(num == 1) {
  444. if(data.success && data.data != null) {
  445. $('.attenSpan').addClass("attenSpanyes");
  446. $('.attenSpan').addClass("attenedSpan");
  447. $('.attenSpan').text('已关注');
  448. zjreturnId = data.data.watchObject;
  449. } else {
  450. $('.attenSpan').removeClass("attenSpanyes");
  451. $('.attenSpan').removeClass("attenedSpan");
  452. $('.attenSpan').text('关注');
  453. }
  454. }
  455. if(num == 2) {
  456. if(data.success && data.data != null) {
  457. $('#attention em').addClass("icon-collected").removeClass("icon-collect");
  458. wzreturnId = data.data.watchObject;
  459. } else {
  460. $('#attention em').removeClass("icon-collected").addClass("icon-collect");
  461. }
  462. }
  463. },
  464. error: function() {
  465. $.MsgBox.Alert('提示', "服务器链接超时");
  466. }
  467. });
  468. }
  469. /*关注专家*/
  470. function collectionExpert(watchObject, num) {
  471. if(num == 1) {
  472. var data = {
  473. "professorId": userid,
  474. "watchObject": watchObject,
  475. "watchType": 1
  476. }
  477. } else {
  478. var data = {
  479. "professorId": userid,
  480. "watchObject": watchObject,
  481. "watchType": 2
  482. }
  483. }
  484. $.ajax({
  485. url: "/ajax/watch",
  486. data: data,
  487. dataType: 'json', //数据格式类型
  488. type: 'POST', //http请求类型
  489. timeout: 10000,
  490. async: false,
  491. success: function(data) {
  492. if(num == 1) {
  493. if(data.success) {
  494. $('.attenSpan').addClass("attenSpanyes");
  495. $('.attenSpan').addClass("attenedSpan");
  496. $('.attenSpan').text('已关注');
  497. zjreturnId = data.data.watchObject;
  498. }
  499. }
  500. if(num == 2) {
  501. if(data.success) {
  502. $('#attention em').addClass("icon-collected").removeClass("icon-collect");
  503. wzreturnId = data.data.watchObject;
  504. }
  505. }
  506. },
  507. error: function() {
  508. $.MsgBox.Alert('提示', "服务器链接超时");
  509. }
  510. });
  511. }
  512. /*取消收藏专家*/
  513. function cancelCollectionExpert(watchObject, num) {
  514. $.ajax({
  515. url: "/ajax/watch/delete",
  516. data: {
  517. professorId: userid,
  518. watchObject: watchObject
  519. },
  520. dataType: 'json', //数据格式类型
  521. type: 'post', //http请求类型
  522. timeout: 10000,
  523. async: true,
  524. success: function(data) {
  525. console.log(data.success)
  526. if(num == 1) {
  527. if(data.success) {
  528. $('.attenSpan').removeClass("attenSpanyes");
  529. $('.attenSpan').removeClass("attenedSpan");
  530. $('.attenSpan').text('关注');
  531. }
  532. }
  533. if(num == 2) {
  534. if(data.success) {
  535. $('#attention em').removeClass("icon-collected").addClass("icon-collect");
  536. }
  537. }
  538. },
  539. error: function(data) {
  540. $.MsgBox.Alert('提示', "服务器链接超时");
  541. }
  542. });
  543. }
  544. //资源浏览量
  545. function pageViewsVal() {
  546. $.ajax({
  547. "url": "/ajax/resource/pageViews",
  548. "type": "POST",
  549. "dataType": "json",
  550. "data": {
  551. "resourceId": resourceId
  552. },
  553. "success": function(data) {
  554. console.log(data);
  555. if(data.success) {}
  556. },
  557. "error": function() {
  558. $.MsgBox.Alert('提示', '链接服务器超时')
  559. }
  560. });
  561. }
  562. pageViewsVal();
  563. selUse();
  564. function selUse() {
  565. $.ajax({
  566. url: "/ajax/resource/qaLinkman",
  567. type: "GET",
  568. timeout: 10000,
  569. dataType: "json",
  570. async: true,
  571. data: {
  572. "resourceId": resourceId,
  573. },
  574. success: function(data, textState) {
  575. console.log(data)
  576. if(data.success) {
  577. unauthUser(data.data);
  578. }
  579. },
  580. error: function(XMLHttpRequest, textStats, errorThrown) {
  581. $.MsgBox.Alert('提示', '服务器请求失败')
  582. }
  583. })
  584. }
  585. function unauthUser($res) {
  586. var osting = ""
  587. for(var i = 0; i < $res.length; i++) {
  588. var img;
  589. var styC = "";
  590. var oClass = autho($res[i].professor.authType, $res[i].professor.orgAuth, $res[i].professor.authStatus);
  591. var oTitle = "";
  592. if($res[i].professor.title) {
  593. oTitle = $res[i].professor.title;
  594. } else {
  595. if($res[i].professor.office) {
  596. oTitle = $res[i].professor.office;
  597. }
  598. }
  599. if($res[i].professor.hasHeadImage) {
  600. img = "/images/head/" + $res[i].professor.id + "_l.jpg";
  601. } else {
  602. img = "../images/default-photo.jpg"
  603. }
  604. var oSt = '<li class="flexCenter">'
  605. oSt += '<div class="madiaHead useHead" id="userimg" style="background-image: url(' + img + ');"></div>'
  606. oSt += '<div class = "madiaInfo">'
  607. oSt += '<p class = "ellipsisSty">'
  608. oSt += '<span class = "h1Font" id="name">' + $res[i].professor.name + '</span><em class="authiconNew ' + oClass.sty + '" title="' + oClass.title + '"></em >'
  609. oSt += '</p>'
  610. oSt += '<p class="h2Font ellipsisSty">' + oTitle + '</p>'
  611. oSt += '</div>'
  612. oSt += '<span class="addbtn" data-id="' + $res[i].professor.id + '">咨询</span>'
  613. oSt += '</li>'
  614. osting += oSt;
  615. }
  616. $("#expertli").html(osting);
  617. }
  618. })