AI类 · 2026年3月19日 0

稿件详情

var xyUrl=”//appif-app.kjrb.com.cn/app_if/”;
var linkContent = “https://www.stdaily.com/web/zhuantiji/xczjc2026.html”;
var statCountClick=”是”;
//WEB文章点击数
var xy_webClick = {
//提交WEB文章点击数–点击事件
commitEvent : function() {
if (!xy_webClick.urlRoot) location.href=linkContent;
//得到文章ID
var aid = xy_webClick.getarticleID();
if (!aid) return;

var url = xy_webClick.urlRoot + “/event”;
var params = {
id : aid,
type : 0,
eventType : 0,
channel : 0
}
$.ajax({
url: url,
async:true,
dataType:”jsonp”,
jsonp: ‘jsoncallback’,
cache: true,
data:params,
success: function (response) {
location.href=linkContent;
}
});
},
getarticleID : function() {
if(document.getElementById(“DocIDforCount”)){
return document.getElementById(“DocIDforCount”).value;
}
else
{
var params = window.location.href;

var start = params.lastIndexOf(“_”);
if (start < 0) return ""; var end = params.lastIndexOf("."); if (end >= 0) {
var id = params.substring(start+1,end);
return id;
} else {
return “”;
}
}
}
}
if(statCountClick==’是’){
xy_webClick.urlRoot=xyUrl; //外网api根地址
xy_webClick.commitEvent();
}else{
location.href = linkContent;
}

原文链接:

https://www.stdaily.com/web/ztxw/2026-02/02/content_469199.html