// var ribaoButton = document.getElementById('ribao');
// var ribaoBox = document.getElementById('ribaobox');
// var zhoubaoButton = document.getElementById('zhoubao');
// var zhoubaoBox = document.getElementById('zhoubaobox');
// var zazhiButton = document.getElementById('zazhi');
// var zaizhiBox = document.getElementById('zazhibox');
// var goTop = document.getElementById('go-top');
updateMetaRmrb(location.href);
function updateMetaRmrb(webLastUrl) {
// console.log(webLastUrl)
var x = webLastUrl.indexOf(‘content_’);
var y = webLastUrl.indexOf(‘.html’);
if (x >= 0) {
var publishdate = webLastUrl.substring(x-10, x);
publishdate = publishdate.substring(0, 4) + ‘-‘ + publishdate.substring(4, 6) + ‘-‘ + publishdate.substring(7, 9);
var contentid = ‘rmrbdzb_’ + webLastUrl.substring(x + 8, y);
showMetaRmrb(publishdate, contentid);
}
}
function showMetaRmrb(publishdate, contentid) {
var metas = document.getElementsByTagName(‘meta’);
for (var i = 0; i < metas.length; i++) {
if ('contentid' == metas[i].name) {
metas[i].content = contentid;
} else if ('publishdate' == metas[i].name) {
metas[i].content = publishdate;
}
}
}
; (function () {
var _global;
let duration = 500;//时间参数
var plugin = {
tipNav: function (tipmain, tipsub) {
tipmain.addEventListener('mouseover', function () {
tipsub.style.display = 'block'
}, false);
tipmain.addEventListener('mouseout', function () {
tipsub.style.display = 'none'
}, false);
},
replayTop: function (tipmain) {
tipmain.addEventListener('click', function () {
let topSzie = document.documentElement.scrollTop;
let s = topSzie / 600 * 25; //路程/时间=s *25每隔25ms秒 动的路程
let st = setInterval(function () {
topSzie -= s;
if (topSzie <= 0) {
topSzie = 0; //当l<=0时,设置l=0
clearInterval(st);
}
document.documentElement.scrollTop = topSzie;
}, 25)
}, false);
var ribaoButton = document.getElementById('ribao');
var ribaoBox = document.getElementById('ribaobox');
var zhoubaoButton = document.getElementById('zhoubao');
var zhoubaoBox = document.getElementById('zhoubaobox');
var zazhiButton = document.getElementById('zazhi');
var zaizhiBox = document.getElementById('zazhibox');
var goTop = document.getElementById('go-top');