123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title></title>
- <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
- <link rel="stylesheet" href="../css/reset.css" />
- <link rel="stylesheet" href="../css/common.css" />
- <link rel="stylesheet" href="../css/index.css" />
- <link rel="stylesheet" href="../css/share.css" />
- <style>
- html,
- body {
- background: #ffffff;
- }
-
- .proinfor .headblock {
- margin: 0 2% 4px 0;
- }
-
- .proinfor .headblock .headimg {
- max-width: 64px;
- width: 64px;
- overflow: hidden;
- margin: auto;
- }
-
- .proinfor .media-body {
- width: 76%;
- }
-
- .listtit {
- font-size: 15px;
- line-height: 26px;
- color: #333333;
- }
-
- .listtit2 {
- font-size: 13px;
- line-height: 20px;
- color: #666666;
- }
-
- .listtit3 {
- font-size: 12px;
- line-height: 18px;
- color: #888888;
- }
-
- @media only screen and (min-width: 100px) and (max-width: 350px) {
- .proinfor .media-body {
- width: 70%;
- }
- }
- </style>
- </head>
- <body>
- <div style="display:none">
- <img id="hiddenImg" src="http://www.ekexiu.com/images/logo180.png" width="100%" />
- </div>
- <div class="contentBody2">
- <div class="art_topicBox">
- <div class="art_img" id="articleImg"></div>
- <div class="art_tbox">
- <h4 id="artical_topic"></h4>
- </div>
- </div>
- <div class="articalBox">
- <ul id="proInfor">
- <li style="padding:8px 20px 8px 10px;">
- <a class="proinfor clearfix">
- <div class="headblock floatL"><img id="proHead" class="headimg userRadius" src="../images/default-photo.jpg"></div>
- <div class="media-body floatL">
- <span class="listtit"><span id="proName"></span><em class="authiconNew authicon-pro" title="科袖认证专家"></em></span>
- <div class="listtit2" id="oMess"></div>
- <div class="mui-ellipsis listtit3" id="proRlist"></div>
- <div class="mui-ellipsis listtit3" id="proZlist"></div>
- </div>
- </a>
- </li>
- </ul>
- <div class="line01" style="margin:4px 0 10px 0;"></div>
- <div id="artical_real">
-
- <div id="main_content">
- </div>
-
- </div>
- <div class="blockGroup mainbox" style="padding-bottom:40px;">
- <div class="maincon alignCenter">
- <div style="margin-top: 30px;"><span style="color:#ff9900; font-size: 16px;line-height: 32px;">「 科袖 」</span><br />搭建企业与专家的桥梁</div>
- <div class="frmbox" style="margin:20px auto;">
- <a href="http://a.app.qq.com/o/simple.jsp?pkgname=com.ekexiu.app"><button class="frmbtn frmactive">下载移动客户端</button></a>
- </div>
- <div>
- <img style="width:120px;" src="../images/weixin_code.jpg" />
- <div style="color:#CCCCCC;font-size:13px;">关注科袖公众号</div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
- <script type="text/javascript" src="../js/jquery-1.11.1.js"></script>
- <script>
- $(document).ready(function() {
- var imgUrl = "http://www.ekexiu.com/images/logo180.png";
- var lineLink = document.location.href;
- var descContent;
- var shareTitle;
- var appid = '';
- var articleId = GetQueryString("articleId");
- function GetQueryString(name) {
- var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
- var r = window.location.search.substr(1).match(reg);
- var context = "";
- if(r != null)
- context = r[2];
- reg = null;
- r = null;
- return context == null || context == "" || context == "undefined" ? "" : decodeURI(context);
- }
- function proInfoMain() {
- $.ajax({
- url: "/ajax/article/query",
- dataType: 'json',
- type: 'GET',
- async: false,
- data: {
- "articleId": articleId
- },
- timeout: 10000,
- success: function(data) {
- console.log(data)
- var $info = data.data || {};
- if(data.success && data.data) {
-
-
- var proRlist = document.getElementById("proRlist"); //专家资源
- var proName = document.getElementById("proName");
- var proTitle = document.getElementById("proTitle");
- var proOffice = document.getElementById("proOffice");
- var proOrg = document.getElementById("proOrg");
- var proAddress = document.getElementById("proAddress");*/
- var articleImg = document.getElementById("articleImg");
- var artical_topic = document.getElementById("artical_topic");
- var main_content = document.getElementById("main_content");
- var hiddenImg = document.getElementById("hiddenImg");
-
- if($info.articleType==1){
- professor($info.professorId);
- }else{
- company($info.orgId)
- }
-
- if($info.articleImg) {
- articleImg.style.backgroundImage = 'url(/data/article/' + $info.articleImg + ')';
-
-
- } else {
-
-
-
- }
-
- document.getElementById('proHead').src = "/images/head/" + $info.professorId + "_l.jpg";
- }*/
- artical_topic.innerText = $info.articleTitle;
-
- shareTitle = "【科袖文章】" + $info.articleTitle + "";
- window.setInterval(function() {
- document.title = "【科袖文章】" + $info.articleTitle + "";
- }, 500);
- if($info.articleContent) {
- main_content.innerHTML = $info.articleContent;
- descContent = main_content.innerText;
- var oImg = main_content.getElementsByTagName("img");
- for(var i = 0; i < oImg.length; i++) {
- (function(n) {
- var att = oImg[n].src.substr(7);
- console.log(oImg[n].src)
- oImg[n].style.width = "100%";
- oImg[n].parentNode.style.textIndent = "0em";
- })(i);
- }
- } else {
- descContent = "";
- }
- }
- },
- error: function() {
- return;
- }
- });
- }
- proInfoMain();
-
- function professor(dataUrl){
- $.ajax({
- url: "/ajax/professor/info/"+dataUrl,
- type: 'get',
- dataType: 'json',
- success: function(data) {
- if(data.success) {
- var $data=data.data;
- $("#proName").text($data.name);
- var omessage=personalInformation($data);
- $("#oMess").text(omessage);
- var oTime = $data["createTime"].substr(0, 4) + "年" + $data.createTime.substr(4, 2) + "月" + $data.createTime.substr(6, 2) + "日" ;
- $("#proRlist").html(oTime);
- if($data.hasHeadImage){
- $("#proHead").attr("src","/images/head/" + $data.id + "_l.jpg")
- }
-
- for(var n = 0; n < $data.researchAreas.length; n++) {
- rlist += '<span>' + $data.researchAreas[n].caption + '</span>';
- if(n != $data.researchAreas.length - 1) {
- rlist += ',';
- }
- }
- ($data.researchAreas) ? $("#proRlist").html(rlist): $("#proRlist").html("");
- var zlist = "";
- for(var n = 0; n < $data.resources.length; n++) {
- zlist += '<span>' + $data.resources[n].resourceName + '</span>';
- if(n != $data.resources.length - 1) {
- zlist += ',';
- }
- }
- ($data.resources) ? $("#proZlist").html(zlist) : $("#proZlist").html("");*/
- }
- },
- });
- }
-
- function company(dataUr){
- $.ajax({
- url: "/ajax/org/" + dataUr,
- type: "GET",
- timeout: 10000,
- dataType: "json",
- beforeSend: function() {},
- success: function(data, textState) {
- if(data.success) {
- var $data = data.data;
- $("#proName").text($data.name);
- if($data.authStatus == 3) {
- $("em").replaceWith("<em class='authiconNew authicon-com-ok' title='认证企业'></em>");
- } else {
- $("em").replaceWith("");
- }
- if($data.hasOrgLogo) {
- $("#proHead").attr("src", "/images/org/" + $data.id + ".jpg");
- } else {
- $("#proHead").attr("src", "images/default-icon.jpg");
- }
- var oTime = $data["createTime"].substr(0, 4) + "年" + $data.createTime.substr(4, 2) + "月" + $data.createTime.substr(6, 2) + "日" ;
- $("#proRlist").html(oTime);
- }
- },
- error: function(XMLHttpRequest, textStats, errorThrown) {
- $.MsgBox.Alert('提示', '服务器请求失败')
- }
- })
- }
-
- function personalInformation($person) {
- var arr1 = [$person.title, $person.office, $person.department, $person.orgName, $person.address];
- var arr = new Array();
- var arr2 = new Array();
- var n = 0;
- for(var i = 0; i < arr1.length; i++) {
- if(arr1[i]) {
- arr.push(arr1[i]);
- if(arr1[i] == arr1[arr1.length - 1]) {
- n = 1;
- }
- }
- }
- if(n == 1) {
- for(var i = 0; i < arr.length - 1; i++) {
- arr2.push(arr[i]);
- }
- return arr2.join() + " | " + arr[arr.length - 1];
- } else {
- return arr.join();
- }
- }
-
- $.ajax({
- url: "../ajax/weixin/jsapiTicket",
- type: 'get',
- dataType: 'json',
- contentType: "application/x-www-form-urlencoded; charset=utf-8",
- data: {
- 'url': location.href.split('#')[0]
- },
- success: function(data) {
- if(data.data) {
- wx.config({
- debug: false,
- appId: data.data.appId,
- timestamp: data.data.timestamp,
- nonceStr: data.data.nonceStr,
- signature: data.data.signature,
- jsApiList: [
- "onMenuShareAppMessage",
- "onMenuShareTimeline",
- "onMenuShareQQ",
- "onMenuShareQZone",
- "scanQRCode",
- ]
- });
-
- wx.ready(function() {
-
- wx.onMenuShareAppMessage({
- title: shareTitle,
- desc: descContent,
- link: lineLink,
- imgUrl: imgUrl,
- success: share_success_callback,
- cancel: share_cancel_callback
- });
- wx.onMenuShareTimeline({
- title: shareTitle,
- desc: descContent,
- link: lineLink,
- imgUrl: imgUrl,
- success: share_success_callback,
- cancel: share_cancel_callback
- });
- wx.onMenuShareQQ({
- title: shareTitle,
- desc: descContent,
- link: lineLink,
- imgUrl: imgUrl,
- success: share_success_callback,
- cancel: share_cancel_callback
- });
- wx.onMenuShareQZone({
- title: shareTitle,
- desc: descContent,
- link: lineLink,
- imgUrl: imgUrl,
- success: share_success_callback,
- cancel: share_cancel_callback
- });
- });
-
- function share_success_callback() {}
-
- function share_cancel_callback() {}
- }
- }
- });
- })
- </script>
- </body>
- </html>
|