$(function() { var countFlag = $("span[articlecounts=yes]"); if(countFlag&&countFlag.length>0){ var articleKey = $("#eprotalCurrentArticleKey").val(); var moduleId = $("#eportalappPortletId").val(); var columnId=$("#eprotalCurrentColumnId").val(); var url = "/eportal/ui?pageId="+$("#eprotalCurrentPageId").val()+"&moduleId="+moduleId+"&columnId="+columnId+"&articleKey="+articleKey+"&portal.url=/app/counting-front!saveInfo.portlet"; $.ajax( { type : "post", url : url, dataType : "text", success : function(msg) { if(msg.match(/^\d*$/)){ $("span[articleCounts=yes]").html(msg); }else{ $("span[articleCounts=yes]").html("1"); } } }); } if($('#aisiteQrCodeDiv')[0]){ var url=window.location.href; var qrWidth=$('#aisiteQrCodeDiv').attr("width"); var qrHeight =$('#aisiteQrCodeDiv').attr("height"); var logoQrWidth = qrWidth/ 4; var logoQrHeight = qrHeight /4; $('#aisiteQrCodeDiv').qrcode({ render: "canvas", width: qrWidth, height: qrHeight, text: url }); if($("#aisiteQrCodeLogoImg")[0]){ $("#aisiteQrCodeDiv canvas")[0].getContext('2d').drawImage($("#aisiteQrCodeLogoImg")[0], (qrWidth - logoQrWidth) / 2, (qrHeight - logoQrHeight) / 2, logoQrWidth, logoQrHeight); } } $.each($("[previousarticle='yes']"),function(){ var element = $(this); if(element!=null&&element[0]!="undefined"){ var articleKey = element.attr("articlekey"); var columnid = element.attr("columnid"); var isStaticRequest=$("#isStaticRequest").val(); var urltype= element.attr("urltype"); if(articleKey!=null&&articleKey!="undefined"&&!articleKey.match(/^\s*$/)){ var moduleId = $("#eportalappPortletId").val(); var url = "/eportal/ui?pageId="+$("#eprotalCurrentPageId").val()+"&moduleId="+moduleId+"&portal.url=/portlet/article-portlet!getPreOrNextArticle.portlet&urlType="+urltype; $.ajax( { type : "post", url : url, dataType : "text", data:{"articleKey":articleKey,"columnId":columnid,"staticRequest":isStaticRequest}, success : function(msg) { if(msg!="error"){ var tagName=element[0].tagName.toLowerCase(); msg=eval("("+msg+")"); var preTitle=msg.preTitle; var preUrl=msg.preUrl; var preTitlePhoto=msg.preTitlePhoto; var nextTitle=msg.nextTitle; var nextUrl=msg.nextUrl; var nextTitlePhoto=msg.nextTitlePhoto; if(tagName=="span"){ var spanNav=element; if(preUrl.match(/^\s*$/)){ spanNav.prev().hide(); }else{ spanNav.html(""+preTitle+""); } if(nextUrl.match(/^\s*$/)){ $("span[nextarticle='yes']").prev().hide(); }else{ $("span[nextarticle='yes']").html(""+nextTitle+""); } }else if(tagName=="img"){ if($("#previousArticleImage")[0]){ if(preUrl.match(/^\s*$/)){ $("#previousArticleImage").attr("src","/eportal/uiFramework/images/picNews/notuji.jpg"); $("#previousArticleImage").after("
宸叉槸绗竴鍥鹃泦"); }else{ if(!preTitlePhoto.match(/^\s*$/)){ $("#previousArticleImage").attr("src",preTitlePhoto); }else{ $("#previousArticleImage").attr("src","/eportal/uiFramework/images/picNews/notuji.jpg"); } $("#previousArticleImage").after("涓婁竴鍥鹃泦"); } } if($("#nextArticleImage")[0]){ if(nextUrl.match(/^\s*$/)){ $("#nextArticleImage").attr("src","/eportal/uiFramework/images/picNews/notuji.jpg"); $("#nextArticleImage").after("
宸叉槸鏈€鍚庡浘闆?); }else{ if(!nextTitlePhoto.match(/^\s*$/)){ $("#nextArticleImage").attr("src",nextTitlePhoto); }else{ $("#nextArticleImage").attr("src","/eportal/uiFramework/images/picNews/notuji.jpg"); } $("#nextArticleImage").after("涓嬩竴鍥鹃泦"); } } } } } }); } } }); var system ={ win : false, mac : false, xll : false }; var p = navigator.platform; system.win = p.indexOf("Win") == 0; system.mac = p.indexOf("Mac") == 0; system.x11 = (p == "X11") || (p.indexOf("Linux") == 0); var flag=system.win||system.mac||system.xll; if($("#eprotalCurrentSiteType").val()=="APP"||!flag){ var objectList = document.getElementsByTagName("object"); while(objectList.length>0){ var obj = objectList[0]; var paramList = obj.childNodes; var videoLink = ""; var width = $(window).width(); var heigth =$(window).height(); var play=false; var audioLink=""; for(var n = 0; n 0){ play = true; } audioLink=audioLink.replace("/eportal/uiFramework/js/videoPlayer/audioPlayer.swf?file=", ""); audioLink=audioLink.substring(0,audioLink.indexOf("&")); } } var showHtmlVideo=videoLink.indexOf(".mp4")>0||videoLink.indexOf(".MP4")>0; if(showHtmlVideo){ var objParent = obj.parentNode; objParent.innerHTML=""; var video = "