portal html css js resource

a.html 6.8KB

    <!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/share.css" /> <script type="text/javascript" src="../js/jquery-1.11.1.js"></script> <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script> <script type="text/javascript" src="../js/public/shareCom.js"></script> <style> html, body { margin: 0; padding: 0px; background: #FFFFFF; } </style> </head> <body> <div class="contentBody2"> <div class="showDetail"> <div class="h1Font hWeight" id="articleName"></div> <div class="madiaBlock"> <ul class="mui-table-view noactiveTab"> <li class="mui-table-view-cell" id="personAL"> <div class="flexCenter mui-clearfix"> <div class="madiaHead useHead" id="messImg"></div> <div class="madiaInfo"> <p><span class="h1Font" id="name"></span><em class="authiconNew" title="" id="auth"></em></p> <p class="h3Font" id="oTime"></p> </div> </div> </li> </ul> </div> <!--文章内容区--> <div class="showMain" id="articleContent"> </div> <!--标签模块--> <ul class="tagList displayNone"> <!--<li> <span class="h2Font">金属材料工程与腐</span> </li>--> </ul> </div> <div class="shareEcode"> <div class="Ecodebox"> <div class="Ecodecon clearfix"> <img src="../images/weixin_code.jpg" /> <div class="codecon"> <h1>「 科袖 」</h1> <h2>搭建企业与专家的桥梁</h2> <h3>长按识别科袖公众号</h3> </div> </div> </div> <div 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> </div> <script type="text/javascript"> $(document).ready(function() { var imgUrl =""; var lineLink = document.location.href; var descContent=""; var shareTitle; var appid = ''; var articleId = GetQueryString("id"); $.ajax({ "url" : "/ajax/article/pageViews", "type" : "POST" , "dataType" : "json", "data" :{"articleId":articleId}, "success" : function(data) { console.log(data); if (data.success){ } }, "error":function(){ //$.MsgBox.Alert('提示','链接服务器超时') } }); //进入发布者详情页面 $("#personAL").on("click", function() { var reType = this.getAttribute("data-type"); if(reType=="1"){ var proId=this.getAttribute("data-id"); location.href="http://" + window.location.host + "/e/p.html?id=" + proId; }else{ var cmpId=this.getAttribute("data-id"); location.href="http://" + window.location.host + "/e/c.html?id=" + cmpId; } }) var oArticleModule = { articleId: GetQueryString("id"), oAjaxGet: function(url, obj, oType, oFun) { $.ajax({ url: url, data: obj, dataType: 'json', //服务器返回json格式数据 type: oType, //HTTP请求类型 timeout: 10000, //超时时间设置为10秒; traditional: true, success: function(data) { if(data.success) { oFun(data.data); } }, error: function(e) { return; } }); }, articleMess: function($data) { console.log($data); document.getElementById("articleName").innerHTML = $data.articleTitle; $("#oTime").text(commenTime($data.createTime)) shareTitle=$data.articleTitle; $("#oTime").text(commenTime($data.createTime)) document.title=$data.articleTitle; stt = $data.articleImg.substring(0, 9); imgUrl="http://www.ekexiu.com/data/article/" + stt + $data.articleId + "_s.jpg"; console.log(stt) if($data.articleContent) { document.getElementById("articleContent").innerHTML = $data.articleContent; descContent=document.getElementById("articleContent").innerText; console.log($data.articleContent) console.log(descContent) } if($data.subject) { document.getElementsByClassName("tagList")[0].style.display = "block"; var arr = $data.subject.split(","); for(var i in arr) { var oLi = document.createElement("li"); oLi.innerHTML = '<span class="h2Font">' + arr[i] + '</span>' document.getElementsByClassName("tagList")[0].appendChild(oLi); } } document.getElementById("personAL").setAttribute("data-type",$data.articleType); if($data.articleType == 1) { document.getElementById("personAL").setAttribute("data-id",$data.professorId); oArticleModule.oAjaxGet("../ajax/professor/editBaseInfo/" + $data.professorId, "", "get", oArticleModule.professorMess); } else { document.getElementById("personAL").setAttribute("data-id",$data.orgId); oArticleModule.oAjaxGet("../ajax/org/" + $data.orgId, "", "get", oArticleModule.business); } }, professorMess: function($data) { console.log($data); //document.getElementById('name').innerHTML = $data.name; $("#name").text($data.name); if($data.hasHeadImage == 1) { document.getElementById("messImg").style.backgroundImage = "url(../images/head/" + $data.id + "_l.jpg" + ")"; } var userType = autho($data.authType, $data.orgAuth, $data.authStatus); document.getElementById("auth").classList.add(userType.sty); }, business: function($data) { //console.log(JSON.stringify($data)); if($data.forShort) { document.getElementById('name').innerHTML = $data.forShort; }else{ document.getElementById('name').innerHTML = $data.name; } var mgimg="../images/default-icon.jpg"; if($data.hasOrgLogo) { mgimg="/images/org/" + $data.id + ".jpg"; } document.getElementById("messImg").classList.add("cmpHead"); document.getElementById("messImg").innerHTML='<div class="boxBlock" style="width:50px;height:50px;"><img class="boxBlockimg" id="companyImg" src="'+ mgimg+'"></div>' if($data.authStatus == 3) { document.getElementById("auth").classList.add("authicon-com-ok"); } } } /*文章详细内容*/ oArticleModule.oAjaxGet("../ajax/article/query", { articleId: oArticleModule.articleId }, "get", oArticleModule.articleMess); shareWays();//分享方式 }) </script> </body> </html>