portal html css js resource

shareResinfor.html 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title></title>
  6. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  7. <link rel="stylesheet" href="css/reset.css" />
  8. <link rel="stylesheet" href="css/common.css" />
  9. </head>
  10. <style>
  11. html,
  12. body {
  13. background: #efeff4;
  14. }
  15. /*input输入相关*/
  16. .frmbox {
  17. width: 100%;
  18. margin: 2% auto;
  19. border-radius: 6px;
  20. }
  21. .frmtype {
  22. width: 100%;
  23. margin: auto;
  24. line-height: 30px;
  25. padding: 1% 2%;
  26. font-size: 14px;
  27. line-height: 20px;
  28. }
  29. .frmbtn {
  30. width: 100%;
  31. margin: 4% auto;
  32. font-size: 14px;
  33. line-height: 24px;
  34. padding: 1% 2%;
  35. border: 1px solid #FF9900;
  36. border-radius: 6px;
  37. color: #FF9900;
  38. }
  39. .frmbox {
  40. border: none;
  41. width: 90%;
  42. height: 100%;
  43. }
  44. .frmactive {
  45. color: #fff;
  46. background-color: #FF9900;
  47. border: 1px solid #FF9900;
  48. }
  49. .pull-right {
  50. float: right!important
  51. }
  52. .pull-left {
  53. float: left!important
  54. }
  55. .alignCenter {
  56. text-align: center;
  57. }
  58. /*圆角*/
  59. /*头像、资源圆角*/
  60. .headRadius {
  61. border-radius: 4px;
  62. }
  63. .blockGroup {
  64. background: #fff;
  65. }
  66. .mainbox {
  67. width: 96%;
  68. margin: 2% auto;
  69. }
  70. .maincon {
  71. padding: 4% 2%;
  72. overflow: hidden;
  73. }
  74. .listtit {
  75. font-size: 14px;
  76. color: #333333;
  77. }
  78. /*中标题*/
  79. .listtit2 {
  80. font-size: 13px;
  81. color: #666666;
  82. }
  83. /*较小标题*/
  84. .listtit3 {
  85. font-size: 12px;
  86. color: #888888;
  87. }
  88. /*小标题*/
  89. .mui-ellipsis {
  90. overflow: hidden;
  91. white-space: nowrap;
  92. text-overflow: ellipsis;
  93. }
  94. /*资源图片*/
  95. .ResImgBox {
  96. display: inline-block;
  97. text-align: center;
  98. max-width: 64px;
  99. width: 64px;
  100. height: 60px;
  101. padding: 1px;
  102. background: #FAFAFA;
  103. border: 1px solid #F8F8F8;
  104. overflow: hidden;
  105. padding: 2px;
  106. margin: 6px 0;
  107. border-radius: 4px;
  108. }
  109. .ResImgBox2 {
  110. margin: 6px 0 6px 10px;
  111. }
  112. .ResImgBox .resImg {
  113. max-width: 100%;
  114. max-height: 100%;
  115. vertical-align: middle;
  116. position: relative;
  117. }
  118. .ResImgBox:before {
  119. content: ' ';
  120. display: inline-block;
  121. vertical-align: middle;
  122. width: 0;
  123. height: 100%;
  124. overflow: hidden;
  125. margin-left: -5px;
  126. }
  127. /*专家相关信息*/
  128. .personinfo .listtit3 {
  129. font-size: 14px;
  130. line-height: 24px;
  131. color: #AAAAAA;
  132. margin: 0;
  133. }
  134. .personinfo .listtit {
  135. font-size: 18px;
  136. line-height: 30px;
  137. color: #333333;
  138. }
  139. .personinfo .listtit3 {
  140. font-size: 14px;
  141. line-height: 24px;
  142. color: #AAAAAA;
  143. margin: 0;
  144. }
  145. .headbox .headimg {
  146. width: 100px;
  147. overflow: hidden;
  148. margin: auto;
  149. }
  150. /*咨询记录及等级*/
  151. .peolevelbox {
  152. display: block;
  153. padding: 4% 16px;
  154. border-top: 1px #F0F0F0 solid;
  155. }
  156. .peocountbox {
  157. width: 150px;
  158. }
  159. .peocount {
  160. font-size: 13px;
  161. color: #888888;
  162. overflow: hidden;
  163. }
  164. .peocount span em {
  165. font-size: 14px;
  166. padding: 0 3px;
  167. color: #FF9900;
  168. font-weight: 600;
  169. }
  170. .peocount .dialogicon {
  171. display: block;
  172. width: 20px;
  173. height: 20px;
  174. background: url(images/dialogue.png) center center no-repeat;
  175. background-size: 100% 100%;
  176. margin-right: 6px;
  177. }
  178. .peocount:before {
  179. position: absolute;
  180. right: 0;
  181. top: 0;
  182. left: 15px;
  183. height: 1px;
  184. content: '';
  185. -webkit-transform: scaleY(.5);
  186. transform: scaleY(.5);
  187. background-color: #c8c7cc;
  188. }
  189. .levelbox {
  190. margin: auto;
  191. overflow: hidden;
  192. }
  193. .levelbox .iconfont {
  194. float: left;
  195. margin: 2px;
  196. width: 14px;
  197. height: 14px;
  198. }
  199. .levelbox .icon-favor {
  200. background: url(images/favoricon.png) 0 0 no-repeat;
  201. background-size: 100% auto;
  202. }
  203. .levelbox .icon-favorfill {
  204. background: url(images/favoricon.png) 0 -14px no-repeat;
  205. background-size: 100% auto;
  206. }
  207. .infocontit {
  208. font-size: 14px;
  209. position: relative;
  210. }
  211. .infocon {
  212. padding: 6px 10px;
  213. /*text-align: justify;*/
  214. font-size: 13px;
  215. line-height: 27px;
  216. color: #888888;
  217. }
  218. .infocon ul {
  219. padding: 0;
  220. margin: 0;
  221. overflow: hidden;
  222. }
  223. .infocon .infoapply li {
  224. padding-left: 6px;
  225. padding-right: 2px;
  226. list-style: disc inside;
  227. width: 46%;
  228. float: left;
  229. }
  230. .infocon .infosubject li {
  231. list-style: none;
  232. padding: 2px 16px;
  233. margin: 4px;
  234. border: 1px solid #BBBBBB;
  235. border-radius: 6px;
  236. float: left;
  237. }
  238. .listitembox {
  239. position: static;
  240. width: 100%;
  241. }
  242. .listitembox .listitem {
  243. padding: 4px;
  244. padding-right: 0;
  245. }
  246. .listitembox .listitem .media-body {
  247. width: 73%;
  248. margin-left: 2%;
  249. }
  250. .listitembox .listitem .media-body .resbrief {
  251. width: 100%;
  252. }
  253. .listitembox .listitem .media-object {
  254. width: 30%;
  255. }
  256. .listitembox .listitem .media-object .iconposition {
  257. border-radius: 50%;
  258. max-width: 60px;
  259. height: 60px;
  260. margin: 1% 0;
  261. }
  262. .listitembox .listitem>a .mutlinebox {
  263. white-space: normal;
  264. overflow: auto;
  265. word-break: break-word;
  266. }
  267. .listbox {
  268. margin: 5px 0;
  269. max-width: 100%;
  270. overflow: hidden;
  271. }
  272. .listbrowse {
  273. border: 1px solid #FF9900;
  274. border-radius: 0 6px 6px 0;
  275. text-align: center;
  276. font-size: 13px;
  277. line-height: 27px;
  278. float: left;
  279. padding-right: 8px;
  280. max-width: 60%;
  281. overflow: hidden;
  282. }
  283. .plusbtn {
  284. font-size: 20px;
  285. line-height: 22px;
  286. color: #999999;
  287. margin-left: 4px;
  288. margin-top: 2px;
  289. }
  290. .plusbtn.icon-appreciatefill {
  291. color: #FF9900;
  292. }
  293. .like {
  294. display: block;
  295. float: left;
  296. width: 28px;
  297. font-size: 12px;
  298. background: #FF9900;
  299. color: #fff;
  300. line-height: 27px;
  301. margin-right: 5px;
  302. }
  303. .likenum {
  304. float: right;
  305. max-width: 130px;
  306. overflow: hidden;
  307. }
  308. .likenum .mui-icon {
  309. font-size: 24px;
  310. color: #CCCCCC;
  311. }
  312. .likepeople {
  313. width: 26px;
  314. height: 26px;
  315. line-height: 20px;
  316. float: left;
  317. overflow: hidden;
  318. margin-right: 5px;
  319. }
  320. .likepeople img {
  321. width: 100%;
  322. height: 100%;
  323. }
  324. .likemore {
  325. display: block;
  326. width: 25px;
  327. height: 25px;
  328. border: 1px solid #CCCCCC;
  329. background: url(images/likemore.png) center center no-repeat;
  330. }
  331. .personblock{ margin-left: 2%;}
  332. </style>
  333. <body>
  334. <div class="contentBody2">
  335. <div class="blockGroup mainbox">
  336. <div class="maincon">
  337. <div class="ResImgBox resouimgbox pull-left" style="height:180px;width:180px;max-width:180px;margin:0 6px 0 8px;">
  338. <img class="resImg headRadius" src="images/default-resource.jpg" id="ziyuanimg" data-preview-src data-preview-group="1" />
  339. </div>
  340. <div class="personblock pull-left" id="fess">
  341. <img class="headRadius" style="width: 60px;" src="images/default-photo.jpg" id="proimg">
  342. <p class="listtit" id="proname"><em class="authicon authicon-cu" style="font-size:16px;" id="promodify"></em></p>
  343. <p class="listtit2"><span id="protitle"></span><span id="prooffice"></span></p>
  344. <p class="listtit3"><span id="proorgName"></span></p>
  345. <p class="listtit3"><span id="proadress"></span></p>
  346. </div>
  347. </div>
  348. </div>
  349. <div class="blockGroup mainbox">
  350. <div class="maincon">
  351. <ul class="resouinfobox">
  352. <li>
  353. <div class="infocontit">基本信息</div>
  354. </li>
  355. <li>
  356. <div class="infocon">
  357. <p style="color:#666666;">
  358. <span>资源名称:</span>
  359. <span class="listtit2" id='resourceName'></span>
  360. </p>
  361. <p style="color:#666666;">
  362. <span>应用用途:</span>
  363. <span class="listtit2" id="yongtu"></span>
  364. </p>
  365. </div>
  366. </li>
  367. </ul>
  368. </div>
  369. </div>
  370. <div class="blockGroup mainbox" id="fielddiv">
  371. <div class="maincon">
  372. <div class="infocontit">学术领域</div>
  373. <div class="infocon">
  374. <ul class="infosubject" id="field">
  375. </ul>
  376. </div>
  377. </div>
  378. </div>
  379. <div class="blockGroup mainbox" id="applydiv">
  380. <div class="maincon">
  381. <div class="infocontit">应用行业</div>
  382. <div class="infocon">
  383. <ul id="apply">
  384. </ul>
  385. </div>
  386. </div>
  387. </div>
  388. <div class="blockGroup mainbox" id="hezuodiv">
  389. <div class="maincon">
  390. <ul class="resouinfobox">
  391. <li>
  392. <div class="infocontit">合作备注</div>
  393. <div class="infocon">
  394. <p class="listtit3" id="hezuo"></p>
  395. </div>
  396. </li>
  397. </ul>
  398. </div>
  399. </div>
  400. <div class="blockGroup mainbox" id="detaildiv">
  401. <div class="maincon">
  402. <ul class="resouinfobox">
  403. <li>
  404. <div class="infocontit">详细描述</div>
  405. <div class="infocon">
  406. <p class="listtit3" id="detail">
  407. 二维码123456789二维码、语音输入、摇一摇摄像头、文件系统、摇一摇摄像头、文件系统、微信分享……不够?Native.JS
  408. </p>
  409. </div>
  410. </li>
  411. </ul>
  412. </div>
  413. </div>
  414. <div class="blockGroup mainbox" style="padding-bottom:40px;">
  415. <div class="maincon alignCenter">
  416. <p style="margin-top: 30px;"><span style="color:#ff9900; font-size: 16px;line-height: 32px;">[ 科袖 ]</span><br />搭建企业与专家的桥梁</p>
  417. <div class="frmbox" style="margin:20px auto;">
  418. <a href="http://www.ekexiu.com/download/com.ekexiu.app_V1.1.1.apk"><button class="frmbtn frmactive">下载安卓客户端</button></a>
  419. </div>
  420. <div>
  421. <img style="width:120px;" src="images/weixin_code.jpg" />
  422. <p style="color:#CCCCCC;font-size:13px;">关注科袖公众号</p>
  423. </div>
  424. </div>
  425. </div>
  426. </div>
  427. <script type="text/javascript" src="js/jquery-1.11.1.js"></script>
  428. <script>
  429. $(document).ready(function() {
  430. var resourceId='73FAD17209F7477C8D8537E5F98ADAAA';
  431. var oproname = document.getElementById("proname"); //专家名称
  432. var oprotitle = document.getElementById("protitle"); //专家职称
  433. var oprooffice = document.getElementById("prooffice"); //专家职务
  434. var oproorgName = document.getElementById("proorgName"); //专家所属机构
  435. var oproadress = document.getElementById("proadress"); //专家所在地
  436. var opromodify = document.getElementById("promodify"); //专家认证
  437. var oproimg = document.getElementById("proimg"); //专家头像
  438. var oresourceName = document.getElementById("resourceName"); //资源名称
  439. var oyongtu = document.getElementById("yongtu"); //应用用途
  440. var oziyuanimg = document.getElementById("ziyuanimg"); //资源图片
  441. var ofield = document.getElementById("field"); //学术领域
  442. var oapply = document.getElementById("apply"); //应用行业
  443. var odetail = document.getElementById("detail"); //详细描述
  444. var ohezuo = document.getElementById("hezuo"); //合作备注
  445. var oEnter = document.getElementById("fess");
  446. var ofielddiv = document.getElementById("fielddiv"); //学术领域容器
  447. var oapplydiv = document.getElementById("applydiv"); //应用行业容器
  448. var odetaildiv = document.getElementById("detaildiv"); //详细描述容器
  449. var ohezuodiv = document.getElementById("hezuodiv"); //合作备注容器
  450. function GetQueryString(name) {
  451. var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
  452. var r = window.location.search.substr(1).match(reg);
  453. var context = "";
  454. if(r != null)
  455. context = r[2];
  456. reg = null;
  457. r = null;
  458. return context == null || context == "" || context == "undefined" ? "" : decodeURI(context);
  459. }
  460. function ziyuaninfo(resourceId) {
  461. $.ajax({
  462. url:'/ajax/resource/resourceInfo',
  463. data: {
  464. 'resourceId': resourceId
  465. },
  466. dataType: 'json', //服务器返回json格式数据
  467. type: 'get', //HTTP请求类型
  468. timeout: 10000, //超时时间设置为10秒;
  469. success: function(data) {
  470. if(data.success) {
  471. console.log(JSON.stringify(data));
  472. var mydata = data.data;
  473. //资源名称
  474. professorId = mydata['professor']['id'];
  475. var userid = GetQueryString('userid');
  476. if(professorId==userid){
  477. document.getElementsByClassName("footbox")[0].style.display="none";
  478. }
  479. (mydata['resourceName']) ? oresourceName.innerHTML = mydata['resourceName']: oresourceName.innerHTML = '';
  480. //专家信息
  481. proId = mydata['professor']['id']; //专家id
  482. //专家名字
  483. (mydata['professor']["name"]) ? oproname.innerText = mydata['professor']["name"]: oproname.innerText = '';
  484. //职称
  485. (mydata['professor']["title"]) ? oprotitle.innerHTML = mydata['professor']["title"]: oprotitle.innerHTML = '';
  486. //职位
  487. if(mydata['professor']["office"] == null || mydata['professor']["office"] == undefined) {
  488. oprooffice.innerHTML = '';
  489. } else {
  490. if(mydata['professor']["title"]) {
  491. oprooffice.innerHTML = ',' + mydata['professor']["office"]; //职位
  492. }
  493. oprooffice.innerHTML = mydata['professor']["office"]; //职位
  494. };
  495. //所在机构
  496. (mydata['professor']["orgName"]) ? oproorgName.innerHTML = mydata['professor']["orgName"]: oproorgName.innerHTML = '';
  497. //所在地
  498. (mydata['professor']["address"]) ? oproadress.innerHTML = mydata['professor']["address"]: oproadress.innerHTML = '';
  499. /*是否认证*/
  500. (mydata['professor']["authentication"] == true) ? opromodify.classList.add('authicon'): opromodify.classList.add('unauthicon');
  501. /*专家头像*/
  502. (mydata['professor']["hasHeadImage"] == 0) ? oproimg.setAttribute('src', '/images/default-photo.jpg'): oproimg.setAttribute('src', '/images/head/' + mydata['professor']['id'] + '_m.jpg');
  503. //资源基本信息
  504. //(mydata['images']['imageSrc']) ? oziyuanimg.setAttribute('src', mydata['images']['imageSrc']): oziyuanimg.setAttribute('src', '../images/default-resource.jpg'); //资源图片
  505. var imgRes = "/images/resource/" + mydata.resourceId + ".jpg";
  506. if(mydata['images'].length) {
  507. oziyuanimg.setAttribute('src', imgRes)
  508. } else {
  509. oziyuanimg.setAttribute('src', '../images/default-resource.jpg')
  510. }
  511. (mydata['supportedServices']) ? oyongtu.innerHTML = mydata['supportedServices']: oyongtu.innerHTML = ''; //应用用途
  512. //学术领域
  513. if(mydata['subject']) {
  514. if(mydata['subject'].indexOf(',') != -1) { //字符串是否包含,
  515. var fieldlist = mydata['subject'].split(",");
  516. console.log(fieldlist.length);
  517. for(var i = 0; i < fieldlist; i++) {
  518. var oli = document.createElement('li');
  519. oli.innerText = fieldlist[i];
  520. ofield.appendChild(oli);
  521. }
  522. } else {
  523. var oli = document.createElement('li');
  524. oli.innerText = mydata['subject'];
  525. ofield.appendChild(oli);
  526. }
  527. } else {
  528. ofielddiv.style.display = 'none';
  529. }
  530. //应用行业
  531. if(mydata['industry']) {
  532. if(mydata['industry'].indexOf(',') != -1) { //字符串是否包含,
  533. var applylist = mydata['industry'].split(",");
  534. console.log(applylist.length);
  535. for(var i = 0; i < applylist; i++) {
  536. var oli = document.createElement('li');
  537. oli.innerText = fieldlist[i];
  538. oapply.appendChild(oli);
  539. }
  540. } else {
  541. var oli = document.createElement('li');
  542. oli.innerText = mydata['industry'];
  543. oapply.appendChild(oli);
  544. }
  545. } else {
  546. oapplydiv.style.display = 'none';
  547. }
  548. //详细描述
  549. if(mydata['descp']) {
  550. odetail.innerHTML = mydata['descp']
  551. } else {
  552. odetaildiv.style.display = 'none';
  553. }
  554. //合作备注
  555. if(mydata['cooperationNotes']) {
  556. ohezuo.innerHTML = mydata['cooperationNotes'];
  557. } else {
  558. ohezuodiv.style.display = 'none';
  559. }
  560. }
  561. },
  562. error: function(e) {
  563. return;
  564. }
  565. });
  566. }
  567. //资源信息
  568. ziyuaninfo(resourceId);
  569. });
  570. </script>
  571. </body>
  572. </html>