|
<!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" />
<style>
html,body{margin:0;padding:0px;background: #FFFFFF;}
</style>
<script type="text/javascript" src="../js/jquery-1.11.1.js"></script>
<script type="text/javascript" src="../js/public/swiper.min.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>
</head>
<body>
<div class="contentBody2">
<!--焦点图 start-->
<div data-editor="topslider">
<div id="index-container">
<ul class="swiper-wrapper">
<!--<li class="swiper-slide"><a class="tab-re"><img src="../images/banner/banner01.jpg" /></a></li>-->
</ul>
<div class="swiper-pagination" id="index-pagination"></div>
</div>
</div>
<div class="showDetail">
<div class="h1Font hWeight" id="resourceName"></div>
<div class="showFont" id="application"></div>
<div class="madiaBlock">
<ul class="mui-table-view noactiveTab infoBlock">
<li class="mui-table-view-cell">
<div class="flexCenter mui-clearfix" id="thisInfo">
<div class="madiaHead" id="thisPic"></div>
<div class="madiaInfo">
<p><span class="h1Font ellipsisSty" id="thisName"></span><em class="authiconNew" title="" id="authFlag"></em></p>
<p class="h3Font ellipsisSty" id="thisOther"></p>
</div>
</div>
</li>
</ul>
</div>
<!--内容区-->
<div class="showMain showRes">
<ul>
<li>
<div class="showTit">所属机构</div>
<div class="showCon" id="resorceOrg"></div>
</li>
<li>
<div class="showTit">厂商型号</div>
<div class="showCon" id="modelNumber"></div>
</li>
<li>
<div class="showTit">性能参数</div>
<div class="showCon" id="performancePa"></div>
</li>
<li>
<div class="showTit">合作备注</div>
<div class="showCon" id="remarkContent"></div>
</li>
<li>
<div class="showTit">详细介绍</div>
<div class="showCon" id="detailDescp"></div>
</li>
</ul>
</div>
<!--标签模块-->
<ul class="tagList">
<!--<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 = "http://www.ekexiu.com/images/logo180.png";
var lineLink = document.location.href;
var descContent;
var shareTitle;
var appid = '';
var resourceId = GetQueryString("id");
var othisInfo=document.getElementById("thisInfo"); //用户/企业信息
var othisName = document.getElementById("thisName"); //专家名称
var othisOther = document.getElementById("thisOther"); //专家职称/职位
var oauthFlag = document.getElementById("authFlag"); //专家认证
var othisPic = document.getElementById("thisPic"); //专家头像
var oresorcePic = document.getElementById("resorcePic"); //资源图片
var oresourceName = document.getElementById("resourceName"); //资源名称
var oapplication = document.getElementById("application"); //应用用途
var oresorceOrg = document.getElementById("resorceOrg"); //资源所属机构
var omodelNumber = document.getElementById("modelNumber"); //厂商型号
var operformancePa = document.getElementById("performancePa"); //性能参数
var oremarkContent = document.getElementById("remarkContent"); //合作备注
var odetailDescp = document.getElementById("detailDescp"); //详细描述
getRecourceMe();/*获取信息*/
shareWays();//分享方式
$.ajax({
"url": "/ajax/resource/pageViews",
"type": "POST",
"dataType": "json",
"data": {
"resourceId": resourceId
},
"success": function(data) {
console.log(data);
if(data.success) {}
},
"error": function() {
//$.MsgBox.Alert('提示', '链接服务器超时')
}
});
//进入发布者详情页面
$("#thisInfo").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;
}
})
function getRecourceMe() {
$.ajax({
url:'../ajax/resource/queryOne',
data: {
'resourceId': resourceId,
},
dataType: 'json', //服务器返回json格式数据
type: 'get', //HTTP请求类型
timeout: 10000, //超时时间设置为10秒;
success: function(data) {
if(data.success) {
var mydata = data.data;
var resourceName = mydata.resourceName;
document.title = resourceName;
oresourceName.innerHTML = mydata.resourceName;
oapplication.innerHTML = "用途:"+ mydata.supportedServices;
//微信再次分享配置
shareTitle = oresourceName.innerHTML;
descContent = oapplication.innerHTML;
if(mydata.editProfessor) {
othisInfo.setAttribute("data-id",mydata.editProfessor.id);
othisInfo.setAttribute("data-type",mydata.resourceType);
professorId = othisInfo.getAttribute("data-id");
if(mydata.orgName) { //所属机构
oresorceOrg.innerText = mydata.orgName;
oresorceOrg.parentNode.style.display="block";
}
//用户个人信息
othisName.innerHTML = mydata.editProfessor.name;
var otitleInfo="";
var oOrgInfo="";
if(mydata.editProfessor.title) {
otitleInfo = mydata.editProfessor.title + ",";
} else {
if(mydata.editProfessor.office) {
otitleInfo = mydata.editProfessor.office + ",";
}else{
otitleInfo = "";
}
}
if(mydata.editProfessor.orgName) {
oOrgInfo = mydata.editProfessor.orgName;
}
othisOther.innerHTML = otitleInfo + oOrgInfo;
var professorFlag = autho(mydata.editProfessor.authType, mydata.editProfessor.orgAuth, mydata.editProfessor.authStatus);
oauthFlag.classList.add(professorFlag.sty);
othisPic.classList.add("useHead");
if(mydata.editProfessor.hasHeadImage == 1) {
othisPic.style.backgroundImage = 'url(../images/head/' + mydata.editProfessor.id + '_l.jpg)';
}
}else{
othisInfo.setAttribute("data-id",mydata.organization.id);
othisInfo.setAttribute("data-status",mydata.organization.authStatus);
othisInfo.setAttribute("data-type",mydata.resourceType);
if(mydata.organization.forShort) {
othisName.innerHTML = mydata.organization.forShort;
}else{
othisName.innerHTML = mydata.organization.name;
}
if(mydata.organization.subject){
othisOther.innerHTML = (mydata.organization.subject).replace(/,/, " | ");
}
var mgimg="../images/default-icon.jpg";
if(mydata.organization.hasOrgLogo) {
mgimg="/images/org/" + mydata.organization.id + ".jpg";
}
othisPic.classList.add("cmpHead");
othisPic.innerHTML='<div class="boxBlock" style="width:50px;height:50px;"><img class="boxBlockimg" id="companyImg" src="'+ mgimg+'"></div>'
if(mydata.organization.authStatus==3){
oauthFlag.classList.add("authicon-com-ok");
}
}
if(mydata.spec) { //厂商型号
omodelNumber.innerText = mydata.spec;
omodelNumber.parentNode.style.display="block";
}
if(mydata.parameter) { //性能参数
operformancePa.innerHTML = mydata.parameter;
operformancePa.parentNode.style.display="block";
}
if(mydata.cooperationNotes) { //合作备注
oremarkContent.innerHTML = mydata.cooperationNotes;
oremarkContent.parentNode.style.display="block";
}
if(mydata.descp) { //详细描述
odetailDescp.innerHTML = mydata.descp;
odetailDescp.parentNode.style.display="block";
}
if(mydata.subject) {
var oSub = mydata.subject.split(",");
var oSt = "";
for(var i = 0; i < oSub.length; i++) {
oSt += '<li><span class="h2Font">' + oSub[i] + '</span></li>'
}
$(".tagList").html(oSt);
}
console.log(mydata.images.length)
if(mydata.images.length!=0) {
imgUrl="http://www.ekexiu.com/data/resource/" + mydata.images[0].imageSrc.replace(/.jpg/,"_s.jpg");
var rPdiv ='';
for(var i = 0; i < mydata.images.length; i++) {
rPdiv +='<li class="swiper-slide"><a class="tab-re"><img src="../data/resource/' + mydata.images[i].imageSrc + '" /></a></li>'
}
$("#index-container ul").append(rPdiv);
//轮换图片滚动
var swiper = new Swiper('#index-container', {
pagination: '#index-pagination',
slidesPerView: 1,
paginationClickable: true,
loop: true,
autoplay: 5000,
autoplayDisableOnInteraction: false
});
}else{
$("#index-container").parent().hide();
}
}
},
error: function(e) {
return;
}
});
}
})
</script>
</body>
</html>
|