|
<!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{background: #FFFFFF;}
</style>
<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/baseUtil.js"></script>
<script type="text/javascript" src="../js/public/shareCom.js"></script>
<script type="text/javascript" src="../js/public/shareLeaveWord.js"></script>
<script type="text/javascript" src="../js/public/openApp.js"></script>
</head>
<body>
<div class="contentBody2">
<div class="showDetail">
<div class="h1Font hWeight" id="patentName"></div>
<!--内容区-->
<div class="showMain showMainP">
<ul>
<li>
<div class="showTit">专利号:<span class="showCon" id="Znum1"></span></div>
</li>
<li>
<div class="showTit">公开日:<span class="showCon" id="Znum2"></span></div>
</li>
<li>
<div class="showTit">申请日:<span class="showCon" id="Znum3"></span></div>
</li>
<li>
<div class="showTit">申请号:<span class="showCon" id="Znum4"></span></div>
</li>
<li>
<div class="showTit">申请人:<span class="showCon" id="Znum5"></span></div>
</li>
<li>
<div class="showTit">摘要:</div>
<div class="showCon" id="patentAbstract">
</div>
</li>
<li>
<div class="showTit">合作备注:</div>
<div class="showCon" id="patentRemarks">
</div>
</li>
</ul>
</div>
<!--标签模块-->
<ul class="tagList">
</ul>
<div class="madiaBlock">
<div class="madiaTit">发明人</div>
<ul class="mui-table-view" id="aboutAuthors">
</ul>
</div>
<div class="madiaBlock displayNone" id="paperModule">
<div class="madiaTit">相关论文</div>
<ul class="mui-table-view" id="paperList">
<!--<li class="mui-table-view-cell">
<div class="flexCenter OflexCenter mui-clearfix">
<div class="madiaHead paperHead"></div>
<div class="madiaInfo OmadiaInfo">
<p class="ellipsisSty h1Font">CdS/CdSSe轴向异质结纳米线的非对称光波导及双波长激射</p>
<p class="ellipsisSty h2Font">作者:李丹,梁君武,刘华伟,张学红,万强,张清林,潘安练</p>
</div>
</div>
</li>-->
</ul>
</div>
<div class="thumbBlock">
<span class="thumbBtn">赞 <span id="snum"></span></span><!-- thumbedBtn 已赞 201-->
</div>
<div class="madiaBlock displayNone" id="patentModule">
<div class="madiaTit">您可能感兴趣的专利</div>
<ul class="mui-table-view" id="patentList">
</ul>
</div>
<div class="madiaBlock displayNone" style="padding-bottom:50px;" id="leword">
<div class="madiaTit" id="olisten">留言</div>
<ul class="mui-table-view commentBlock noactiveTab">
</ul>
</div>
</div>
<div class="shareEcode">
<img class="Ecodecon" src="../images/ecordCard.jpg" />
<div class="Ecodeinfo">
<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 patentId = GetQueryString("id");
module.lWord(patentId,3);
pageViewLog(patentId,4);
isAgreeNum()
function isAgreeNum() {
var data = {"id": patentId}
$.ajax({
url:"/ajax/ppatent/agreeCount",
data:data,
dataType: 'json', //数据格式类型
type: 'get', //http请求类型
timeout: 10000,
async: true,
success: function(data) {
if(data.success){
$(".thumbBtn").html("赞 <span>" + data.data + "</span>");
}
},
error: function() {
//$.MsgBox.Alert('提示',"服务器链接超时");
}
});
}
var this_="../html/patentShow.html?patentId="+patentId;
wcFresh(this_);
$("body").on("click",".goSpan,.thumbBtn",function(){
isInstalled(this_,true);
$(this).addClass("activeThis");
})
paperInterestingList()
function paperInterestingList(){
$.ajax({
"url" : "/ajax/ppatent/ralatePatents",
"type" : "GET" ,
"dataType" : "json",
"data" :{
"patentId":patentId
},
//"async":false,
"traditional": true, //传数组必须加这个
"success" : function(data) {
if(data.success) {
console.log(data);
var dataStr=data.data
var lengthT;
if(dataStr.length>5){
lengthT=5;
}else{
lengthT=dataStr.length
}
if(dataStr.length > 0){
$("#patentModule").show();
var itemlist = '';
for(var i = 0; i < lengthT; i++) {
var itemlist = '<li class="mui-table-view-cell" data-id="'+dataStr[i].id+'">';
itemlist += '<div class="flexCenter OflexCenter mui-clearfix"><div class="madiaHead patentHead"></div>';
itemlist += '<div class="madiaInfo OmadiaInfo">';
itemlist += '<p class="ellipsisSty-2 h1Font">'+ dataStr[i].name +'</p>';
itemlist += '<p class="ellipsisSty h2Font">发明人:'+ dataStr[i].authors.substring(0, dataStr[i].authors.length - 1) +'</p>';
itemlist += '</div></div></li>';
$itemlist = $(itemlist);
$("#patentList").append($itemlist);
}
}
}
},
"error":function(){
//$.MsgBox.Alert('提示','链接服务器超时')
}
});
}
$("#paperList").on("click","li",function(){
location.href="http://" + window.location.host + "/e/l.html?id=" + $(this).attr("data-id");
});
$("#patentList").on("click","li",function(){
location.href="http://" + window.location.host + "/e/z.html?id=" + $(this).attr("data-id");
});
getRecourceMe();
$("#aboutAuthors").on("click","li",function(){
var oDataId = $(this).attr("data-id");
if(oDataId.substring(0,1)!="#"){
location.href="http://" + window.location.host + "/e/p.html?id=" + oDataId;
$(this).addClass("activeThis");
}
})
$(".tagList").on("click", "li", function() {
var keyCon=$(this).find(".h2Font").text();
location.href="http://" + window.location.host + "/e/search.html?flag=4&key=" + keyCon;
})
function getRecourceMe() {
$.ajax({
url:'../ajax/ppatent/qo',
data: {
'id': patentId,
},
dataType: 'json', //服务器返回json格式数据
type: 'get', //HTTP请求类型
timeout: 10000, //超时时间设置为10秒;
success: function(data) {
console.log(data);
if(data.success) {
var mydata = data.data;
patentHtml(data.data);
getpatentAuthors(data.data.id)
}
},
error: function(e) {
return;
}
});
}
function patentHtml($da) {
//微信再次分享配置
shareTitle = $da.name;
descContent = $da.summary.substring(0,70);
document.title = $da.name;
document.getElementById("patentName").innerHTML = $da.name; //名字
document.getElementById("patentAbstract").innerHTML = $da.summary; //摘要内容
document.getElementById("Znum1").innerHTML = $da.code;//专利号
if($da.cooperation){
document.getElementById("patentRemarks").innerHTML = $da.cooperation;
}else{
document.getElementById("patentRemarks").parentNode.style.display="none";
}
if($da.pubDay){
document.getElementById("Znum2").innerHTML = TimeTr($da.pubDay);
}else{
document.getElementById("Znum2").parentNode.parentNode.style.display="none";
}
if($da.reqCode){
document.getElementById("Znum4").innerHTML = $da.reqCode;
}else{
document.getElementById("Znum4").parentNode.parentNode.style.display="none";
}
if($da.reqDay){
document.getElementById("Znum3").innerHTML = TimeTr($da.reqDay);
}else{
document.getElementById("Znum3").parentNode.parentNode.style.display="none";
}
if($da.reqDay){
document.getElementById("Znum5").innerHTML = $da.reqPerson;
}else{
document.getElementById("Znum5").parentNode.parentNode.style.display="none";
}
if($da.keywords != undefined && $da.keywords.length != 0 ){
var subs=strToAry($da.keywords)
var pstr=""
if(subs.length>0){
paperRelatedList(subs);
for (var i = 0; i < subs.length; i++)
{
pstr+='<li><span class="h2Font">'+ subs[i] +'</span></li>'
};
$(".tagList").html(pstr);
}else{
$(".tagList").hide();
}
}
}
/*获取论文作者信息*/
function getpatentAuthors(stritrm) {
$.ajax({
"url":"../ajax/ppatent/authors",
"type": "GET",
"success": function(data) {
if(data.success) {
if(data.data.length>0){
for(var i=0;i<data.data.length;i++){
var authTy="",authTit="",baseInfo="",imgbg="../images/default-photo.jpg";
if(data.data[i].professorId.substring(0, 1) != "#"){
$.ajax({
url:"../ajax/professor/editBaseInfo/" + data.data[i].professorId,
type:"get",
async:true,
success:function($proData){
if($proData.success){
var showPro = $proData.data;
if(showPro.hasHeadImage == 1) {
imgbg = "/images/head/" + showPro.id + "_l.jpg";
} else {
imgbg = "../images/default-photo.jpg";
}
//认证
var oSty = autho(showPro.authType,showPro.orgAuth,showPro.authStatus);
authTy = oSty.sty;
authTit = oSty.title;
var title = showPro.title || "";
var orgName = showPro.orgName || "";
var office = showPro.office || "";
if(orgName!=""){
if(title != "") {
baseInfo = title + "," + orgName;
}else{
if(office!=""){
baseInfo = office + "," + orgName;
}else{
baseInfo = orgName;
}
}
}else{
if(title != "") {
baseInfo = title;
}else{
if(office!=""){
baseInfo = office;
}else{
baseInfo = "";
}
}
}
var liItem = document.createElement("li");
liItem.setAttribute("data-id",showPro.id);
liItem.className = "mui-table-view-cell"
var oString = '<div class="flexCenter mui-clearfix">'
oString += '<div class="madiaHead useHead" style="background-image:url('+ imgbg +')"></div>'
oString += '<div class="madiaInfo"><p><span class="h1Font">'+ showPro.name +'</span><em class="authiconNew '+ authTy +'" title="'+ authTit +'"></em></p>'
oString += '<p class="ellipsisSty h2Font">'+ baseInfo +'</p>'
oString += '</div><div class="goSpan"><span class="attenSpan" data-id="'+showPro.id+'">关注</span></div></div>'
liItem.innerHTML = oString;
document.getElementById("aboutAuthors").appendChild(liItem);
}
}
})
}else{
var liItem = document.createElement("li");
liItem.setAttribute("data-id",data.data[i].professorId);
liItem.className = "mui-table-view-cell"
var oString = '<div class="flexCenter mui-clearfix">'
oString += '<div class="madiaHead useHead" style="background-image:url('+ imgbg +')"></div>'
oString += '<div class="madiaInfo"><p><span class="h1Font">'+ data.data[i].name +'</span></p>'
oString += '</div></div>'
liItem.innerHTML = oString;
document.getElementById("aboutAuthors").appendChild(liItem);
}
}
}
}
},
"data": {
"id": stritrm
},
dataType: "json",
'error':function() {
//$.MsgBox.Alert('提示', '链接服务器超时')
}
});
}
/*微信分享*/
$.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: [ // 所有要调用的 API 都要加到这个列表中
"onMenuShareAppMessage",
"onMenuShareTimeline",
"onMenuShareQQ",
"onMenuShareQZone",
"scanQRCode",
]
});
wx.ready(function() {
// 在这里调用 API
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({ //分享到QQ
title: shareTitle, // 分享标题
desc: descContent, // 分享描述
link: lineLink, // 分享链接
imgUrl: imgUrl, // 分享图标
success: share_success_callback,
cancel: share_cancel_callback
});
wx.onMenuShareQZone({ //分享到QQ空间
title: shareTitle, // 分享标题
desc: descContent, // 分享描述
link: lineLink, // 分享链接
imgUrl: imgUrl, // 分享图标
success: share_success_callback,
cancel: share_cancel_callback
});
});
//分享成功后的回调函数
function share_success_callback() {}
//用户取消分享后执行的回调函数
function share_cancel_callback() {}
}
}
});
//根据关键词查询查找相关论文
function paperRelatedList(array){
$.ajax({
"url" : "/ajax/ppaper/assPapers",
"type" : "GET" ,
"dataType" : "json",
"data" :{
"kws":array
},
//"async":false,
"traditional": true, //传数组必须加这个
"success" : function(data) {
if(data.success) {
console.log(data);
var dataStr=data.data
var lengthT;
if(dataStr.length>5){
lengthT=5;
}else{
lengthT=dataStr.length
}
if(dataStr.length > 0){
$("#paperModule").show();
var itemlist = '';
for(var i = 0; i < lengthT; i++) {
var itemlist = '<li class="mui-table-view-cell" data-id="'+dataStr[i].id+'">';
itemlist += '<div class="flexCenter OflexCenter mui-clearfix"><div class="madiaHead paperHead"></div>';
itemlist += '<div class="madiaInfo OmadiaInfo">';
itemlist += '<p class="ellipsisSty-2 h1Font">'+ dataStr[i].name +'</p>';
itemlist += '<p class="ellipsisSty h2Font">作者:'+ dataStr[i].authors.substring(0, dataStr[i].authors.length - 1) +'</p>';
itemlist += '</div></div></li>';
$itemlist = $(itemlist);
$("#paperList").append($itemlist);
}
}
}
},
"error":function(){
plus.nativeUI.toast("服务器链接超时", toastStyle);
}
});
}
})
</script>
</body>
</html>
|