var juba_domain={'domain':'www.miit.gov.cn','webid':'12'};vcdomain = 'https://wap.miit.gov.cn/jubac/sync/getUserInfo.do'; (function() { var vc_path = vcdomain; var D = top.document, L = D.location, R = D.referrer, W = window, E = encodeURIComponent; var iscookie = navigator.cookieEnabled ? "1": "0"; var timestamp = Date.parse(new Date()); var l_time = "0"; var old_time = "0"; var lastdays = "-1"; var userAgent = navigator.userAgent; var VC = { client: {}, getUser: function() { var userdata = getCookie("_jubacdata"); if (userdata != null && userdata != "") { this.client.userdata = userdata } }, getMeta: function() { var artid = ""; var artid1 = document.getElementById("artid"); if (artid1 != null) { artid = artid1.content } var colid = ""; var colid1 = document.getElementById("colid"); if (colid1 != null) { colid = colid1.content } var itemid = ""; var themeid = ""; var themename = ""; var deptid = ""; var itemname = ""; var deptname = ""; var itemname1 = document.getElementById("itemname"); if (itemname1 != null) { itemname = itemname1.name; themename = itemname1.content } var deptname1 = document.getElementById("deptname"); if (deptname1 != null) { deptname = deptname1.content } this.client.artid = artid; this.client.colid = colid; this.client.itemid = itemid; this.client.itemname = itemname; this.client.themeid = themeid; this.client.themename = themename; this.client.deptid = deptid; this.client.deptname = deptname }, getRnd: function() { this.client.rnd = Math.round(Math.random() * 4000000000) }, getCookid: function() { var uv = ""; visitortype = "1"; var date = new Date(); var year = date.getFullYear(); var month = date.getMonth() + 1; var strDate = date.getDate(); if (month < 10) { month = "0" + month } if (strDate < 10) { strDate = "0" + strDate } var currentDate = "" + year + month + strDate; if (iscookie == 0) { uv = 0; visitortype = "2" } else { if (W.localStorage) { uv = eval(localStorage.getItem("juba_cookid")); if (uv == null) { var rand1 = parseInt(Math.random() * 4000000000); var rand2 = parseInt(Math.random() * 4000000000); uv = eval(String(rand1) + String(rand2)); visitortype = "0"; localStorage.setItem("" + uv + currentDate, uv) } else { var todaycookie = localStorage.getItem("" + uv + currentDate); if (todaycookie != null) { visitortype = "0" } var lastt = localStorage.getItem("lasttime" + uv); if (lastt == null) { lastdays = 0 } else { lastdays = eval(currentDate) - eval(lastt) } } localStorage.setItem("lasttime" + uv, currentDate); localStorage.setItem("juba_cookid", uv) } } this.client.cookid = uv; this.client.visitortype = visitortype; this.client.lastdays = lastdays }, getSessionid: function() { var session = ""; var sessiontype = "1"; if (iscookie == 0) { session = 0; var sessiontype = "2" } else { if (W.sessionStorage) { session = eval(sessionStorage.getItem("juba_sessionid")); if (session == null) { var rand1 = parseInt(Math.random() * 4000000000); var rand2 = parseInt(Math.random() * 4000000000); session = eval(String(rand1) + String(rand2)); sessiontype = "0" } else { old_time = eval(sessionStorage.getItem("timestamp")); if (old_time != null) { l_time = timestamp - old_time } } sessionStorage.setItem("timestamp", timestamp); sessionStorage.setItem("juba_sessionid", session) } } this.client.l_time = l_time / 1000; this.client.old_time = timestampToTime(old_time); this.client.sessionid = session; this.client.sessiontype = sessiontype }, getUrl: function() { var visiturl = L.href ? E(L.href) : ""; var jubacurl = D.getElementsByTagName("meta")["server"]; if (jubacurl != null) { this.client.url = jubacurl.content } else { this.client.url = visiturl } }, getTitle: function() { var title = D.title; title = encodeURI(title); var jubactitle = D.getElementsByTagName("meta")["ArticleTitle"]; if (jubactitle != null) { title = jubactitle.content } this.client.title = title }, getUrltype: function() { var urltype = typeof(juba_uuid) == "undefined" ? "": juba_uuid; if (urltype == null || urltype == "" || typeof(urltype) == "undefined") { var pagetypeid = D.getElementsByTagName("meta")["pagetype"]; if (pagetypeid != null) { urltype = pagetypeid.content == 3 ? 0 : pagetypeid.content } else { urltype = geturltype() } } this.client.urltype = urltype }, getPubdate: function(){ var pubdateid = D.getElementsByTagName("meta")["PubDate"]; if(pubdateid!=null){ pubdate = pubdateid.content; }else{ pubdate = ""; } this.client.pubdate = pubdate }, getContentsource: function(){ var source = D.getElementsByTagName("meta")["ContentSource"]; if(source!=null){ contentsource = source.content }else{ contentsource = ""; } this.client.contentsource = contentsource }, getHostname: function() { this.client.hostname = L.hostname }, getRef: function() { this.client.ref = R ? E(R) : "" }, getartcount: function() { var ispagecount = document.getElementById("artcount"); if (ispagecount) { this.client.ispagecount = 1 } }, getBrowserType: function() { var isOpera = userAgent.indexOf("Opera") > -1; var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1 && !isOpera; var isIE11 = userAgent.indexOf("rv") > -1 && !isOpera; var isEdge = userAgent.indexOf("Windows NT 6.1; Trident/7.0;") > -1 && !isIE; var isFF = userAgent.indexOf("Firefox") > -1; var isSafari = userAgent.indexOf("Safari") > -1 && userAgent.indexOf("Chrome") == -1; var isChrome = userAgent.indexOf("Chrome") > -1 && userAgent.indexOf("Safari") > -1; var isUC = userAgent.indexOf("UCBrowser") > -1; var isQQ = userAgent.indexOf("QQBrowser") > -1; if (isIE) { var reIE = new RegExp("MSIE (\\d+\\.\\d+);"); reIE.test(userAgent); var fIEVersion = parseFloat(RegExp["$1"]); if (fIEVersion == 7) { this.client.browser = "IE7" } else { if (fIEVersion == 8) { this.client.browser = "IE8" } else { if (fIEVersion == 9) { this.client.browser = "IE9" } else { if (fIEVersion == 10) { this.client.browser = "IE10" } else { this.client.browser = "IE7以下版本" } } } } } else { if (isIE11) { this.client.browser = "IE11" } else { if (isSafari) { this.client.browser = "Safari" } else { if (isChrome) { this.client.browser = "Chrome" } else { if (isFF) { this.client.browser = "Firefox" } else { if (isOpera) { this.client.browser = "Opera" } else { if (isEdge) { this.client.browser = "Edge" } else { if (isUC) { this.client.browser = "UC浏览器" } else { if (isQQ) { this.client.browser = "QQ浏览器" } else { this.client.browser = "其它浏览器" } } } } } } } } } }, getClientOs: function() { var name = "unknown"; if (userAgent.indexOf("Android") != -1) { name = "Android" } else { if (userAgent.indexOf("iPhone") != -1) { name = "iPhone" } else { if (userAgent.indexOf("SymbianOS") != -1) { name = "SymbianOS" } else { if (userAgent.indexOf("Windows Phone") != -1) { name = "Windows Phone" } else { if (userAgent.indexOf("iPad") != -1) { name = "iPad" } else { if (userAgent.indexOf("iPod") != -1) { name = "iPod" } } } } } } if (name != "unknown") { this.client.os = name; this.client.terminal = "app"; return } if (userAgent.indexOf("Windows NT 10.0") != -1) { name = "Windows 10" } else { if (userAgent.indexOf("Windows NT 6.2") != -1) { name = "Windows 8" } else { if (userAgent.indexOf("Windows NT 6.1") != -1) { name = "Windows 7" } else { if (userAgent.indexOf("Windows NT 6.0") != -1) { name = "Windows Vista" } else { if (userAgent.indexOf("Windows NT 5.1") != -1) { name = "Windows XP" } else { if (userAgent.indexOf("Windows NT 5.0") != -1) { name = "Windows 2000" } else { if (userAgent.indexOf("Mac") != -1) { name = "Mac/iOS" } else { if (userAgent.indexOf("X11") != -1) { name = "UNIX" } else { if (userAgent.indexOf("Linux") != -1) { name = "Linux" } } } } } } } } } this.client.os = name; this.client.terminal = "pc" }, getCookieEnabled: function() { this.client.cookie = navigator.cookieEnabled ? "1": "0" }, getJavaEnabled: function() { this.client.java = navigator.javaEnabled ? "1": "0" }, getResolution: function() { this.client.resolution = W.screen.width + "x" + W.screen.height }, getColorDepth: function() { this.client.color = W.screen ? W.screen.colorDepth + "-bit": "" }, getFlash: function() { if (navigator.plugins && typeof navigator.plugins["Shockwave Flash"] == "object") { var a = navigator.plugins["Shockwave Flash"].description; if (a && (!navigator.mimeTypes || !navigator.mimeTypes["application/x-shockwave-flash"] || navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)) { this.client.flash = a.replace(/^.*\s+(\S+)\s+\S+$/, "$1") } } else { if (W.ActiveXObject) { try { if (a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash")) { (version = a.GetVariable("$version")) && (this.client.flash = version.replace(/^.*\s+(\d+),(\d+).*$/, "$1.$2")) } } catch(b) {} } } }, getLanguage: function() { var a = navigator; this.client.lan = (a.systemLanguage ? a.systemLanguage: a.browserLanguage ? a.browserLanguage: a.language ? a.language: a.userLanguage ? a.userLanguage: "-").toLowerCase() }, getEngine: function() { var r = R.toLowerCase(); var aSites = new Array("google.", "baidu.", "soso.", "so.", "360.", "yahoo.", "youdao.", "sogou.", "gougou.", "bing.", "jike.", "taobao.", "soku.", "easou.", "uc.", "sm.", "chinaso.", "jrobot"); var b = ""; for (ji in aSites) { if (r.indexOf(aSites[ji]) > 0) { b = aSites[ji]; if (b == "google.") { b = "Google" } else { if (b == "baidu.") { b = "百度" } else { if (b == "soso.") { b = "搜搜" } else { if (b == "360." || b == "so.") { b = "360搜索" } else { if (b == "yahoo.") { b = "雅虎" } else { if (b == "youdao.") { b = "有道" } else { if (b == "sogou.") { b = "搜狗" } else { if (b == "gougou.") { b = "狗狗搜索" } else { if (b == "bing.") { b = "Bing" } else { if (b == "jike.") { b = "即刻搜索" } else { if (b == "taobao.") { b = "淘宝搜索" } else { if (b == "soku.") { b = "搜酷" } else { if (b == "easou.") { b = "宜搜" } else { if (b == "uc.") { b = "UC搜索" } else { if (b == "sm.") { b = "神马搜索" } else { if (b == "chinaso.") { b = "中国搜索" } else { if (b == "jrobot") { b = "jrobot" } } } } } } } } } } } } } } } } } this.client.engine = b; return } } this.client.engine = b; return }, getKeyword: function() { var dq = getDomainQuery(R); var q = "&q"; eval("grep=/" + q + "=.*&/i;"); str = dq[1].match(grep); if (str == null) { keyword = null } else { keyword = str.toString().split("=")[1].split("&")[0]; keyword = decodeURIComponent(keyword) } this.client.keyword = keyword; return keyword }, postData: function() { var param = []; for (var ji in this.client) { var h = E(this.client[ji]); if (h) { param.push(ji + "=" + h) } } var head = D.getElementsByTagName("head")[0]; var script = D.createElement("script"); script.type = "text/javascript"; script.src = vc_path + "?" + param.join("&") + "&num=" + Math.random() + "&callback=handleResponse"; head.appendChild(script) }, unique: function() { var time = (new Date()).getTime() + "-", j = 0; return function() { return time + (j++) } }, sameDomaina: function(a, b) { b = eval(b); var webid = b["webid"]; if (webid != null) { this.client.webid = webid; this.client.hostname = b["domain"]; return true } else { return false } }, init: function() { if (this.sameDomaina(L.host, juba_domain)) { this.getCookid(); this.getSessionid(); this.getUrl(); this.getTitle(); this.getUrltype(); this.getPubdate(); this.getContentsource(); this.getMeta(); this.getUser(); this.getRef(); this.getBrowserType(); this.getClientOs(); this.getCookieEnabled(); this.getJavaEnabled(); this.getResolution(); this.getColorDepth(); this.getFlash(); this.getLanguage(); this.getEngine(); this.getKeyword(); this.getartcount(); this.postData() } else { console.log("----") } } }; VC.init() })(); function getDomainQuery(url) { var d = []; var st = url.indexOf("//", 1); var _domain = url.substring(st + 1, url.length); var et = _domain.indexOf("/", 1); d.push(_domain.substring(1, et)); d.push(_domain.substring(et + 1, url.length)); return d } function handleResponse(visitcount) { var art = document.getElementById("artcount"); if (art != null) { art.innerHTML = visitcount } } function ajax_method(url, method) { var ajax = new XMLHttpRequest(); ajax.open(method, url); ajax.send(); ajax.onreadystatechange = function() { if (ajax.readyState == 4 && ajax.status == 200) { var art = document.getElementById("artcount"); if (art == null) { return } else { art.innerHTML = ajax.responseText } } } } function ajax_detail(url, method) { var ajax = new XMLHttpRequest(); ajax.open(method, url); ajax.send() } function timestampToTime(timestamp) { if (timestamp == null) { return "" } var date = new Date(timestamp); var Y = date.getFullYear() + "-"; var M = (date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1) + "-"; var D = (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " "; var h = (date.getHours() < 10 ? "0" + date.getHours() : date.getHours()) + ":"; var m = (date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes()) + ":"; var s = date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds(); return Y + M + D + h + m + s } function getCookie(name) { var strcookie = document.cookie; var arrcookie = strcookie.split("; "); for (var ji = 0; ji < arrcookie.length; ji++) { var arr = arrcookie[ji].split("="); if (arr[0] == name) { return arr[1] } } return "" } function geturltype() { var type = -1; var url = top.document.location.toString(); url = url.split("/").slice(3)[0]; if (url != null && url != "") { if (url == "art") { type = 1 } else { if (url == "col") { type = 2 } else { if (url == "index.html") { type = 0 } } } } else { type = 0 } return type };